baigl #204

Merged
baigl merged 2 commits from baigl into main 2025-01-07 10:54:43 +08:00
1 changed files with 12 additions and 6 deletions

View File

@ -11,15 +11,21 @@
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current :default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
@node-click="handleNodeClick"> @node-click="handleNodeClick">
<template #default="{ node, data }"> <template #default="{ node, data }">
<div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')"> <div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')" class="tree-label-wrap">
<el-tooltip effect="light" placement="right" content="该单元章节无自主试题"> <el-tooltip effect="light" placement="right" >
<span class="tree-label" style="color: #A5B3CA"> <template #content> {{ node.label }}<br /><span style="color: red;">-该单元章节无自主试题-</span> </template>
<span class="tree-label" style="color: #A5B3CA" >
{{ node.label }} {{ node.label }}
</span> </span>
</el-tooltip> </el-tooltip>
</div> </div>
<div v-else> <div v-else class="tree-label-wrap">
<span class="tree-label">{{ node.label }}</span> <el-tooltip effect="light" placement="right" >
<template #content> {{ node.label }}</template>
<span class="tree-label">
{{ node.label }}
</span>
</el-tooltip>
</div> </div>
</template> </template>
</el-tree> </el-tree>
@ -334,7 +340,7 @@ onMounted( async () => {
} }
} }
.tree-label { .tree-label-wrap, .tree-label {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;