2022年8月28日

数组去重

摘要: //数组去重 if(this.searchParams.props.indexOf(props) == -1){ this.searchParams.props.push(props); // console.log(props); } 阅读全文

posted @ 2022-08-28 20:18 xiaobo95 阅读(4) 评论(0) 推荐(0) 编辑

数据的切割

摘要: split以:分割 展示第二个 searchParams.trademark.split(":")[1] 阅读全文

posted @ 2022-08-28 19:26 xiaobo95 阅读(19) 评论(0) 推荐(0) 编辑

消除Vue重复路由报错

摘要: 在VUE中路由遇到Error: Avoided redundant navigation to current location:报错显示是路由重复 在router文件夹下的index.js中加入如下代码,错误消失 const originalPush = VueRouter.prototype.p 阅读全文

posted @ 2022-08-28 18:54 xiaobo95 阅读(66) 评论(0) 推荐(0) 编辑

全局时间总线,兄弟间传递信息

摘要: 在 入口文件 main中引入bus new Vue({ render: h => h(App), //注册路由 router, //注册store store, //配置全局总线 beforeCreate() { Vue.prototype.$bus = this }, }).$mount('#ap 阅读全文

posted @ 2022-08-28 17:54 xiaobo95 阅读(15) 评论(0) 推荐(0) 编辑

导航