Merge pull request 'fix:无数据时处理;' (#159) from yangws into main
Reviewed-on: #159
This commit is contained in:
commit
bf7f740aaf
|
@ -163,6 +163,10 @@ const handleNodeClick = (data,node) => {
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
titleName.value = `${useStore.user.edustage}-${useStore.user.edusubject}`
|
titleName.value = `${useStore.user.edustage}-${useStore.user.edusubject}`
|
||||||
treeLoading.value = true
|
treeLoading.value = true
|
||||||
|
//存在查看无课程的情况,两秒后关闭loading框
|
||||||
|
setTimeout(() => {
|
||||||
|
treeLoading.value = false
|
||||||
|
},2000)
|
||||||
})
|
})
|
||||||
//监听数据变化
|
//监听数据变化
|
||||||
watch(() => useThird,() => {
|
watch(() => useThird,() => {
|
||||||
|
|
|
@ -34,6 +34,7 @@ const getSubject = (value) => {
|
||||||
const currentIndex = gradeList.findIndex(item => item.value === value)
|
const currentIndex = gradeList.findIndex(item => item.value === value)
|
||||||
getSubjects({stage:value}).then(res => {
|
getSubjects({stage:value}).then(res => {
|
||||||
if(res.code === 200){
|
if(res.code === 200){
|
||||||
|
if(res.data.length === 0) return
|
||||||
subjectList.value = res.data.map(item => {
|
subjectList.value = res.data.map(item => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
|
Loading…
Reference in New Issue