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]