fix: 问题修复

This commit is contained in:
meilin.huang
2024-05-16 17:26:32 +08:00
parent 89e12678eb
commit c4cb4234fd
46 changed files with 416 additions and 262 deletions

View File

@@ -25,6 +25,7 @@ import SvgIcon from '@/components/svgIcon/index.vue';
import { getDbDialect, noSchemaTypes } from '@/views/ops/db/dialect';
import TagTreeResourceSelect from '../../component/TagTreeResourceSelect.vue';
import { computed } from 'vue';
import { DbInst } from '../db';
const props = defineProps({
dbId: {
@@ -101,9 +102,9 @@ const noSchemaType = (type: string) => {
};
// 数据库实例节点类型
const NodeTypeDbInst = new NodeType(SqlExecNodeType.DbInst).withLoadNodesFunc((parentNode: TagTreeNode) => {
const NodeTypeDbInst = new NodeType(SqlExecNodeType.DbInst).withLoadNodesFunc(async (parentNode: TagTreeNode) => {
const params = parentNode.params;
const dbs = params.database.split(' ')?.sort();
const dbs = (await DbInst.getDbNames(params))?.sort();
let fn: NodeType;
if (noSchemaType(params.type)) {
fn = MysqlNodeTypes;