From 86bcf06d879774a5653999034e09d6f61d71250b Mon Sep 17 00:00:00 2001 From: 670788339 <670788339@qq.com> Date: Thu, 30 Oct 2025 20:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E8=BE=93=E5=85=A5=E6=A1=86?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E8=B0=83=E6=95=B4=20=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/courseTag.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Course/courseTag.vue b/src/components/Course/courseTag.vue index 71e5e628..eaecdaeb 100644 --- a/src/components/Course/courseTag.vue +++ b/src/components/Course/courseTag.vue @@ -124,6 +124,7 @@ export default { methods: { // 新增:处理输入框获得焦点事件 async handleFocus() { + console.log("-- handleFocus --- " + this.sysTypeList.length) // 当输入框获得焦点时,加载默认的搜索结果 if (this.sysTypeList.length > 0) { await this.doSearch(''); @@ -225,15 +226,17 @@ export default { // this.searchResults = [] // return // } - + console.log("---- doSearch ------ query = " + query ) this.loading = true try { // 获取 typeId:取 sysTypeList 最后一个有效的值 const typeId = this.sysTypeList.length > 2 ? this.sysTypeList[2] : this.sysTypeList.length > 1 ? this.sysTypeList[1] : this.sysTypeList.length > 0 ? this.sysTypeList[0] : null; - + console.log("---- doSearch searchTags ------ query = " + query + " , typeId = " + typeId ) const {result:tags} = await apiCourseTag.searchTags({tagName:query,typeId:typeId}) + console.log("-- searchTags 查询结果 tags = " + tags ) + tags.forEach(item => { this.tagMap.set(item.id, item) })