fix: bug fix

This commit is contained in:
dataeaseShu
2025-07-30 15:50:47 +08:00
parent 4542774b46
commit 955f2d0878
2 changed files with 10 additions and 5 deletions
+5 -1
View File
@@ -77,6 +77,10 @@ const handleDefaultDatasourceChange = (item: any) => {
}
}
const changeActiveStep = (val: number) => {
activeStep.value = val > 2 ? 2 : val
}
const formatKeywords = (item: string) => {
if (!defaultDatasourceKeywords.value) return item
return item.replaceAll(
@@ -359,7 +363,7 @@ const back = () => {
:active-type="activeType"
@refresh="refresh"
@close="beforeClose"
@change-active-step="(val: number) => (activeStep = val)"
@change-active-step="changeActiveStep"
></DatasourceForm>
</el-drawer>
</div>
+5 -4
View File
@@ -9,6 +9,7 @@ import { ElMessage } from 'element-plus-secondary'
import type { FormInstance, FormRules } from 'element-plus-secondary'
import icon_form_outlined from '@/assets/svg/icon_form_outlined.svg'
import FixedSizeList from 'element-plus-secondary/es/components/virtual-list/src/components/fixed-size-list.mjs'
import { debounce } from 'lodash-es'
import { Plus } from '@element-plus/icons-vue'
import { useCache } from '@/utils/useCache'
import { haveSchema } from '@/views/ds/js/ds-type'
@@ -339,7 +340,7 @@ const check = () => {
onBeforeUnmount(() => (saveLoading.value = false))
const next = async (formEl: FormInstance | undefined) => {
const next = debounce(async (formEl: FormInstance | undefined) => {
if (!formEl) return
await formEl.validate((valid) => {
if (valid) {
@@ -369,11 +370,11 @@ const next = async (formEl: FormInstance | undefined) => {
}
}
})
}
}, 300)
const preview = () => {
const preview = debounce(() => {
emit('changeActiveStep', props.activeStep - 1)
}
}, 200)
const beforeUpload = (rawFile: any) => {
setFile(rawFile)