Commit 44e89bd8 by 乔延琦

Merge branch 'develop-zhouyi' into 'develop'

fix: 组件注销问题

See merge request GFP/RBC/rbc-frontend!144
parents 0b0ea426 9742d178
......@@ -193,9 +193,9 @@ export default {
window.GMS.vbus.$on('approval-user-control-add', this.handleAdd)
this.getSuggestionOptions()
},
beforeUnmount() {
window.GMS.vbus.$off('approval-user-control-edit')
window.GMS.vbus.$off('approval-user-control-add')
beforeDestroy() {
window.GMS.vbus.$off('approval-user-control-edit', this.openEditModal)
window.GMS.vbus.$off('approval-user-control-add', this.handleAdd)
},
methods: {
showDeletePopover(suggestion) {
......
......@@ -138,7 +138,7 @@ export default {
}
this.$refs.modal.$el.addEventListener('click', this.stopPropagation)
},
beforeUnmount() {
beforeDestroy() {
this.$refs.modal.$el.removeeventlistener('click', this.stopPropagation)
},
methods: {
......
......@@ -42,18 +42,19 @@ export default {
}
},
mounted() {
window.GMS.vbus.$on('widgetPluginPropertiesChange', (val) => {
if (!val.id || val.id != this.itemSetting.type + this.itemSetting.id) return
val = val.properties || []
this.reimburseList = this.mapProperties(val)
})
window.GMS.vbus.$on('widgetPluginPropertiesChange', this.widgetPluginPropertiesChange)
this.$root.$on('updated', this.refresh)
},
beforeUnmount() {
beforeDestroy() {
this.$root.$off('updated', this.refresh)
window.GMS.vbus.$off('widgetPluginPropertiesChange')
window.GMS.vbus.$off('widgetPluginPropertiesChange', this.widgetPluginPropertiesChange)
},
methods: {
widgetPluginPropertiesChange(val) {
if (!val.id || val.id != this.itemSetting.type + this.itemSetting.id) return
val = val.properties || []
this.reimburseList = this.mapProperties(val)
},
refresh(visible) {
if (visible == 'show') {
const list = [...this.reimburseList]
......
......@@ -44,7 +44,7 @@ export default {
}
this.$root.$on('updated', this.refresh)
},
beforeUnmount() {
beforeDestroy() {
this.$root.$off('updated', this.refresh)
},
methods: {
......
......@@ -110,7 +110,7 @@ export default {
window.GMS.vbus.$on('refresh-workflow-job-view', this.handleSearch)
this.$root.$on('updated', this.handleSearch)
},
beforeUnmount() {
beforeDestroy() {
window.GMS.vbus.$off('refresh-workflow-job-view', this.handleSearch)
this.$root.$off('updated', this.handleSearch)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment