修改节点样式

This commit is contained in:
zqm
2026-02-02 14:11:58 +08:00
parent fc089395c9
commit 6ec048a3be
3 changed files with 8 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "joyd.web.vue.cubelib",
"version": "1.2.2",
"version": "1.2.5",
"description": "Vue3 CubeLib 组件库 - 包含WebSocket、Splitter、TreeView等组件",
"type": "module",
"main": "index.js",

View File

@@ -138,14 +138,13 @@ const computedIcon = computed(() => {
return effectiveIconMap.default || '📄'
} else if (iconType === 'heading') {
const effectiveIconMap = userIconMap || defaultHeadingIconMap
const level = props.item.level
if (level && effectiveIconMap[level]) {
return effectiveIconMap[level]
if (hasChildren.value) {
if (props.item.level === 1) {
return '📚'
}
return '📖'
}
return effectiveIconMap.default || '📄'
return '📄'
}
return hasChildren.value ? '📁' : '📄'

View File

@@ -30,7 +30,7 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { ref, computed, watch, nextTick } from 'vue'
import CubeTreeItem from './CubeTreeItem.vue'
const props = defineProps({