|
@@ -54,10 +54,12 @@ type Props = {
|
|
|
let cur_processForm_str = '{}'
|
|
|
|
|
|
const updateModelValue = (bool: boolean) => emit('update:modelValue', bool)
|
|
|
+const refreshComponent = (bool: boolean) => emit('refreshEv', bool)
|
|
|
const props = defineProps<Props>()
|
|
|
const emit = defineEmits<{
|
|
|
'update:modelValue': [bool: boolean] // 具名元组语法
|
|
|
update: [value: string]
|
|
|
+ refreshEv: [value: boolean] // 告诉父组件刷新
|
|
|
}>()
|
|
|
const validateForm = ref({ loading: false })
|
|
|
|
|
@@ -138,6 +140,7 @@ const onSubmit = async () => {
|
|
|
.then(res => {
|
|
|
ElMessage.success('提交成功')
|
|
|
updateModelValue(false)
|
|
|
+ refreshComponent(true)
|
|
|
})
|
|
|
.finally(() => {
|
|
|
validateForm.value.loading = false
|