fix: bug#11826

This commit is contained in:
xieyonghong 2023-04-11 11:27:11 +08:00
parent 2b996fadf3
commit fb32cc9a38
1 changed files with 15 additions and 14 deletions

View File

@ -256,20 +256,21 @@ const getDetail = () => {
}
};
// watch(
// () => route.params?.id,
// async (newId) => {
// if (newId) {
// await instanceStore.refresh(String(newId));
// getStatus(String(newId));
// list.value = [...initList];
// console.log('watch', route.params?.id)
// getDetail();
// instanceStore.tabActiveKey = 'Info';
// }
// },
// { immediate: true, deep: true },
// );
const initPage = async (newId: any) => {
await instanceStore.refresh(String(newId));
getStatus(String(newId));
list.value = [...initList];
console.log('watch', route.params?.id)
getDetail();
instanceStore.tabActiveKey = 'Info';
}
onBeforeRouteUpdate((to: any) => {
if (to.params?.id) {
initPage(to.params?.id)
}
})
const getDetailFn = async () => {
const _id = route.params?.id;