Skip to content

Commit

Permalink
perf: 组件销毁时解绑eventBus
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Nov 20, 2020
1 parent 1523e3a commit 2daa028
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-pro-crud",
"version": "0.2.7",
"version": "0.2.8",
"main": "lib/ProCrud.umd.min.js",
"files": [
"lib",
Expand Down
4 changes: 4 additions & 0 deletions packages/form-designer/src/GenerateFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ export default class GenerateFormItem extends Vue {
this.$emit('selection', selection);
}

beforeDestroy() {
this.$EventBus.$off(`refresh:subTable:${this.widget.model}`);
}

@Watch('dataModel')
dataModelHandler(val) {
this.$set(this.models, this.widget.model, val);
Expand Down

0 comments on commit 2daa028

Please sign in to comment.