zouyf_dev #193

Merged
zouyf merged 5 commits from zouyf_dev into main 2024-12-27 16:49:48 +08:00
1 changed files with 7 additions and 27 deletions
Showing only changes of commit bde39cc2e6 - Show all commits

View File

@ -10,26 +10,17 @@ div<template>
<el-tree :data="treeData" accordion :props="defaultProps" node-key="id"
:default-expanded-keys="defaultExpandedKeys" :current-node-key="curNode.data.id" highlight-current
@node-click="handleNodeClick">
<template #default="{ node }">
<span :title="node.label" class="tree-label" >
{{ node.label }}
</span>
<!-- <div v-if="node.bookId == '' || node.bookId == '0'">
<el-tooltip effect="light" placement="top" content="当前单元章节无试题">
<span :title="node.label" class="tree-label" style="color: #A5B3CA">
{{ node }}
<template #default="{ node, data }">
<div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')">
<el-tooltip effect="light" placement="right" content="该单元章节无自主试题">
<span class="tree-label" style="color: #A5B3CA">
{{ node.label }}
</span>
</el-tooltip>
</div>
<div v-else>
<span :title="node.label" class="tree-label">{{ node.label }}</span>
</div> -->
<!-- <div v-if="props.isClassTask == true">
<span class="tree-label">{{ node.label }}</span>
</div>
<div v-else>
<span :title="node.label" class="tree-label">{{ node.label }}</span>
</div> -->
</template>
</el-tree>
</div>
@ -73,7 +64,7 @@ const BaseUrl = import.meta.env.VITE_APP_BUILD_BASE_PATH
const props = defineProps({
// []使()
isClassTask: {
default: true
default: false
},
})
const isStadium = () => {
@ -204,17 +195,6 @@ const handleNodeClick = (data) => {
emit('nodeClick', curData)
}
const renderContent = (h, { node, data, store }) => {
return h(
'span',
{
style: {
color: props.isClassTask ? data.bookId==''||data.bookId=='0'?'#A5B3CA':'black' : 'black',
},
},
node.label
);
}
onMounted( async () => {
treeLoading.value = true
try{