Commit 9a602b3a authored by 郭铭瑶's avatar 郭铭瑶 🤘

修改

parent 8067f8f4
...@@ -735,7 +735,10 @@ const rules = { ...@@ -735,7 +735,10 @@ const rules = {
targetSubjectId: [ targetSubjectId: [
{ {
validator(_, value) { validator(_, value) {
return value && value !== subjectData.value.sourceSubjectId if (value === null || value === undefined) {
return true
}
return value !== subjectData.value.sourceSubjectId
}, },
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
message: '目标要素不能与源要素相同', message: '目标要素不能与源要素相同',
...@@ -744,7 +747,10 @@ const rules = { ...@@ -744,7 +747,10 @@ const rules = {
sourceSubjectId: [ sourceSubjectId: [
{ {
validator(_, value) { validator(_, value) {
return value && value !== subjectData.value.targetSubjectId if (value === null || value === undefined) {
return true
}
return value !== subjectData.value.targetSubjectId
}, },
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
message: '源要素不能与目标要素相同', message: '源要素不能与目标要素相同',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment