fix(VnSection): refs #8197 check route #1263
|
@ -51,7 +51,7 @@ const router = useRouter();
|
||||||
|
|
||||||
let arrayData;
|
let arrayData;
|
||||||
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
const sectionValue = computed(() => $props.section ?? $props.dataKey);
|
||||||
const isMainSection = ref();
|
const isMainSection = ref(false);
|
||||||
|
|
||||||
const searchbarId = 'section-searchbar';
|
const searchbarId = 'section-searchbar';
|
||||||
const hasContent = useHasContent(`#${searchbarId}`);
|
const hasContent = useHasContent(`#${searchbarId}`);
|
||||||
|
@ -71,7 +71,7 @@ onMounted(() => {
|
||||||
const unsubscribe = router.afterEach(() => {
|
const unsubscribe = router.afterEach(() => {
|
||||||
checkIsMain();
|
checkIsMain();
|
||||||
});
|
});
|
||||||
onUnmounted(() => unsubscribe());
|
onUnmounted(unsubscribe);
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkIsMain() {
|
function checkIsMain() {
|
||||||
|
|
Loading…
Reference in New Issue