feat: 小功能优化&前端基于setup语法糖重构

This commit is contained in:
meilin.huang
2022-10-29 20:08:15 +08:00
committed by 刘宗洋
parent 553208ba57
commit c8d091da06
2 changed files with 7 additions and 7 deletions

View File

@@ -690,7 +690,7 @@ const openEditTable = async (row: any) => {
state.tableCreateDialog.activeName = '1'
if(row === false){
state.tableCreateDialog.data = {edit: false, row: {}, indexs: [], columns: [] }
state.tableCreateDialog.data = { edit: false, row: {}, indexs: [], columns: [] }
state.tableCreateDialog.title = '创建表'
}

View File

@@ -251,8 +251,8 @@
</template>
<script lang="ts" setup>
import {onMounted, reactive, ref, toRefs, watch} from 'vue';
import {dbApi} from './api';
import { onMounted, toRefs, reactive, ref, watch } from 'vue';
import { dbApi } from './api';
import {format as sqlFormatter} from 'sql-formatter';
import {isTrue, notBlank, notEmpty} from '@/common/assert';
@@ -358,8 +358,8 @@ const state = reactive({
},
genSqlDialog: {
visible: false,
sql: ''
},
sql: '',
},
monacoOptions: {
editor: {} as editor.IStandaloneCodeEditor,
height: '',
@@ -1010,10 +1010,10 @@ const changeDb = async (db: string) => {
// 加载数据库下所有表
state.tableMetadata = await loadTableMetadata(db)
// 加载数据库下所有表字段信息
state.monacoOptions.dbTables[db] = cmOptions.hintOptions.tables = await loadHintTables(db)
getSqlNames();
};