mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: bug fix
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user