refactor:

1.修改表后,刷新表数据
2.修改索引sql拼接bug
3.暂时只有mysql支持编辑表
This commit is contained in:
刘宗洋
2022-10-29 17:11:44 +08:00
parent 422f0d8491
commit 0de226bbf3
3 changed files with 20 additions and 6 deletions

View File

@@ -340,6 +340,7 @@ const submit = async () => {
db: props.db,
runSuccessCallback: () => {
proxy.$parent.openEditTable({ tableName: state.tableData.tableName });
proxy.$parent.refreshTableInfo();
// cancel();
},
});
@@ -507,7 +508,9 @@ const genSql = () => {
}
if (addIndexs.length > 0) {
sql += ','
if (dropIndexNames.length > 0){
sql += ','
}
addIndexs.forEach(a => {
sql += ` ADD ${a.unique ? 'UNIQUE' : ''} INDEX ${a.indexName}(${a.columnNames.join(',')}) USING ${a.indexType} COMMENT '${a.indexComment}',`;
})