上一页 1 ··· 7 8 9 10 11 12 13 14 下一页
摘要: 问题: 点击多次相同的路由报错 解决方法一: 全局处理,只需要加一次 在引入 vue-router 的地方加上以下代码,统一处理错误 import Router from 'vue-router' const originalPush = Router.prototype.push // 重写原型上 阅读全文
posted @ 2022-08-09 15:31 DL·Coder 阅读(368) 评论(0) 推荐(0)
摘要: 需求:导航菜单,点击触发方式触发popover 第一个传送门体验地址:https://codepen.io/chanbaihai/pen/abwbEzQ?editors=1111 传送门:https://blog.csdn.net/weixin_45753473/article/details/11 阅读全文
posted @ 2022-08-05 15:43 DL·Coder 阅读(119) 评论(0) 推荐(0)
摘要: vue2 Object.defineProperty() Object.defineProperty() 方法会直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象。 每次劫持数据,都会层层遍历,影响性能,数组劫持数据,能劫持到push、pop、shift、unshift、等数组 阅读全文
posted @ 2022-08-03 16:13 DL·Coder 阅读(184) 评论(0) 推荐(0)
摘要: template <el-pagination :current-page="pagerList.currentPage" :page-size="pagerList.pageSize" :total="pagerList.total" :page-sizes="[10, 20, 50, 100]" 阅读全文
posted @ 2022-08-03 09:27 DL·Coder 阅读(39) 评论(0) 推荐(0)
摘要: 使用:v-if 在 v-for 外层,给 v-for 多包一层 v-for 优先级高于 v-if 第一种方式: <ul v-if="true"> <li v-for="item in Users" :key="user.id" > {{ user.name }} </li> </ul> 第二种:使用 阅读全文
posted @ 2022-08-02 14:52 DL·Coder 阅读(167) 评论(0) 推荐(0)
摘要: 在线 svg 运行器 在线 svg 运行器:https://www.runoob.com/try/try.php?filename=trysvg_myfirst 顶级标签 svg <svg width="100" height="100" viewBox="50 50 50 50" xmlns="h 阅读全文
posted @ 2022-08-02 14:10 DL·Coder 阅读(978) 评论(0) 推荐(0)
摘要: 方式一: main.js 设置全局变量 import api from '@/api' app.config.globalProperties.$api = api 使用全局变量,使用 getCurrentInstance 方法。 // ctx.$api 就是全局设置的变量 const { prox 阅读全文
posted @ 2022-07-30 23:33 DL·Coder 阅读(7504) 评论(0) 推荐(0)
摘要: vite 配置 //element 全局默认大小为small app.config.globalProperties.$ELEMENT = { size: 'small', } 阅读全文
posted @ 2022-07-30 23:31 DL·Coder 阅读(1958) 评论(0) 推荐(0)
摘要: App.vue 直接拷贝 <template> <el-config-provider :locale="locale"> <router-view /> </el-config-provider> </template> <script > import { ElConfigProvider } 阅读全文
posted @ 2022-07-30 23:21 DL·Coder 阅读(238) 评论(0) 推荐(0)
摘要: 效果图 六边形战士 <svg> <g stroke="black" stroke-width="1px" fill="white"> <path d="M20 0 L60 0 L80 40 L60 80 L20 80 L0 40 Z" stroke="#000" stroke-width="1" / 阅读全文
posted @ 2022-07-29 14:32 DL·Coder 阅读(380) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 下一页