Explorar o código

!1 bug修复,同步dictTypeValue到form 否则导致表单验证不通过
Merge pull request !1 from yan xiaonan/master

芋道源码 %!s(int64=2) %!d(string=hai) anos
pai
achega
f71e74923c
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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
 }
 
+// 同步dictTypeValue到form 否则导致表单验证不通过
+watch(dictTypeValue, (val) => {
+  unref(typeFormRef)?.setValues({ type: val })
+})
+
 // 提交按钮
 const submitTypeForm = async () => {
   const elForm = unref(typeFormRef)?.getElFormRef()