update 优化 代码生成导入下拉框默认值处理

This commit is contained in:
疯狂的狮子Li 2024-11-26 15:29:06 +08:00
parent 3b710d9e99
commit f203716f31

View File

@ -63,14 +63,18 @@ const emit = defineEmits(['ok']);
/** 查询参数列表 */
const show = (dataName: string) => {
getDataNameList();
getDataNames().then(res => {
if (res.code == 200) {
dataNameList.value = res.data;
if (dataName) {
queryParams.dataName = dataName;
} else {
queryParams.dataName = 'master';
queryParams.dataName = dataNameList.value[0];
}
getList();
visible.value = true;
}
});
};
/** 单击选择行 */
const clickRow = (row: DbTableVO) => {
@ -111,11 +115,6 @@ const handleImportTable = async () => {
emit('ok');
}
};
/** 查询多数据源名称 */
const getDataNameList = async () => {
const res = await getDataNames();
dataNameList.value = res.data;
};
defineExpose({
show