mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Improvement] AddressEdit: trim empty value (#1150)
This commit is contained in:
parent
2fe25a288f
commit
aa89f1a26c
@ -251,7 +251,7 @@ export default create({
|
||||
},
|
||||
|
||||
getErrorMessageByKey(key) {
|
||||
const value = this.data[key];
|
||||
const value = this.data[key].trim();
|
||||
const { $t } = this;
|
||||
|
||||
switch (key) {
|
||||
|
@ -81,7 +81,7 @@ export default create({
|
||||
},
|
||||
|
||||
getErrorMessageByKey(key) {
|
||||
const value = this.data[key];
|
||||
const value = this.data[key].trim();
|
||||
switch (key) {
|
||||
case 'name':
|
||||
return value ? value.length <= 15 ? '' : this.$t('nameOverlimit') : this.$t('nameEmpty');
|
||||
|
Loading…
x
Reference in New Issue
Block a user