mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-21 07:16:15 -04:00
refactor: removed useless ref and value
This commit is contained in:
parent
086d31eab5
commit
b12cbe4124
1 changed files with 2 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { NIcon, useThemeVars } from 'naive-ui';
|
import { NIcon, useThemeVars } from 'naive-ui';
|
||||||
import { h, ref, type Component } from 'vue';
|
import { h, type Component } from 'vue';
|
||||||
import { RouterLink, useRoute } from 'vue-router';
|
import { RouterLink, useRoute } from 'vue-router';
|
||||||
import { Heart, Menu2, Home2 } from '@vicons/tabler';
|
import { Heart, Menu2, Home2 } from '@vicons/tabler';
|
||||||
import { toolsByCategory } from '@/tools';
|
import { toolsByCategory } from '@/tools';
|
||||||
|
@ -11,7 +11,6 @@ import MenuLayout from '../components/MenuLayout.vue';
|
||||||
import NavbarButtons from '../components/NavbarButtons.vue';
|
import NavbarButtons from '../components/NavbarButtons.vue';
|
||||||
|
|
||||||
const themeVars = useThemeVars();
|
const themeVars = useThemeVars();
|
||||||
const activeKey = ref(null);
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const styleStore = useStyleStore();
|
const styleStore = useStyleStore();
|
||||||
const version = import.meta.env.PACKAGE_VERSION;
|
const version = import.meta.env.PACKAGE_VERSION;
|
||||||
|
@ -50,9 +49,8 @@ const m = toolsByCategory.map((category) => ({
|
||||||
</n-space>
|
</n-space>
|
||||||
|
|
||||||
<n-menu
|
<n-menu
|
||||||
v-model:value="activeKey"
|
|
||||||
class="menu"
|
class="menu"
|
||||||
:value="route.name"
|
:value="(route.name as string)"
|
||||||
:collapsed-width="64"
|
:collapsed-width="64"
|
||||||
:collapsed-icon-size="22"
|
:collapsed-icon-size="22"
|
||||||
:options="m"
|
:options="m"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue