|
|
@ -16,19 +16,28 @@ const activeTab = inject( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
/** wait until table list loads since meta load requires table list **/ |
|
|
|
/** wait until table list loads since meta load requires table list **/ |
|
|
|
until(tables) |
|
|
|
// until(tables) |
|
|
|
|
|
|
|
// .toMatch((tables) => tables.length > 0) |
|
|
|
|
|
|
|
// .then(() => { |
|
|
|
|
|
|
|
// getMeta(route.params.title as string, true).finally(() => (loading.value = false)) |
|
|
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch(() => route.params.title, (tableTitle) => { |
|
|
|
|
|
|
|
until(tables) |
|
|
|
.toMatch((tables) => tables.length > 0) |
|
|
|
.toMatch((tables) => tables.length > 0) |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
getMeta(route.params.title as string, true).finally(() => (loading.value = false)) |
|
|
|
getMeta(tableTitle as string, true).finally(() => (loading.value = false)) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
}, {immediate: true}) |
|
|
|
|
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="w-full h-full"> |
|
|
|
<div class="w-full h-full"> |
|
|
|
<div v-if="loading" class="flex items-center justify-center h-full w-full"> |
|
|
|
<!-- <div v-if="loading" class="flex items-center justify-center h-full w-full">--> |
|
|
|
<a-spin size="large" /> |
|
|
|
<!-- <a-spin size="large" />--> |
|
|
|
</div> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
|
|
|
|
<LazyTabsSmartsheet v-else :key="route.params.title" :active-tab="activeTab" /> |
|
|
|
<LazyTabsSmartsheet :active-tab="activeTab" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|