Browse Source

测试bug修改

yangc 8 years ago
parent
commit
691560eac3
2 changed files with 16 additions and 11 deletions
  1. 15 7
      components/register-saler/register/StepFirst.vue
  2. 1 4
      pages/register-saler/index.vue

+ 15 - 7
components/register-saler/register/StepFirst.vue

@@ -62,7 +62,7 @@
       <div class="row">
         <label class="col-sm-2 x-required">企业地址:</label>
         <div class="col-sm-5">
-          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @focus="onShowAddress" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
           <span class="fa fa-map-marker"></span>
           <div v-show="showAddressBox"
                @mouseenter="isInAddressBox = true"
@@ -150,7 +150,7 @@
       <div class="row">
         <label class="col-sm-2">行业:</label>
         <div class="col-sm-5 select-dot">
-          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @focus="onShowProfession()" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.profession" class="form-control" name="name" required="" placeholder="请选择所在行业">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowProfession()" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.profession" class="form-control" name="name" required="" placeholder="请选择所在行业">
           <div v-show="showProfessionBox"
                @mouseenter="isInProfessionBox = true"
                @mouseleave="isInProfessionBox = false"
@@ -548,7 +548,7 @@
       },
       lawPersonCheck: function () {
         this.validLawPerson.init = false
-        this.validLawPerson.isValidLawPerson = this.data.lawPerson !== ''
+        this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(this.data.lawPerson)
         this.validCheck()
       },
       phoneCheck: function () {
@@ -582,8 +582,12 @@
         this.onHideProfession()
       },
       onShowAddress: function () {
-        this.showAddressBox = true
-        this.isClickInputAddress = true
+        if (this.showAddressBox) {
+          this.onHideAddress()
+        } else {
+          this.showAddressBox = true
+          this.isClickInputAddress = true
+        }
       },
       onHideAddress: function () {
         if (!this.isInAddressBox && !this.isClickInputAddress) {
@@ -592,8 +596,12 @@
         this.isClickInputAddress = false
       },
       onShowProfession: function () {
-        this.showProfessionBox = true
-        this.isClickInputProfession = true
+        if (this.showProfessionBox) {
+          this.onHideProfession()
+        } else {
+          this.showProfessionBox = true
+          this.isClickInputProfession = true
+        }
       },
       onHideProfession: function () {
         if (!this.isInProfessionBox && !this.isClickInputProfession) {

+ 1 - 4
pages/register-saler/index.vue

@@ -276,12 +276,9 @@
   }
   .file-input{
     position: absolute;
-    font-size: 100px;
+    font-size: 14px;
     top: 0;
-    right: 0;
     left: 0;
-    bottom: 0;
-    width: 100%;
     opacity: 0;
   }
   .x-btn-blank i{