课程超长提示 优化

This commit is contained in:
白了个白 2025-01-07 16:06:40 +08:00
parent 912d32bc9c
commit 7c1d669a56
1 changed files with 8 additions and 6 deletions

View File

@ -14,17 +14,17 @@
<div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')" class="tree-label-wrap"> <div v-if="props.isClassTask && (data.bookId == '' || data.bookId == '0')" class="tree-label-wrap">
<el-tooltip effect="light" placement="right" > <el-tooltip effect="light" placement="right" >
<template #content> {{ node.label }}<br /><span style="color: red;">-该单元章节无自主试题-</span> </template> <template #content> {{ node.label }}<br /><span style="color: red;">-该单元章节无自主试题-</span> </template>
<span class="tree-label" style="color: #A5B3CA" > <div class="tree-label" style="color: #A5B3CA" >
{{ node.label }} {{ node.label }}
</span> </div>
</el-tooltip> </el-tooltip>
</div> </div>
<div v-else class="tree-label-wrap"> <div v-else class="tree-label-wrap">
<el-tooltip effect="light" placement="right" > <el-tooltip effect="light" placement="right" >
<template #content> {{ node.label }}</template> <template #content> {{ node.label }}</template>
<span class="tree-label"> <div class="tree-label">
{{ node.label }} {{ node.label }}
</span> </div>
</el-tooltip> </el-tooltip>
</div> </div>
</template> </template>
@ -44,8 +44,9 @@
<div class="textbook-container"> <div class="textbook-container">
<el-scrollbar height="450px"> <el-scrollbar height="450px">
<div class="textbook-item flex" v-for="item in subjectList" :class="curBook.data.id == item.id ? 'active-item' : ''" <div
:key="item.id" @click="changeBook(item)"> v-for="item in subjectList" :key="item.id" class="textbook-item flex"
:class="curBook.data.id == item.id ? 'active-item' : ''" @click="changeBook(item)">
<img v-if="item.avartar" :src="item.avartar.indexOf('http') === 0 ? item.avartar : BaseUrl + item.avartar" class="textbook-img" alt=""> <img v-if="item.avartar" :src="item.avartar.indexOf('http') === 0 ? item.avartar : BaseUrl + item.avartar" class="textbook-img" alt="">
<div v-else class="textbook-img"> <div v-else class="textbook-img">
<i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i> <i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i>
@ -341,6 +342,7 @@ onMounted( async () => {
} }
.tree-label-wrap, .tree-label { .tree-label-wrap, .tree-label {
max-width: 100%;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;