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,7 +197,7 @@ const dialogVisible = ref(false) // 是否显示弹出层 | ||
| 197 | const dialogTitle = ref('edit') // 弹出层标题 | 197 | const dialogTitle = ref('edit') // 弹出层标题 |
| 198 | const formRef = ref<FormInstance>() // 表单 Ref | 198 | const formRef = ref<FormInstance>() // 表单 Ref |
| 199 | const detailData = ref() // 详情 Ref | 199 | const detailData = ref() // 详情 Ref |
| 200 | -let form = ref<FileConfigApi.FileConfigVO>({ | 200 | +const form = ref<FileConfigApi.FileConfigVO>({ |
| 201 | id: 0, | 201 | id: 0, |
| 202 | name: '', | 202 | name: '', |
| 203 | storage: 0, | 203 | storage: 0, |
| @@ -230,6 +230,28 @@ const setDialogTile = (type: string) => { | @@ -230,6 +230,28 @@ const setDialogTile = (type: string) => { | ||
| 230 | const handleCreate = (formEl: FormInstance | undefined) => { | 230 | const handleCreate = (formEl: FormInstance | undefined) => { |
| 231 | setDialogTile('create') | 231 | setDialogTile('create') |
| 232 | formEl?.resetFields() | 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 | // 修改操作 |