src/views/realtimemode/component/DeviceChange.vue
@@ -33,14 +33,18 @@ } }, watch: { // formSearch(nV, oV) { // if (nV != oV) { // this.handleChange(nV[0].value); // } // } // 当设备编号首次从后端获取时,触发通知事件 ['formSearch.deviceCode'](nV, oV) { if (oV == undefined && nV != oV) { this.handleClick(); } } }, mounted() { this.$emit('change', this.formSearch); // 当设备编号已经从后端获取完成时,直接触发通知事件 if (this.formSearch.deviceCode) { this.handleClick(); } } }; </script>