fix: bug#10514
This commit is contained in:
parent
532c82afe6
commit
620a3a4ae8
|
@ -237,7 +237,7 @@ const columns = [
|
|||
scopedSlots: true,
|
||||
width: 200,
|
||||
search: {
|
||||
type: 'string',
|
||||
type: 'number',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -246,21 +246,35 @@ const getDetail = () => {
|
|||
}
|
||||
};
|
||||
|
||||
watch(
|
||||
() => route.params?.id,
|
||||
async (newId) => {
|
||||
if (newId) {
|
||||
await instanceStore.refresh(String(newId));
|
||||
getStatus(String(newId));
|
||||
list.value = [...initList];
|
||||
getDetail();
|
||||
instanceStore.tabActiveKey = 'Info';
|
||||
}
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
);
|
||||
// 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 getDetailFn = async () => {
|
||||
const _id = route.params?.id
|
||||
if (_id) {
|
||||
await instanceStore.refresh(String(_id));
|
||||
getStatus(String(_id));
|
||||
list.value = [...initList];
|
||||
console.log('watch', route.params?.id)
|
||||
getDetail();
|
||||
instanceStore.tabActiveKey = history.state?.params?.tab || 'Info';
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getDetailFn()
|
||||
instanceStore.tabActiveKey = history.state?.params?.tab || 'Info';
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue