mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-02 07:20:24 +08:00
feat: 小功能优化&前端基于setup语法糖重构
This commit is contained in:
@@ -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 = '创建表'
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user