fix: tree style

pull/28/head
xingyu 2023-08-04 20:00:28 +08:00
parent 14aef34e44
commit 14cd061671
4 changed files with 20 additions and 5 deletions

View File

@ -73,4 +73,10 @@ const getClass = computed(() => [
margin-left: 10px;
}
}
html[data-theme="dark"] {
.@{prefix-cls} {
color: rgb(255 255 255 85%);
}
}
</style>

View File

@ -1,6 +1,6 @@
<script lang="ts" setup>
import { computed, ref, useSlots, watch } from 'vue'
import { Dropdown, InputSearch, Menu, MenuDivider, MenuItem } from 'ant-design-vue'
import { Dropdown, InputSearch, Menu, MenuDivider } from 'ant-design-vue'
import { useDebounceFn } from '@vueuse/core'
import { ToolbarEnum } from '../types/tree'
import { Icon } from '@/components/Icon'
@ -169,9 +169,9 @@ watch(
<template #overlay>
<Menu @click="handleMenuClick">
<template v-for="item in toolbarList" :key="item.value">
<MenuItem v-bind="{ key: item.value }">
<Menu.Item v-bind="{ key: item.value }">
{{ item.label }}
</MenuItem>
</Menu.Item>
<MenuDivider v-if="item.divider" />
</template>
</Menu>

View File

@ -1,7 +1,7 @@
@tree-prefix-cls: ~"@{namespace}-tree";
.@{tree-prefix-cls} {
background-color: @component-background;
// background-color: @component-background;
.ant-tree-node-content-wrapper {
position: relative;
@ -50,3 +50,12 @@
border-bottom: 1px solid @border-color-base;
}
}
html[data-theme="dark"] {
.@{tree-prefix-cls} {
&-header {
background-color: #1f1f1f;
}
}
}

View File

@ -26,7 +26,7 @@ onMounted(() => {
</script>
<template>
<div class="m-4 mr-0 overflow-hidden bg-white">
<div class="m-4 mr-0 overflow-hidden">
<BasicTree
title="部门列表"
toolbar