sadais-piui 1.2.7-beta53 → 1.2.7-beta55
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.
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<!-- fixed时候的占位空间 -->
|
|
19
19
|
<template v-if="fixed">
|
|
20
20
|
<view class="pi-bottom-bar-placeholder" :style="[{ height: barHeight }]" />
|
|
21
|
-
<view v-if="safeArea" class="pi-safearea" />
|
|
21
|
+
<!-- <view v-if="safeArea" class="pi-safearea" /> -->
|
|
22
22
|
</template>
|
|
23
23
|
</view>
|
|
24
24
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2022-06-28 16:53:54
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-11-24 10:35:53
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 日历日期数据
|
|
7
7
|
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-calendar-panel/components/calendar-days/index.vue
|
|
@@ -198,7 +198,7 @@ export default {
|
|
|
198
198
|
const firstDays = []
|
|
199
199
|
const preMonthLastDay = this.getPreMonthLastDay
|
|
200
200
|
const lastDay = preMonthLastDay.getDate()
|
|
201
|
-
const firstDay = new Date(
|
|
201
|
+
const firstDay = new Date(this.year, this.month - 1, '1').getDay()
|
|
202
202
|
for (let i = 0; i < firstDay; i++) {
|
|
203
203
|
const day = preMonthLastDay.setDate(lastDay - firstDay + i + 1)
|
|
204
204
|
firstDays.push(new Date(day))
|
|
@@ -222,6 +222,7 @@ export default {
|
|
|
222
222
|
const dayCount = 7 * 6 // 固定显示6周
|
|
223
223
|
const monthDays = new Date(this.year, this.month, 0).getDate()
|
|
224
224
|
const firstDayCount = this.firstDay.length
|
|
225
|
+
console.log(this.firstDay)
|
|
225
226
|
const nextMonthFirstDay = this.getNextMonthFirstDay
|
|
226
227
|
for (let i = 1; i <= dayCount; i++) {
|
|
227
228
|
let day = {
|
|
@@ -247,10 +248,9 @@ export default {
|
|
|
247
248
|
}
|
|
248
249
|
} else {
|
|
249
250
|
// 当月数据
|
|
250
|
-
const formatDay = `${this.year}-${this.month}-${i - firstDayCount}`
|
|
251
251
|
day = {
|
|
252
252
|
...day,
|
|
253
|
-
...this.$pi.date.parseDate(new Date(
|
|
253
|
+
...this.$pi.date.parseDate(new Date(this.year, this.month - 1, i - firstDayCount))
|
|
254
254
|
}
|
|
255
255
|
const isDisabled = this.isDisabled(day)
|
|
256
256
|
// 禁用
|
|
@@ -301,9 +301,6 @@ export default {
|
|
|
301
301
|
[this.keyField]: 'ROOT'
|
|
302
302
|
}
|
|
303
303
|
].concat(pathItems)
|
|
304
|
-
},
|
|
305
|
-
syncIds() {
|
|
306
|
-
return `${this.innerItems.length}-${this.defaultValue.length}`
|
|
307
304
|
}
|
|
308
305
|
},
|
|
309
306
|
watch: {
|
|
@@ -312,6 +309,12 @@ export default {
|
|
|
312
309
|
handler() {
|
|
313
310
|
this.rebuildItems()
|
|
314
311
|
}
|
|
312
|
+
},
|
|
313
|
+
defaultValue: {
|
|
314
|
+
immediate: true,
|
|
315
|
+
handler(vals) {
|
|
316
|
+
this.selectedIds = [...vals]
|
|
317
|
+
}
|
|
315
318
|
}
|
|
316
319
|
},
|
|
317
320
|
|
|
@@ -395,7 +398,6 @@ export default {
|
|
|
395
398
|
} else {
|
|
396
399
|
// 选中
|
|
397
400
|
this.selectedIds.push(item[this.keyField])
|
|
398
|
-
console.log(this.selectedIds)
|
|
399
401
|
}
|
|
400
402
|
},
|
|
401
403
|
async syncScrollLeft() {
|
|
@@ -431,6 +433,7 @@ export default {
|
|
|
431
433
|
*/
|
|
432
434
|
handleCancel() {
|
|
433
435
|
this.$emit('cancel')
|
|
436
|
+
this.selectedIds = [...this.defaultValue]
|
|
434
437
|
this.getPopupSelect.onCancelClose && this.handlePopupClose()
|
|
435
438
|
},
|
|
436
439
|
/**
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
220
220
|
return this.$pi.lang.mergeDeep(datePickerPopup, this.popup)
|
|
221
221
|
},
|
|
222
222
|
options() {
|
|
223
|
-
const watchs = ['startYear', 'endYear', 'field', 'defaultValue']
|
|
223
|
+
const watchs = ['val', 'startYear', 'endYear', 'field', 'defaultValue']
|
|
224
224
|
const options = watchs
|
|
225
225
|
.filter(d => this[d])
|
|
226
226
|
.map(d => this[d].toString())
|