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