|
|
@@ -10,15 +10,16 @@
|
|
|
@open="closeWay = 'self'"
|
|
|
>
|
|
|
<div class="title">
|
|
|
+
|
|
|
<span class="arrow" @click="switchModule" v-if="showModule == 'custom' && type == 'exist' && backBtnIcon">
|
|
|
- <nut-icon type="self" :url="backBtnIcon"></nut-icon>
|
|
|
+ <nut-icon type="self" :url="backBtnIcon"></nut-icon>
|
|
|
</span>
|
|
|
<span class="arrow" v-else></span>
|
|
|
|
|
|
<span v-if="type == 'custom'">{{ customAddressTitle }}</span>
|
|
|
<span v-if="type == 'exist'">{{ existAddressTitle }}</span>
|
|
|
|
|
|
- <span @click="handClose('hand')"><nut-icon v-if="closeBtnIcon" size="18px" type="self" :url="closeBtnIcon"></nut-icon></span>
|
|
|
+ <span @click="handClose('cross')"><nut-icon v-if="closeBtnIcon" size="18px" type="self" :url="closeBtnIcon"></nut-icon></span>
|
|
|
</div>
|
|
|
|
|
|
<!-- 请选择 -->
|
|
|
@@ -281,7 +282,7 @@ export default {
|
|
|
|
|
|
this.handClose();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 关闭
|
|
|
close() {
|
|
|
const that = this;
|
|
|
@@ -307,28 +308,26 @@ export default {
|
|
|
if (this.closeWay == 'self') {
|
|
|
this.$emit('close', res);
|
|
|
} else {
|
|
|
- // this.$emit('close',{type:'hand'})
|
|
|
+
|
|
|
+ this.$emit('closeMask',{'closeWay':this.closeWay});
|
|
|
}
|
|
|
|
|
|
setTimeout(() => {
|
|
|
that.showModule = 'type';
|
|
|
}, 500);
|
|
|
},
|
|
|
- // 手动关闭 点击叉号,或者蒙层
|
|
|
+ // 手动关闭 点击叉号(cross),或者蒙层(mask)
|
|
|
handClose(type = 'self') {
|
|
|
- if(!this.closeBtnIcon) return
|
|
|
|
|
|
- if (type == 'hand') {
|
|
|
- this.closeWay = 'hand';
|
|
|
- } else {
|
|
|
- this.closeWay = 'self';
|
|
|
- }
|
|
|
+ if(!this.closeBtnIcon) return
|
|
|
|
|
|
+ this.closeWay = type == 'cross'?'cross':'self'
|
|
|
+
|
|
|
this.showPopup = false;
|
|
|
},
|
|
|
// 点击遮罩层关闭
|
|
|
clickOverlay() {
|
|
|
- this.closeWay = 'hand';
|
|
|
+ this.closeWay = 'mask';
|
|
|
},
|
|
|
// 初始化
|
|
|
initAddress() {
|
|
|
@@ -340,13 +339,13 @@ export default {
|
|
|
},
|
|
|
// 选择其他地址
|
|
|
switchModule() {
|
|
|
-
|
|
|
+
|
|
|
if(this.showModule == 'exist'){
|
|
|
this.showModule = 'custom'
|
|
|
}else{
|
|
|
this.showModule = 'exist'
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.initAddress();
|
|
|
|
|
|
this.$emit('switchModule', { type: this.showModule });
|