airyland / vux

Mobile UI Components based on Vue & WeUI
https://vux.li
MIT License
17.59k stars 3.71k forks source link

[Bug Report] x-address地址选择undefined #3210

Open Hardlygo opened 6 years ago

Hardlygo commented 6 years ago

VUX version

2.9.2

OS/Browsers version

Chrome

Vue version

2.5.2

Code

 <popup  :show-mask="false" :hide-on-blur="false" @on-hide="closeAddrPopup" v-model="showNewAddr" height="100%">

      <div>
        <popup-header @on-click-left="closeAddrPopup()" left-text="取消" right-text="保存" @on-click-right="saveAddr" :title="popupTopTitle"></popup-header>
        <group>
          <x-input title="联系人姓名" name="username" v-model="addrItem.userName" placeholder="请输入联系人姓名" is-type="china-name"></x-input>
          <x-input title="联系人号码" mask="999 9999 9999" name="mobile" v-model="addrItem.cellPhone" :max="13" placeholder="请输入联系人号码" keyboard="number" is-type="china-mobile"></x-input>
        </group>
        <group>
          <x-address title="所在区域"  :raw-value="true" @on-hide="Hide" v-model="addrItem.addressValue" :list="addressData"></x-address>
        </group>
        <group>
          <x-input title="详细地址" type="text" placeholder="请输入详细地址" v-model="addrItem.addrDetail"></x-input>
          <x-switch title="设为默认地址" v-model="addrItem.isDefault"></x-switch>
        </group>
        <x-button v-if="rightLabel=='编辑'" style="margin-top:20px;width:90%;" type="warn" action-type="button" @click.native="deleteAddr">删除该地址</x-button>
      </div>
    </popup>

Steps to reproduce

当新建完第一个地址后,在新建一个 选择地址会保留上次的省区地方 每次新建都已把addrItem.addressValue复位空数组

What is Expected?

把addrItem.addressValue复位空数组时不显示上次选择的区域而显示的是默认开始位置区域

What is actually happening?

当新建完第一个地址后,在新建一个 选择地址会保留上次的省区地方 每次新建都已把addrItem.addressValue复位空数组 tim vux

Hardlygo commented 6 years ago

以为v-model绑定的数组就可以恢复开始的默认状态?倘若不回到,回到的上一次所选的省区县,此时点击完成组件也没有给数组赋值成功?望大神解答,感激不尽