refactor(frontend): use useTemplateRef for DOM referencing
This commit is contained in:
@@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onActivated, onMounted, onUnmounted, ref, shallowRef, watch } from 'vue';
|
||||
import { computed, onActivated, onMounted, onUnmounted, ref, useTemplateRef, watch } from 'vue';
|
||||
import type { PageMetadata } from '@/page.js';
|
||||
import type { SuperMenuDef } from '@/components/MkSuperMenu.vue';
|
||||
import { i18n } from '@/i18n.js';
|
||||
@@ -56,7 +56,7 @@ const indexInfo = {
|
||||
hideHeader: true,
|
||||
};
|
||||
const INFO = ref<PageMetadata>(indexInfo);
|
||||
const el = shallowRef<HTMLElement | null>(null);
|
||||
const el = useTemplateRef('el');
|
||||
const childInfo = ref<null | PageMetadata>(null);
|
||||
|
||||
const router = useRouter();
|
||||
|
Reference in New Issue
Block a user