File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,6 @@ import type { FormField } from '@/components/dynamics-form/type'
134
134
import DynamicsForm from ' @/components/dynamics-form/index.vue'
135
135
import type { FormRules } from ' element-plus'
136
136
import { MsgSuccess } from ' @/utils/message'
137
- import { QuestionFilled } from ' @element-plus/icons-vue'
138
137
139
138
const providerValue = ref <Provider >()
140
139
const dynamicsFormRef = ref <InstanceType <typeof DynamicsForm >>()
@@ -214,6 +213,7 @@ const list_base_model = (model_type: any) => {
214
213
const close = () => {
215
214
base_form_data .value = { name: ' ' , model_type: ' ' , model_name: ' ' }
216
215
credential_form_data .value = {}
216
+ model_form_field .value = []
217
217
dialogVisible .value = false
218
218
}
219
219
const submit = () => {
Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ import type { FormField } from '@/components/dynamics-form/type'
128
128
import DynamicsForm from ' @/components/dynamics-form/index.vue'
129
129
import type { FormRules } from ' element-plus'
130
130
import { MsgSuccess } from ' @/utils/message'
131
- import { QuestionFilled } from ' @element-plus/icons-vue'
132
131
import AppIcon from ' @/components/icons/AppIcon.vue'
133
132
134
133
const providerValue = ref <Provider >()
@@ -218,6 +217,7 @@ const close = () => {
218
217
base_form_data .value = { name: ' ' , model_type: ' ' , model_name: ' ' }
219
218
dynamicsFormRef .value ?.ruleFormRef ?.resetFields ()
220
219
credential_form_data .value = {}
220
+ model_form_field .value = []
221
221
dialogVisible .value = false
222
222
}
223
223
Original file line number Diff line number Diff line change 70
70
ref =" createModelRef"
71
71
@submit =" list_model"
72
72
@change =" openCreateModel($event)"
73
- :key =" dialogState.createModelDialogKey"
74
73
></CreateModelDialog >
75
74
76
75
<SelectProviderDialog
81
80
</template >
82
81
83
82
<script lang="ts" setup>
84
- import { ElMessage } from ' element-plus'
85
- import { onMounted , ref , computed , reactive } from ' vue'
83
+ import { onMounted , ref , computed } from ' vue'
86
84
import ModelApi from ' @/api/model'
87
85
import type { Provider , Model } from ' @/api/type/model'
88
86
import AppIcon from ' @/components/icons/AppIcon.vue'
@@ -129,7 +127,6 @@ const openCreateModel = (provider?: Provider) => {
129
127
createModelRef .value ?.open (provider )
130
128
} else {
131
129
selectProviderRef .value ?.open ()
132
- refreshCreateModelDialogKey () // 更新key
133
130
}
134
131
}
135
132
@@ -140,16 +137,6 @@ const list_model = () => {
140
137
})
141
138
}
142
139
143
- // 添加一个响应式的state来存储dialog的key
144
- const dialogState = reactive ({
145
- createModelDialogKey: Date .now () // 初始值为当前的时间戳
146
- })
147
-
148
- // 更新dialogState.createModelDialogKey的函数
149
- const refreshCreateModelDialogKey = () => {
150
- dialogState .createModelDialogKey = Date .now () // 更新为新的时间戳
151
- }
152
-
153
140
onMounted (() => {
154
141
ModelApi .getProvider (loading ).then ((ok ) => {
155
142
active_provider .value = allObj
You can’t perform that action at this time.
0 commit comments