mirror of
https://gitee.com/yudaocode/yudao-ui-admin-vue3.git
synced 2025-12-30 09:32:26 +00:00
Merge pull request #188 from DevDengChao/patch-3
Add parentId and sort fields to formData
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user