src/components/selectName/index.vue
@@ -30,10 +30,16 @@ created () { this.currentTitle = this.value }, watch:{ value: { handler (newName, oldName) { this.currentTitle = newName } } }, methods: { currentClick (item, index) { // 触发Student组件实例身上的atguigu事件 this.$emit('selectItem', item, index) if (this.currentIndex == index) { this.listFlag = false