Merge pull request 'lyc-dev' (#100) from lyc-dev into main

This commit is contained in:
lyc 2024-08-05 17:05:16 +08:00
commit 9ab5f65409
1 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,10 @@
<el-scrollbar height="450px">
<div class="textbook-item flex" v-for="item in subjectList" :class="curBookId == item.id ? 'active-item' : ''"
:key="item.id" @click="changeBook(item)">
<img :src="BaseUrl + item.avartar" class="textbook-img" alt="">
<img v-if="item.avartar" :src="BaseUrl + item.avartar" class="textbook-img" alt="">
<div v-else class="textbook-img">
<i class="iconfont icon-jiaocaixuanze" style="font-size: 40px;"></i>
</div>
<span class="book-name">{{ item.itemtitle }}</span>
</div>
</el-scrollbar>
@ -398,6 +401,9 @@ onMounted(() => {
.textbook-img {
width: 55px;
height: 70px;
display: flex;
align-items: center;
justify-content: center;
}
}