Commit 8a06d7e3594c4df4e5b129fc40bffc8d78a468e2
1 parent
afa3e6dc
fix: fileconfig 初始化表單
Showing
1 changed file
with
23 additions
and
1 deletions
yudao-ui-admin-vue3/src/views/infra/fileConfig/index.vue
| ... | ... | @@ -197,7 +197,7 @@ const dialogVisible = ref(false) // 是否显示弹出层 |
| 197 | 197 | const dialogTitle = ref('edit') // 弹出层标题 |
| 198 | 198 | const formRef = ref<FormInstance>() // 表单 Ref |
| 199 | 199 | const detailData = ref() // 详情 Ref |
| 200 | -let form = ref<FileConfigApi.FileConfigVO>({ | |
| 200 | +const form = ref<FileConfigApi.FileConfigVO>({ | |
| 201 | 201 | id: 0, |
| 202 | 202 | name: '', |
| 203 | 203 | storage: 0, |
| ... | ... | @@ -230,6 +230,28 @@ const setDialogTile = (type: string) => { |
| 230 | 230 | const handleCreate = (formEl: FormInstance | undefined) => { |
| 231 | 231 | setDialogTile('create') |
| 232 | 232 | formEl?.resetFields() |
| 233 | + form.value = { | |
| 234 | + id: 0, | |
| 235 | + name: '', | |
| 236 | + storage: 0, | |
| 237 | + master: false, | |
| 238 | + visible: false, | |
| 239 | + config: { | |
| 240 | + basePath: '', | |
| 241 | + host: '', | |
| 242 | + port: 0, | |
| 243 | + username: '', | |
| 244 | + password: '', | |
| 245 | + mode: '', | |
| 246 | + endpoint: '', | |
| 247 | + bucket: '', | |
| 248 | + accessKey: '', | |
| 249 | + accessSecret: '', | |
| 250 | + domain: '' | |
| 251 | + }, | |
| 252 | + remark: '', | |
| 253 | + createTime: new Date() | |
| 254 | + } | |
| 233 | 255 | } |
| 234 | 256 | |
| 235 | 257 | // 修改操作 | ... | ... |