@xtdev/xt-miniprogram-ui 1.2.50 → 1.2.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,6 +79,7 @@ Component({
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
data: {
|
|
82
|
+
show: false,
|
|
82
83
|
years: [], // 年份数组
|
|
83
84
|
months: [], // 月份数组
|
|
84
85
|
days: [], // 天份数组
|
|
@@ -378,6 +379,12 @@ Component({
|
|
|
378
379
|
dateArr
|
|
379
380
|
})
|
|
380
381
|
},
|
|
382
|
+
// 关闭选择器
|
|
383
|
+
onClose() {
|
|
384
|
+
this.onReset();
|
|
385
|
+
this.setData({ show: false });
|
|
386
|
+
this.triggerEvent("onClose", {});
|
|
387
|
+
},
|
|
381
388
|
// 重置时间
|
|
382
389
|
onReset() {
|
|
383
390
|
this.initPickerArr();
|
|
@@ -404,6 +411,7 @@ Component({
|
|
|
404
411
|
endDateValue: '',
|
|
405
412
|
})
|
|
406
413
|
}
|
|
414
|
+
this.triggerEvent("onReset", {});
|
|
407
415
|
},
|
|
408
416
|
// 确认选择时间
|
|
409
417
|
onConfirm() {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<!-- 顶部标题+关闭按钮 -->
|
|
5
5
|
<view class="xt-popup-head">
|
|
6
6
|
<view class="xt-popup-head-text">{{title}}</view>
|
|
7
|
-
<xt-icon icon="shibai-xiao" class="shibai-xiao" size="48"/>
|
|
7
|
+
<xt-icon catchtap="onClose" icon="shibai-xiao" class="shibai-xiao" size="48"/>
|
|
8
8
|
</view>
|
|
9
9
|
<!-- 分割线 -->
|
|
10
10
|
<view class="head-border"></view>
|
|
@@ -615,11 +615,13 @@ Component({
|
|
|
615
615
|
endDateValue: ''
|
|
616
616
|
})
|
|
617
617
|
}
|
|
618
|
+
this.triggerEvent("onReset", {});
|
|
618
619
|
},
|
|
619
620
|
// 关闭选择器
|
|
620
621
|
onClose() {
|
|
621
622
|
this.onReset();
|
|
622
623
|
this.setData({ show: false });
|
|
624
|
+
this.triggerEvent("onClose", {});
|
|
623
625
|
},
|
|
624
626
|
// 确认选择时间
|
|
625
627
|
onConfirm() {
|