From b882a9bc37c732cf15d1ee1a755e02d9c087f8c3 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Tue, 21 Dec 2021 15:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=85=A5=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AE=80=E4=BB=8B=E6=97=B6,=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=BD=93=E5=89=8D=E7=9A=84=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=A0=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/Introduce.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/views/data/Introduce.vue b/src/views/data/Introduce.vue index 449561c..cb3d6bd 100644 --- a/src/views/data/Introduce.vue +++ b/src/views/data/Introduce.vue @@ -2,7 +2,7 @@
- + @@ -101,6 +101,7 @@ export default { }) } handleId(res) + console.log(res) this.typeList = res // 取首个的id和简介 @@ -109,22 +110,28 @@ export default { let item = res[0].children[0] this.categoryId = item.id this.dataSource = res[0].children[0].dataSource - this.defaultActive = [item.id] + this.defaultActive = [res[0].children[0].id] + // this.defaultActive = [item.id] this.introduceText = item.introduce this.introduce = item.introduce }else{ this.categoryId = res[0].id this.dataSource = res[0].dataSource - this.defaultActive = [res[0].id] + this.defaultActive = [res[0].children[0].id] + // this.defaultActive = [res[0].id] this.introduceText = res[0].introduce this.introduce = res[0].introduce } + this.$nextTick(() => { + this.$refs.type.setCurrentKey(this.categoryId) + }) } this.getKeyword() }).catch(res => {}) }, // 分类点击 typeClick(data,node){ + console.log(data) this.editing = false this.categoryId = data.id this.defaultActive = [data.id]