diff --git a/src/views/doctor/doctor-introduction/index.vue b/src/views/doctor/doctor-introduction/index.vue index 21ee44c..6754542 100644 --- a/src/views/doctor/doctor-introduction/index.vue +++ b/src/views/doctor/doctor-introduction/index.vue @@ -262,28 +262,28 @@ const rules = reactive({ avatar_reason: [ { validator: (value, cb) => { - if (value.length>20) { + if (value && value.length>20) { cb('头像理由不能超过20个字符'); } } }], doctor_expertise_reason: [ { validator: (value, cb) => { - if (value.length>20) { + if (value && value.length>20) { cb('专长理由不能超过20个字符'); } } }], brief_introduction_reason: [ { validator: (value, cb) => { - if (value.length>20) { + if (value && value.length>20) { cb('简介理由不能超过20个字符'); } } }], be_good_at_reason: [ { validator: (value, cb) => { - if (value.length>20) { + if (value && value.length>20) { cb('擅长理由不能超过20个字符'); } }