Commit 3e05f0ec by Joey

perf: 组件注销

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