mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-25 06:57:12 +08:00
fix: 代码生成配置表单校验错误自动跳转回错误 tab
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
@before-ok="save"
|
@before-ok="save"
|
||||||
@close="reset"
|
@close="reset"
|
||||||
>
|
>
|
||||||
<a-tabs>
|
<a-tabs v-model:active-key="activeKey">
|
||||||
<a-tab-pane key="1" title="生成配置">
|
<a-tab-pane key="1" title="生成配置">
|
||||||
<a-form ref="formRef" :model="form" :rules="rules" class="gen-config" size="large">
|
<a-form ref="formRef" :model="form" :rules="rules" class="gen-config" size="large">
|
||||||
<a-form-item label="作者名称" field="author">
|
<a-form-item label="作者名称" field="author">
|
||||||
@@ -194,11 +194,15 @@ const handleRefresh = async (tableName: string) => {
|
|||||||
await getDataList(tableName, true)
|
await getDataList(tableName, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const activeKey = ref('1')
|
||||||
// 保存
|
// 保存
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
try {
|
try {
|
||||||
const isInvalid = await formRef.value?.validate()
|
const isInvalid = await formRef.value?.validate()
|
||||||
if (isInvalid) return false
|
if (isInvalid) {
|
||||||
|
activeKey.value = '1'
|
||||||
|
return false
|
||||||
|
}
|
||||||
await saveGenConfig(form.tableName, {
|
await saveGenConfig(form.tableName, {
|
||||||
genConfig: form,
|
genConfig: form,
|
||||||
fieldConfigs: dataList.value
|
fieldConfigs: dataList.value
|
||||||
|
Reference in New Issue
Block a user