perf: optimize language loading and switching timing.

This commit is contained in:
tiny-craft
2023-08-26 00:49:44 +08:00
parent 83ffb0aaed
commit 7fe7b8f9bc
7 changed files with 33 additions and 12 deletions

View File

@@ -32,7 +32,7 @@ const emit = defineEmits(['update:value'])
const iconSize = computed(() => Math.floor(props.width * 0.4))
const renderIcon = (icon) => {
return () => h(NIcon, null, { default: () => h(icon) })
return () => h(NIcon, null, { default: () => h(icon, { strokeWidth: 4 }) })
}
const connectionStore = useConnectionStore()
@@ -122,7 +122,7 @@ const openGithub = () => {
:render-label="renderContextLabel"
trigger="click"
@select="onSelectPreferenceMenu">
<icon-button :icon="Config" :size="iconSize" class="nav-menu-button" />
<icon-button :icon="Config" :size="iconSize" stroke-width="4" class="nav-menu-button" />
</n-dropdown>
<icon-button :icon="Github" :size="iconSize" class="nav-menu-button" @click="openGithub" />
</div>