Browse Source

处理地址弹出不能关闭问题

wangcz 7 years ago
parent
commit
18bd8cce13
1 changed files with 14 additions and 12 deletions
  1. 14 12
      components/certification/EnterpriseCertification.vue

+ 14 - 12
components/certification/EnterpriseCertification.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="certification">
+  <div class="certification" @click="onHideBox">
     <div class="container">
       <div class="content" v-show="enterpriseRegister">
         <div class="content-top">
@@ -334,20 +334,22 @@
         }
       },
 //      地址选择
+      onHideBox: function () {
+        this.onHideAddress()
+      },
       onHideAddress () {
-//        if (!this.isShowAddressBox && !this.isClickInputAddress) {
-//          this.showAddressBox = false
-//        }
-//        this.isClickInputAddress = false
+        if (!this.isShowAddressBox && !this.isClickInputAddress) {
+          this.showAddressBox = false
+        }
+        this.isClickInputAddress = false
       },
       onShowAddress () {
-        this.showAddressBox = !this.showAddressBox
-//        if (this.showAddressBox) {
-//          this.onHideAddress()
-//        } else {
-//          this.showAddressBox = true
-//          this.isClickInputAddress = true
-//        }
+        if (this.showAddressBox) {
+          this.onHideAddress()
+        } else {
+          this.showAddressBox = true
+          this.isClickInputAddress = true
+        }
       },
       getCity (province) {
         this.cityData.city = []