主题
this.unwatch = this.$watch( () => this.comptableDatas, (val) => { if (val && val.length) { this.$nextTick(() => { this.$refs.basetable.setCurrentRow(val[0]) this.getCompProps(val[0], 0) }) // 只执行一次,立刻取消监听 this.unwatch() } }, {immediate: true, deep: false} )