1,@的使用在,css里面要注意~@才能生效
1,项目中弹窗编辑信息,弹窗和表格不能实时同步修改
处理:浅拷贝 Object.assign({},row.data)
1.this. r o u t e . p a r a m s ( 刷新参数会丢失 ) 和 t h i s . route.params(刷新参数会丢失)和this. route.params(刷新参数会丢失)和this.route.query的区别
推荐使用下面
//传参(JSON.stringify避免刷新页面时,此参数值成了’[object object]’
this. r o u t e r . p u s h ( p a t h : " / p a t h " , q u e r y : d a t a : J S O N . s t r i n g i f y ( d a t a ) ) ; / / 取值 l e t d a t a = J S O N . p a r s e ( t h i s . router.push({ path: "/path", query: { data:JSON.stringify(data)} }); //取值 let data=JSON.parse(this. router.push(path:"/path",query:data:JSON.stringify(data));//取值letdata=JSON.parse(this.route.query.data);
5,route和router区别:
r o u t e 当前路由基本信息 , t h i s . route当前路由基本信息,this. route当前路由基本信息,this.route.query/meta/path
r o u t e r 是路由的实例化对象理解 : t h i s . router是路由的实例化对象 理解:this. router是路由的实例化对象理解:
vue知识
于 2021-03-31 22:00:44 首次发布