🐛 修复 file 在 IDEA 报错的问题

This commit is contained in:
YunaiV 2023-12-03 10:34:08 +08:00
parent aecc9bb8cb
commit 85fe4ad8d6
3 changed files with 8 additions and 6 deletions

View File

@ -17,7 +17,7 @@ export interface FileClientConfig {
export interface FileConfigVO {
id: number
name: string
storage: any
storage?: number
master: boolean
visible: boolean
config: FileClientConfig

View File

@ -110,6 +110,7 @@ const queryParams = reactive({
pageSize: 10,
name: undefined,
type: undefined,
path: undefined,
createTime: []
})
const queryFormRef = ref() //

View File

@ -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()
}