fix(styles): Fix the issue where the header button remains highlighted after clicking

This commit is contained in:
Azir 2024-05-23 23:27:11 +08:00
parent c8fc1d73e0
commit cfe078369d
2 changed files with 8 additions and 8 deletions

View File

@ -28,12 +28,6 @@ const props = withDefaults(defineProps<Props>(), {
zIndex: 98
});
interface ButtonProps {
className: string;
}
const [DefineButton, Button] = createReusableTemplate<ButtonProps>();
const cls = computed(() => {
let clsStr = props.class;
@ -47,12 +41,18 @@ const cls = computed(() => {
return clsStr;
});
interface ButtonProps {
className: string;
}
const [DefineButton, Button] = createReusableTemplate<ButtonProps>();
</script>
<template>
<!-- define component start: Button -->
<DefineButton v-slot="{ $slots, className }">
<NButton quaternary :class="className">
<NButton quaternary :class="className" :focusable="false">
<div class="flex-center gap-8px">
<component :is="$slots.default" />
</div>

View File

@ -13,7 +13,7 @@ const appStore = useAppStore();
<ButtonIcon
icon="majesticons:color-swatch-line"
:tooltip-content="$t('icon.themeConfig')"
@click="appStore.openThemeDrawer"
@click.stop="appStore.openThemeDrawer"
/>
</template>