@xtdev/xt-miniprogram-ui 1.2.49 → 1.2.50
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.
|
@@ -93,7 +93,6 @@ Component({
|
|
|
93
93
|
endDateStr: '', // 结束日期字符
|
|
94
94
|
defaultDate: '', // 默认日期(组件接收的|当前时间)
|
|
95
95
|
checkedType: 'start', // 当前选择的日期类型
|
|
96
|
-
clickedEnd: false, // 点击结束时间
|
|
97
96
|
filtType: 'dateRange', // 选择器模式
|
|
98
97
|
typeEnums: {
|
|
99
98
|
date: '按日筛选',
|
|
@@ -346,10 +345,8 @@ Component({
|
|
|
346
345
|
// 切换日期类型
|
|
347
346
|
switchDateType(e) {
|
|
348
347
|
const checkedType = e.currentTarget.dataset.type;
|
|
349
|
-
const { data: { clickedEnd } } = this;
|
|
350
348
|
this.setData({
|
|
351
349
|
checkedType,
|
|
352
|
-
clickedEnd: checkedType === 'end' ? true : clickedEnd
|
|
353
350
|
});
|
|
354
351
|
this.showCheckedPicker();
|
|
355
352
|
},
|
|
@@ -405,7 +402,6 @@ Component({
|
|
|
405
402
|
endDateArr: [],
|
|
406
403
|
endDateStr: '',
|
|
407
404
|
endDateValue: '',
|
|
408
|
-
clickedEnd: false
|
|
409
405
|
})
|
|
410
406
|
}
|
|
411
407
|
},
|
|
@@ -17,10 +17,12 @@
|
|
|
17
17
|
<view class="date-sel">
|
|
18
18
|
<view wx:if="{{filtType === 'date'}}" class="sel-sigle actived">{{dateStr}}</view>
|
|
19
19
|
<view wx:else class="sel-range">
|
|
20
|
-
<view catchtap="switchDateType" data-type="start" class="sel-start
|
|
20
|
+
<view catchtap="switchDateType" data-type="start" class="sel-start {{checkedType == 'start' ? 'actived' : ''}}">
|
|
21
|
+
{{startDateStr}}
|
|
22
|
+
</view>
|
|
21
23
|
<view>至</view>
|
|
22
|
-
<view catchtap="switchDateType" data-type="end" class="sel-end {{
|
|
23
|
-
{{
|
|
24
|
+
<view catchtap="switchDateType" data-type="end" class="sel-end {{checkedType == 'end' ? 'actived' : ''}}">
|
|
25
|
+
{{ endDateStr || '结束时间'}}
|
|
24
26
|
</view>
|
|
25
27
|
</view>
|
|
26
28
|
</view>
|
|
@@ -107,7 +107,6 @@ Component({
|
|
|
107
107
|
endDateStr: "", // 结束日期字符
|
|
108
108
|
defaultDate: "", // 默认日期(组件接收的|当前时间)
|
|
109
109
|
checkedType: "start", // 当前选择的日期类型
|
|
110
|
-
clickedEnd: false, // 点击结束时间
|
|
111
110
|
filtType: "dateRange", // 选择器模式
|
|
112
111
|
btnDisabled: false, // 按钮禁用
|
|
113
112
|
newDaysArr: [], // 新的天数数组列表,储存拖动之后的天数数组值,用于拖动结束后更新
|
|
@@ -551,12 +550,8 @@ Component({
|
|
|
551
550
|
// 切换日期类型
|
|
552
551
|
switchDateType(e) {
|
|
553
552
|
const checkedType = e.currentTarget.dataset.type;
|
|
554
|
-
const {
|
|
555
|
-
data: { clickedEnd },
|
|
556
|
-
} = this;
|
|
557
553
|
this.setData({
|
|
558
554
|
checkedType,
|
|
559
|
-
clickedEnd: checkedType === "end" ? true : clickedEnd,
|
|
560
555
|
});
|
|
561
556
|
this.showCheckedPicker();
|
|
562
557
|
},
|
|
@@ -617,8 +612,7 @@ Component({
|
|
|
617
612
|
startDateStr: resetDateStr,
|
|
618
613
|
endDateArr: [],
|
|
619
614
|
endDateStr: '',
|
|
620
|
-
endDateValue: ''
|
|
621
|
-
clickedEnd: false
|
|
615
|
+
endDateValue: ''
|
|
622
616
|
})
|
|
623
617
|
}
|
|
624
618
|
},
|
|
@@ -17,10 +17,12 @@
|
|
|
17
17
|
<view class="date-sel">
|
|
18
18
|
<view wx:if="{{filtType === 'date' || filtType === 'yearMonth'}}" class="sel-sigle actived">{{dateStr}}</view>
|
|
19
19
|
<view wx:else class="sel-range">
|
|
20
|
-
<view catchtap="switchDateType" data-type="start" class="sel-start actived
|
|
20
|
+
<view catchtap="switchDateType" data-type="start" class="sel-start {{checkedType == 'start' ? 'actived' : ''}}">
|
|
21
|
+
{{startDateStr}}
|
|
22
|
+
</view>
|
|
21
23
|
<view>至</view>
|
|
22
|
-
<view catchtap="switchDateType" data-type="end" class="sel-end
|
|
23
|
-
{{
|
|
24
|
+
<view catchtap="switchDateType" data-type="end" class="sel-end {{checkedType == 'end' ? 'actived' : ''}}">
|
|
25
|
+
{{ endDateStr || '结束时间'}}
|
|
24
26
|
</view>
|
|
25
27
|
</view>
|
|
26
28
|
</view>
|