假设页面中有一个名为'name'的属性,我想在进入或出去的时候重置它:
route: {
data ({to, from}) {
this.name = xxx // 并未设置成功 ??
deactivate ({to, next}) {
// 不会用
this.name = xxx // 再次进入也不行
}
},
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你在Vue的data中声明name了么?
那个是不是应该在组件里面去做这个事情?