This commit is contained in:
yanghang
2025-07-09 19:49:33 +08:00
parent 1ae450bb82
commit efa81fd6f5
+6 -5
View File
@@ -29,7 +29,8 @@
<uv-icon class="filter-icon" name="list"/>
</view>
<view :class="['filter-list',showFilterList?'show':'']">
<view class="filter-type" v-for="item in tagsTree.filter(t=>(t.children||[]).length>0)" :key="item.value">
<view class="filter-type" v-for="item in tagsTree" :key="item.value">
<!-- .filter(t=>(t.children||[]).length>0) -->
<view class="filter-type-title">{{item.label}}</view>
<view class="filter-type-list">
<view :class="['filter-type-item', activeTag===itemT.value?'is-active':'']" v-for="itemT in (item.children||[])" @click="chooseTag(itemT)">
@@ -47,7 +48,7 @@
:type="activeTag === ''?'primary':'info'"
@click="chooseTag({value:''})"
></uv-tags>
<uv-tags :text="item.label"
<uv-tags :text="item.label+item.required"
v-for="item in tagsList"
:key="item.value"
shape="circle"
@@ -186,9 +187,9 @@ import { onMounted, ref, computed } from 'vue'
let _tarr = t.children || []
_arr = _arr.concat(_tarr)
})
return _arr.sort((a,b)=>{
a.required == "Y" && b.required === 'N'
})
let _reqList = _arr.filter(t=>t.required === "Y")
let _reqListN = _arr.filter(t=>t.required === "N")
return _reqList.concat(_reqListN)
})
const courseListBase = ref([])
const courseList = computed(()=>{