|
|
@ -30,6 +30,8 @@ const emits = defineEmits(['update:paginationData']) |
|
|
|
|
|
|
|
|
|
|
|
const vGroup = useVModel(props, 'group', emits) |
|
|
|
const vGroup = useVModel(props, 'group', emits) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isViewDataLoading, isPaginationLoading } = storeToRefs(useViewsStore()) |
|
|
|
|
|
|
|
|
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj, createEventHook()) |
|
|
|
const reloadViewDataHook = inject(ReloadViewDataHookInj, createEventHook()) |
|
|
|
|
|
|
|
|
|
|
|
const _depth = props.depth ?? 0 |
|
|
|
const _depth = props.depth ?? 0 |
|
|
@ -85,13 +87,19 @@ reloadViewDataHook?.on(reloadViewDataHandler) |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|
[() => vGroup.value.key], |
|
|
|
[() => vGroup.value.key], |
|
|
|
(n, o) => { |
|
|
|
async (n, o) => { |
|
|
|
if (n !== o) { |
|
|
|
if (n !== o) { |
|
|
|
|
|
|
|
isViewDataLoading.value = true |
|
|
|
|
|
|
|
isPaginationLoading.value = true |
|
|
|
|
|
|
|
|
|
|
|
if (vGroup.value.nested) { |
|
|
|
if (vGroup.value.nested) { |
|
|
|
props.loadGroups({}, vGroup.value) |
|
|
|
await props.loadGroups({}, vGroup.value) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
props.loadGroupData(vGroup.value, true) |
|
|
|
await props.loadGroupData(vGroup.value, true) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isViewDataLoading.value = false |
|
|
|
|
|
|
|
isPaginationLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ immediate: true }, |
|
|
|
{ immediate: true }, |
|
|
|