mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
!18 bug修复
Merge pull request !18 from zongyangleo/dev_upstream_fix_20221102
This commit is contained in:
@@ -128,7 +128,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch, toRefs, reactive, ref, getCurrentInstance } from 'vue';
|
import { watch, toRefs, reactive, ref } from 'vue';
|
||||||
import { TYPE_LIST, CHARACTER_SET_NAME_LIST, COLLATION_SUFFIX_LIST } from './service.ts';
|
import { TYPE_LIST, CHARACTER_SET_NAME_LIST, COLLATION_SUFFIX_LIST } from './service.ts';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import SqlExecBox from './component/SqlExecBox.ts';
|
import SqlExecBox from './component/SqlExecBox.ts';
|
||||||
@@ -152,11 +152,9 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
|
|
||||||
//定义事件
|
//定义事件
|
||||||
const emit = defineEmits(['update:visible', 'cancel', 'val-change'])
|
const emit = defineEmits(['update:visible', 'cancel', 'val-change', 'submit-sql'])
|
||||||
|
|
||||||
const formRef: any = ref();
|
const formRef: any = ref();
|
||||||
const { proxy } = getCurrentInstance() as any;
|
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
btnloading: false,
|
btnloading: false,
|
||||||
@@ -339,8 +337,7 @@ const submit = async () => {
|
|||||||
dbId: props.dbId as any,
|
dbId: props.dbId as any,
|
||||||
db: props.db,
|
db: props.db,
|
||||||
runSuccessCallback: () => {
|
runSuccessCallback: () => {
|
||||||
proxy.$parent.openEditTable({ tableName: state.tableData.tableName });
|
emit('submit-sql', {tableName: state.tableData.tableName });
|
||||||
proxy.$parent.refreshTableInfo();
|
|
||||||
// cancel();
|
// cancel();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -244,8 +244,13 @@
|
|||||||
|
|
||||||
<db-edit @val-change="valChange" :title="dbEditDialog.title" v-model:visible="dbEditDialog.visible"
|
<db-edit @val-change="valChange" :title="dbEditDialog.title" v-model:visible="dbEditDialog.visible"
|
||||||
v-model:db="dbEditDialog.data"></db-edit>
|
v-model:db="dbEditDialog.data"></db-edit>
|
||||||
<create-table :title="tableCreateDialog.title" :active-name="tableCreateDialog.activeName" :dbId="dbId" :db="db"
|
<create-table :title="tableCreateDialog.title"
|
||||||
:data="tableCreateDialog.data" v-model:visible="tableCreateDialog.visible"></create-table>
|
:active-name="tableCreateDialog.activeName"
|
||||||
|
:dbId="dbId" :db="db"
|
||||||
|
:data="tableCreateDialog.data"
|
||||||
|
v-model:visible="tableCreateDialog.visible"
|
||||||
|
@submit-sql="onSubmitSql"
|
||||||
|
></create-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -586,10 +591,9 @@ const showTableInfo = async (row: any, db: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 给子组件调用,勿删
|
const onSubmitSql = async (row: {tableName: string}) => {
|
||||||
// eslint-disable-next-line no-unused-vars
|
await openEditTable(row)
|
||||||
const refreshTableInfo = async () => {
|
state.tableInfoDialog.infos = await dbApi.tableInfos.request({ id: state.dbId, db: state.db });
|
||||||
state.tableInfoDialog.infos = await dbApi.tableInfos.request({ id: state.dbId, db: state.db });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const closeTableInfo = () => {
|
const closeTableInfo = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user