feat: 增加搜索标签展示,修复样式问题,提示语修改

This commit is contained in:
2025-09-15 11:35:49 +08:00
parent 046509f70d
commit 3860087fac

View File

@@ -69,7 +69,7 @@
<div class="xcontent2-main content-div">
<!-- 内容导航 -->
<div class="topNav" v-if="!newData" style="display: flex; justify-content: center;align-items: center;flex-direction: row;background-color:#fff;">
<div class="topNav" v-if="!newData" style="display: flex; flex-direction: row;background-color:#fff;">
<div>
<div class="search-div nav" style="height: 100px;flex: 1;">
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item"
@@ -107,7 +107,7 @@
</div>
<!-- 清除 -->
<!-- <div v-if="stagList.length > 0 && !newData" class="search-div" style="padding: 0;margin-bottom: 20px;">
<div v-if="stagList.length > 0 && !newData" class="search-div" style="padding: 0;margin-bottom: 20px;">
<div class="searchbar" style="background-color:#f6f7fb;display: flex;justify-content: space-between;">
<div style="line-height: 30px;">
<span class="item-title"> 搜索条件</span>
@@ -118,7 +118,7 @@
<el-button type="primary" size="mini" @click="handleClearTags">清除</el-button>
</div>
</div>
</div> -->
</div>
<!-- 标题最新最热好评率 -->
<div class="xcourse-list" style="background-color: #fff;border-radius: 8px;padding:0 25px;">
@@ -217,7 +217,7 @@
<!-- <span class="pag-text-msg" v-else-if="moreState == 3 && courseList.length > 0">没有更多数据了</span> -->
<span class="notcoures" v-if="moreState == 3 && courseList.length == 0">
<img :src="`${webBaseUrl}/images/nocouresimg.png`" alt="">
<h5>暂无课程请优先学习其它课程吧</h5>
<h5>当前分类下暂未标记精品课</h5>
</span>
<div v-if="courseList.length > 0">
<pagination :size="course.pageSize" :total="Number(count)" :page="course.pageIndex"
@@ -316,6 +316,7 @@ export default {
let list = [];
},
// 取消搜索条件标签展示
stagList() { //计算出选择的内容
let list = [];
if (this.keyword) {
@@ -326,11 +327,12 @@ export default {
checked: true
})
}
this.ctypeList.forEach(item => {
if (item.checked) {
list.push(item);
}
});
// 取消 全部 内部专享 外部精选 三种的显示
// this.ctypeList.forEach(item => {
// if (item.checked) {
// list.push(item);
// }
// });
this.oneList.forEach(one => {
var twoChildChecked = false;//是否有下级
one.children.forEach(two => {
@@ -479,10 +481,9 @@ export default {
mounted() {
qualityCourseTimeMark().then(response=>{
console.log(`qualityCourseTimeMark`, response)
this.years = response.data.result
})
let screenWidth = window.screen.availWidth;
// let screenWidth = window.screen.availWidth;
// if (screenWidth < 1280) {
// this.course.pageSize = 9;
// this.columns = 3;
@@ -644,6 +645,7 @@ export default {
},
//搜索条件
stagClose(tag, tagIndex) {
this.courseChosen = void 0;
tag.checked = false;
if (tag.type == 0) {
this.keyword = '';
@@ -689,9 +691,10 @@ export default {
handleClearTags() {
//清空所有的条件
this.keyword = '';
this.ctypeList.forEach(item => {
item.checked = false;
});
// 取消搜索条件标签展示
// this.ctypeList.forEach(item => {
// item.checked = false;
// });
this.oneList.forEach(one => {
one.checked = false;
one.children.forEach(two => {
@@ -701,6 +704,8 @@ export default {
})
})
});
// 清除左侧被选中的内容
this.courseChosen = void 0;
this.twoList = [];
this.threeList = [];
this.navTitle = [];
@@ -921,7 +926,6 @@ export default {
// 头部
emitInput(val) {
this.keyword = val;
//this.stagList;
this.searchData();
},
@@ -2108,7 +2112,7 @@ export default {
.search-div {
background: #fff;
padding: 10px 0;
padding: 10px 15px;
border-radius: 8px;
::v-deep .el-input {