Commit 3e05f0ec by Joey

perf: 组件注销

parent 89f2b293
......@@ -2,9 +2,10 @@ import ImageViewModal from '../../../../@rbc/invoice/src/components/image-view-m
export default {
execute: function (bill, param) {
const curbill = bill.dom || bill
GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
const name = GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
c.imageTableName = param.param.tableName
c.bill = curbill
c.componentName = name
})
}
}
\ No newline at end of file
......@@ -2,9 +2,10 @@
import InvoiceModal from '../components-control/invoice-modal.vue'
export default {
execute: function (bill, param) {
GMS.$hideContainer.addComponent(InvoiceModal, {}, function (c) {
const name = GMS.$hideContainer.addComponent(InvoiceModal, {}, function (c) {
c.bill = bill.dom
c.invoiceName = param.param.invoiceName
c.componentName = name
})
}
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ export default {
modalVisible: true,
bill: null,
invoiceName: '',
componentName: null,
}
},
methods: {
......@@ -54,6 +55,7 @@ export default {
}
this.bill.refreshSubDataRow(subBillName)
})
this.componentName && GMS.$hideContainer.remove(this.componentName)
})
}
......
......@@ -8,9 +8,10 @@ export default {
const imageId = context.selects[0][param.imageId]
const yearFlag = context.selects[0][param.yearFlag]
GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
const name = GMS.$hideContainer.addComponent(ImageViewModal, {}, function (c) {
c.yearFlag = yearFlag
c.imageId = imageId
c.componentName = name
})
}
}
\ No newline at end of file
......@@ -52,6 +52,7 @@ export default {
currentImgIndex: 0,
imgUrlSet: new Set(),
imageTableName: null,
componentName: null,
};
},
watch: {
......@@ -64,6 +65,7 @@ export default {
this.bill = null
this.imageId = null
this.yearFlags = []
this.componentName && GMS.$hideContainer.remove(this.componentName)
}
},
imageId(id) {
......
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