diff --git a/src/pages/search/result.vue b/src/pages/search/result.vue index d286b354..9c4997dc 100644 --- a/src/pages/search/result.vue +++ b/src/pages/search/result.vue @@ -33,7 +33,8 @@ - + 暂无数据 + 功能 @@ -54,7 +55,7 @@ 暂无数据 - + 课程 @@ -69,7 +70,7 @@ 暂无数据 - + 任务 @@ -84,7 +85,7 @@ 暂无数据 - + AI陪练 @@ -92,7 +93,7 @@ 暂无数据 - + 考试 @@ -231,9 +232,22 @@ const testList = ref([]) const taskList = ref([]) const examList = ref([]) const courseList = ref([]) -const showModelList = typeName => { - return ['', 'all', typeName].indexOf(activeTab.value) >= 0 +const showModelList = (typeName, list=[]) => { + console.log(typeName, list.length > 0) + if ( ['', 'all'].indexOf(activeTab.value) >= 0){ + return list.length > 0 + }else{ + return [typeName].indexOf(activeTab.value) >= 0 + } } +const showEmptyBox = computed(() => { + if ( ['', 'all'].indexOf(activeTab.value) >= 0){ + let _num = testList.value.length + taskList.value.length + courseList.value.length + examList.value.length + abilityListShow.value.length + return _num === 0 + }else{ + return false + } +}) const changeTab = item => { if (!item) return activeTab.value = item.type