优化导出、导入数据接收问题
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {eventBus} from "@/utils/eventBus"
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
props:{
|
||||
@@ -41,10 +43,16 @@ export default {
|
||||
return{
|
||||
list:[{},{},{}],
|
||||
}
|
||||
},
|
||||
setup(){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
// 获取新消息
|
||||
// this.$socketApi.getSock(this.getWsResult);
|
||||
eventBus.$on('sockBack', this.getWsResult);
|
||||
},
|
||||
unmounted() {
|
||||
eventBus.$off('sockBack', this.getWsResult);
|
||||
},
|
||||
methods:{
|
||||
getWsResult(res){
|
||||
@@ -82,8 +90,6 @@ export default {
|
||||
},
|
||||
exportClick(){
|
||||
this.$emit('exportData');
|
||||
// 获取新消息
|
||||
this.$socketApi.getSock(this.getWsResult);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user