摘要: 1. 在路由中配置 path { path:'product/:id', name:"product", component:Product, }, 传递参数,页面刷新数据不会消失 getProductInfo(){ // 获取路由参数 let id = this.$route.params.id; 阅读全文
posted @ 2020-03-10 21:11 .xiao 阅读(761) 评论(0) 推荐(0) 编辑
摘要: 在按需引入 element-ui 组件的 message 时候,每次进入页面的会自动出现 message 提示, 解决方法: 通过加载组件的方式引入即可 把 Vue.use(Message) 改为 Vue.prototype.$message = Message 或 Vue.component(Me 阅读全文
posted @ 2020-03-10 17:34 .xiao 阅读(1821) 评论(3) 推荐(0) 编辑