feat: refs #8197 default sectionName
This commit is contained in:
parent
66d0c2d5bb
commit
b54f39f1a0
|
@ -2,7 +2,7 @@
|
|||
import RightMenu from './RightMenu.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import VnTableFilter from '../VnTable/VnTableFilter.vue';
|
||||
import { onBeforeMount } from 'vue';
|
||||
import { onBeforeMount, computed } from 'vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
|
||||
const $props = defineProps({
|
||||
|
@ -36,6 +36,8 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
||||
|
||||
onBeforeMount(() => {
|
||||
if ($props.dataKey)
|
||||
useArrayData($props.dataKey, {
|
||||
|
@ -67,6 +69,6 @@ onBeforeMount(() => {
|
|||
</template>
|
||||
</RightMenu>
|
||||
|
||||
<slot name="body" v-if="section == $route.name" />
|
||||
<slot name="body" v-if="sectionValue == $route.name" />
|
||||
<RouterView v-else />
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue