Explorar o código

收货地址空状态下,去掉取消按钮

wangcz %!s(int64=7) %!d(string=hai) anos
pai
achega
96e108f7c5
Modificáronse 1 ficheiros con 17 adicións e 6 borrados
  1. 17 6
      components/mobile/base/addressEdit.vue

+ 17 - 6
components/mobile/base/addressEdit.vue

@@ -49,8 +49,8 @@
             </ul>
             </ul>
           </div>
           </div>
           <div class="control clearfix">
           <div class="control clearfix">
-            <div class="cancel" @click="storeInfosave('cancel')">取消</div>
-            <div class="save" @click="storeInfosave()">保存</div>
+            <div v-show="!noClose" class="cancel" @click="storeInfosave('cancel')">取消</div>
+            <div class="save" :class="{width100 : noClose}" @click="storeInfosave()">保存</div>
           </div>
           </div>
           <div style="height: 0.2rem;position:relative"></div>
           <div style="height: 0.2rem;position:relative"></div>
         </div>
         </div>
@@ -108,8 +108,7 @@
         isActive: false,
         isActive: false,
         addressShow: false,
         addressShow: false,
         timeoutCount: 0,
         timeoutCount: 0,
-        collectResult: '',
-        noClose: false
+        collectResult: ''
       }
       }
     },
     },
     watch: {
     watch: {
@@ -124,12 +123,21 @@
       }
       }
     },
     },
     mounted () {
     mounted () {
-      let data = this.baseUtils.deepCopy(this.$store.state.mobileAddress.address.data)
-      data && data.content.length > 0 ? this.noClose = false : this.noClose = true
+
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.refleshSc()
         this.refleshSc()
       })
       })
     },
     },
+    computed: {
+      noClose () {
+        let data = this.baseUtils.deepCopy(this.$store.state.mobileAddress.address.data)
+        if (data && data.content.length > 0) {
+          return false
+        } else {
+          return true
+        }
+      }
+    },
     methods: {
     methods: {
       editClick (data) {
       editClick (data) {
         this.$emit('isEditEvent', data || {}, false)
         this.$emit('isEditEvent', data || {}, false)
@@ -209,6 +217,9 @@
       margin: 0.4rem auto 0rem;
       margin: 0.4rem auto 0rem;
       height: .88rem;
       height: .88rem;
       line-height: 0.88rem;
       line-height: 0.88rem;
+      .width100{
+        width: 100% !important;
+      }
       .save {
       .save {
         border-radius: 3px;
         border-radius: 3px;
         width: 48%;
         width: 48%;