Merge pull request #188 from DevDengChao/patch-3

Add parentId and sort fields to formData
pull/831/MERGE
芋道源码 2025-11-22 19:06:20 +08:00 committed by GitHub
commit 4185544cb8
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()