🐛 修复 file 在 IDEA 报错的问题
This commit is contained in:
parent
aecc9bb8cb
commit
85fe4ad8d6
@ -17,7 +17,7 @@ export interface FileClientConfig {
|
||||
export interface FileConfigVO {
|
||||
id: number
|
||||
name: string
|
||||
storage: any
|
||||
storage?: number
|
||||
master: boolean
|
||||
visible: boolean
|
||||
config: FileClientConfig
|
||||
|
@ -110,6 +110,7 @@ const queryParams = reactive({
|
||||
pageSize: 10,
|
||||
name: undefined,
|
||||
type: undefined,
|
||||
path: undefined,
|
||||
createTime: []
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
@ -101,6 +101,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
|
||||
import * as FileConfigApi from '@/api/infra/fileConfig'
|
||||
import { FormRules } from 'element-plus'
|
||||
|
||||
defineOptions({ name: 'InfraFileConfigForm' })
|
||||
|
||||
@ -116,9 +117,9 @@ const formData = ref({
|
||||
name: '',
|
||||
storage: 0,
|
||||
remark: '',
|
||||
config: {}
|
||||
config: {} as FileConfigApi.FileClientConfig
|
||||
})
|
||||
const formRules = reactive({
|
||||
const formRules = reactive<FormRules>({
|
||||
name: [{ required: true, message: '配置名不能为空', trigger: 'blur' }],
|
||||
storage: [{ required: true, message: '存储器不能为空', trigger: 'change' }],
|
||||
config: {
|
||||
@ -133,7 +134,7 @@ const formRules = reactive({
|
||||
accessKey: [{ required: true, message: 'accessKey 不能为空', trigger: 'blur' }],
|
||||
accessSecret: [{ required: true, message: 'accessSecret 不能为空', trigger: 'blur' }],
|
||||
domain: [{ required: true, message: '自定义域名不能为空', trigger: 'blur' }]
|
||||
}
|
||||
} as FormRules
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
@ -186,9 +187,9 @@ const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
name: '',
|
||||
storage: 0,
|
||||
storage: undefined!,
|
||||
remark: '',
|
||||
config: {}
|
||||
config: {} as FileConfigApi.FileClientConfig
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user