修改节点样式

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", "name": "joyd.web.vue.cubelib",
"version": "1.2.2", "version": "1.2.5",
"description": "Vue3 CubeLib 组件库 - 包含WebSocket、Splitter、TreeView等组件", "description": "Vue3 CubeLib 组件库 - 包含WebSocket、Splitter、TreeView等组件",
"type": "module", "type": "module",
"main": "index.js", "main": "index.js",

View File

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

View File

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