Pārlūkot izejas kodu

bug修复,同步dictTypeValue到form 否则导致表单验证不通过

Signed-off-by: yan xiaonan <549250640@qq.com>
yan xiaonan 2 gadi atpakaļ
vecāks
revīzija
ede4eb0aee
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/views/system/dict/index.vue

+ 5 - 0
src/views/system/dict/index.vue

@@ -197,6 +197,11 @@ const setDialogTile = (type: string) => {
   dialogVisible.value = true
   dialogVisible.value = true
 }
 }
 
 
+// 同步dictTypeValue到form 否则导致表单验证不通过
+watch(dictTypeValue, (val) => {
+  unref(typeFormRef)?.setValues({ type: val })
+})
+
 // 提交按钮
 // 提交按钮
 const submitTypeForm = async () => {
 const submitTypeForm = async () => {
   const elForm = unref(typeFormRef)?.getElFormRef()
   const elForm = unref(typeFormRef)?.getElFormRef()