Skip to content

Commit

Permalink
perf(TableDesigner): 修复表格设计器传参Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Jan 8, 2021
1 parent 994429e commit a98e47f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/views/devTools/TableDesignerModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</CrudTable>
<!-- 对话框 -->
<el-dialog v-if="visible" ref="dialog" top="10vh" class="dialog" :visible.sync="visible" width="95%" append-to-body>
<TableDesigner :allTables="allTables" ref="tableDesigner" />
<TableDesigner :formList="formList" :allTables="allTables" ref="tableDesigner" />

<!-- 底部按钮栏 -->
<el-row type="flex" justify="end">
Expand Down Expand Up @@ -53,6 +53,8 @@ export default class TableDesignerModule extends Vue {
allTables = [];
formList = [];
btnSaveIsLoading = false;
formValues = {};
Expand All @@ -64,6 +66,9 @@ export default class TableDesignerModule extends Vue {
value: item.TABLE_NAME,
}));
});
crud(DML.SELECT, 'form').then((res) => {
this.formList = res.data.list;
});
}
// 添加按钮点击事件
Expand Down Expand Up @@ -100,7 +105,9 @@ export default class TableDesignerModule extends Vue {
type = DML.UPDATE;
msg = '编辑成功';
}
tableDesignerJson.name = tableDesignerJson.name || this.formValues.tableName;
tableDesignerJson.position = tableDesignerJson.position || this.formValues.position;
console.log(tableDesignerJson);
crud(type, 'dynamictables', {
...this.formValues,
tableName: tableDesignerJson.name,
Expand Down

0 comments on commit a98e47f

Please sign in to comment.