Commit af9f585f authored by 郭铭瑶's avatar 郭铭瑶 🤘

源要素目标要素判断修改

parent ba70837e
...@@ -733,7 +733,7 @@ const rules = { ...@@ -733,7 +733,7 @@ const rules = {
targetSubjectId: [ targetSubjectId: [
{ {
validator(_, value) { validator(_, value) {
return value !== subjectData.value.sourceSubjectId return value && value !== subjectData.value.sourceSubjectId
}, },
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
message: '目标要素不能与源要素相同', message: '目标要素不能与源要素相同',
...@@ -742,7 +742,7 @@ const rules = { ...@@ -742,7 +742,7 @@ const rules = {
sourceSubjectId: [ sourceSubjectId: [
{ {
validator(_, value) { validator(_, value) {
return value !== subjectData.value.targetSubjectId return value && 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