@@ -27,6 +27,9 @@ const components = {
//表单渲染
export default class HTableForm {
+
+ static tableFormApp = null
static createForm({template, tableForm, keys, appId, onRight, onBlur, onLeftClick}) {
const _this = this;
const app = createApp({
@@ -133,6 +136,7 @@ export default class HTableForm {
}
})
app.mount(appId)
+ this.tableFormApp = app
return app
@@ -300,4 +304,12 @@ export default class HTableForm {
+ //卸载示例
+ static unmountFormApp() {
+ if (this.tableFormApp) {
+ this.tableFormApp?.unmount()
+ this.tableFormApp = null
+ }