Add parentId and sort fields to formData

pull/831/MERGE
邓超 2025-11-19 15:50:19 +08:00 committed by GitHub
parent 6b28dba11b
commit 0944d4c82e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -62,8 +62,10 @@ const formLoading = ref(false) // 表单的加载中1修改时的数据加
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
parentId: 0, // root parent id
name: '',
picUrl: '',
sort: 0,
status: CommonStatusEnum.ENABLE
})
const formRules = reactive({
@ -126,8 +128,10 @@ const submitForm = async () => {
const resetForm = () => {
formData.value = {
id: undefined,
parentId: 0, // root parent id
name: '',
picUrl: '',
sort: 0,
status: CommonStatusEnum.ENABLE
}
formRef.value?.resetFields()