chore: improve code style

This commit is contained in:
陈嘉涵
2019-12-16 11:29:59 +08:00
parent a7535cc948
commit 0f4ddbf13f
5 changed files with 42 additions and 21 deletions

View File

@@ -140,10 +140,12 @@ export default createComponent({
onAreaConfirm(values) {
values = values.filter(value => !!value);
if (values.some(value => !value.code)) {
Toast(t('areaEmpty'));
return;
}
this.showAreaPopup = false;
this.assignAreaValues();
this.$emit('change-area', values);
@@ -151,6 +153,7 @@ export default createComponent({
assignAreaValues() {
const { area } = this.$refs;
if (area) {
const detail = area.getArea();
detail.areaCode = detail.code;
@@ -247,7 +250,8 @@ export default createComponent({
const onFocus = name => () => this.onFocus(name);
// hide bottom field when use search && detail get focused
const hideBottomFields = searchResult && searchResult.length && this.detailFocused;
const hideBottomFields =
searchResult && searchResult.length && this.detailFocused;
return (
<div class={bem()}>