Browse Source

基础form 组件修改 编辑操作

master
陈薪名 1 year ago
parent
commit
d7520e7ac7
  1. 15
      src/components/BasicForm/src/BasicForm.vue

15
src/components/BasicForm/src/BasicForm.vue

@ -218,7 +218,9 @@ const submitForm = async () => {
const valid = await elForm.validate()
if (!valid) return
//
if (props.isBusiness && formType.value == 'create') {
if (props.isBusiness) {
formLoading.value = true
if (formType.value == 'create') {
const validateForm = await tableFormRef.value.validateForm()
if (!validateForm) {
if (props.tableData.length == 0) {
@ -228,13 +230,18 @@ const submitForm = async () => {
return
}
//
formLoading.value = true
try {
const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data )
// dialogVisible.value = false
} finally {
// formLoading.value = false
}
} else {
//
try {
const data = unref(formRef)?.formModel
emit('submitForm', formType.value, data )
} finally {
}
}
} else {
//

Loading…
Cancel
Save