fix(components): 修复tab组件适应暗黑主题模式

This commit is contained in:
Soybean
2021-09-26 14:41:34 +08:00
parent 82e613ea26
commit 2fe3d27a36
8 changed files with 503 additions and 544 deletions

View File

@ -1,10 +1,14 @@
<template>
<!--删除 bg-white 黑暗模式正常-->
<div
class="relative flex-center h-30px pl-14px border-1px border-[#e5e7eb] rounded-2px cursor-pointer"
class="relative flex-center h-30px pl-14px border-1px rounded-2px cursor-pointer"
:class="[
closable ? 'pr-6px' : 'pr-14px',
{ 'text-primary bg-primary bg-opacity-10 !border-primary': active, 'text-primary border-primary': isHover }
active || isHover
? 'text-primary border-primary border-opacity-30'
: darkMode
? 'border-[#ffffff3d]'
: 'border-[#e5e7eb]',
{ 'bg-primary bg-opacity-10': active }
]"
@mouseenter="setTrue"
@mouseleave="setFalse"
@ -30,6 +34,10 @@ defineProps({
closable: {
type: Boolean,
default: true
},
darkMode: {
type: Boolean,
default: false
}
});
const emit = defineEmits(['close']);