mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 03:44:48 +00:00
chore: prettier source code
This commit is contained in:
@@ -106,7 +106,7 @@ export default createComponent({
|
||||
if (province && province === city) {
|
||||
arr.splice(1, 1);
|
||||
}
|
||||
return arr.filter(text => text).join('/');
|
||||
return arr.filter((text) => text).join('/');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
@@ -144,9 +144,9 @@ export default createComponent({
|
||||
},
|
||||
|
||||
onAreaConfirm(values) {
|
||||
values = values.filter(value => !!value);
|
||||
values = values.filter((value) => !!value);
|
||||
|
||||
if (values.some(value => !value.code)) {
|
||||
if (values.some((value) => !value.code)) {
|
||||
Toast(t('areaEmpty'));
|
||||
return;
|
||||
}
|
||||
@@ -182,7 +182,7 @@ export default createComponent({
|
||||
items.push('postalCode');
|
||||
}
|
||||
|
||||
const isValid = items.every(item => {
|
||||
const isValid = items.every((item) => {
|
||||
const msg = this.getErrorMessage(item);
|
||||
if (msg) {
|
||||
this.errorInfo[item] = msg;
|
||||
@@ -260,7 +260,7 @@ export default createComponent({
|
||||
|
||||
render() {
|
||||
const { data, errorInfo, searchResult, disableArea } = this;
|
||||
const onFocus = name => () => this.onFocus(name);
|
||||
const onFocus = (name) => () => this.onFocus(name);
|
||||
|
||||
// hide bottom field when use search && detail get focused
|
||||
const hideBottomFields =
|
||||
@@ -313,7 +313,7 @@ export default createComponent({
|
||||
onFocus={onFocus('addressDetail')}
|
||||
onBlur={this.onDetailBlur}
|
||||
onInput={this.onChangeDetail}
|
||||
onSelect-search={event => {
|
||||
onSelect-search={(event) => {
|
||||
this.$emit('select-search', event);
|
||||
}}
|
||||
/>
|
||||
@@ -337,7 +337,7 @@ export default createComponent({
|
||||
vModel={data.isDefault}
|
||||
vShow={!hideBottomFields}
|
||||
title={t('defaultAddress')}
|
||||
onChange={event => {
|
||||
onChange={(event) => {
|
||||
this.$emit('change-default', event);
|
||||
}}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user