review:tabbar不能传参问题
parent
1cadcaac5e
commit
1d2e9bcdb5
|
|
@ -131,6 +131,7 @@
|
||||||
getGoodsList();
|
getGoodsList();
|
||||||
}
|
}
|
||||||
function initMenuIndex() {
|
function initMenuIndex() {
|
||||||
|
// TODO @AI:可优化:增加一个 params.id 的兼容
|
||||||
const appStore = sheep.$store('app');
|
const appStore = sheep.$store('app');
|
||||||
// 处理 tabbar 传参的情况
|
// 处理 tabbar 传参的情况
|
||||||
const tabbarParams = appStore.paramsForTabbar || {};
|
const tabbarParams = appStore.paramsForTabbar || {};
|
||||||
|
|
|
||||||
|
|
@ -114,13 +114,13 @@ const app = defineStore({
|
||||||
$router.error('InitError', res.msg || '加载失败');
|
$router.error('InitError', res.msg || '加载失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 设置paramsForTabbar
|
// 设置 paramsForTabbar
|
||||||
setParamsForTabbar(params = {}) {
|
setParamsForTabbar(params = {}) {
|
||||||
this.paramsForTabbar = params;
|
this.paramsForTabbar = params;
|
||||||
},
|
},
|
||||||
clearParamsForTabbar() {
|
clearParamsForTabbar() {
|
||||||
this.paramsForTabbar = {};
|
this.paramsForTabbar = {};
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
persist: {
|
persist: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue