+ 初始化时请先设置getTables方法 +
+ @@ -370,7 +380,7 @@ export default { success: [], }, // 数据库所有表 - allTables: [], + allTables: null, }; }, methods: { @@ -571,11 +581,16 @@ export default { // 初始化右侧的配置区域 this.widgetFormSelect = ''; // 请求数据库所有表名 - const { data } = await this.$PROCRUD.getTables(); - this.allTables = data; + if (this.$PROCRUD.getTables) { + const { data } = await this.$PROCRUD.getTables(); + this.allTables = data; + } + // 请求对话框内的动态表单json - const res = await this.$PROCRUD.getFormDetail('dynamictables'); - this.formDesign = JSON.parse(res.data.formJson); + if (this.$PROCRUD.getFormDetail) { + const res = await this.$PROCRUD.getFormDetail('dynamictables'); + this.formDesign = JSON.parse(res.data.formJson); + } this.visible = true; }, // 保存设计 @@ -700,7 +715,4 @@ export default { .form { margin-top: 6px; } -.form >>> .dev-module{ - display: none!important; -} diff --git a/packages/form-designer/src/GenerateForm.vue b/packages/form-designer/src/GenerateForm.vue index 2de47a9..c02fe69 100644 --- a/packages/form-designer/src/GenerateForm.vue +++ b/packages/form-designer/src/GenerateForm.vue @@ -11,7 +11,7 @@