sadais-piui 1.2.7-beta179 → 1.2.7-beta180
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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
<a name="1.2.7-beta180"></a>
|
|
4
|
+
## 1.2.7-beta180 (2026-05-11)
|
|
5
|
+
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- ✨ feat: pi-calendar-panel 的 marks 支持对象形式配置标记颜色
|
|
9
|
+
|
|
3
10
|
<a name="1.2.5"></a>
|
|
4
11
|
## 1.2.5 (2022-04-25)
|
|
5
12
|
|
|
@@ -542,4 +549,3 @@
|
|
|
542
549
|
- feat: 初始化预设样式 [95e77f9]
|
|
543
550
|
- feat: 初始化提交 [f4abca2]
|
|
544
551
|
|
|
545
|
-
|
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
</view>
|
|
40
40
|
</view>
|
|
41
41
|
</view>
|
|
42
|
+
<view
|
|
43
|
+
v-if="day.marked"
|
|
44
|
+
class="date-mark"
|
|
45
|
+
:style="[day.markStyle]"
|
|
46
|
+
/>
|
|
42
47
|
</view>
|
|
43
48
|
<!-- 日历蒙层 -->
|
|
44
49
|
<view
|
|
@@ -162,7 +167,7 @@ export default {
|
|
|
162
167
|
// '是否显示周视图'
|
|
163
168
|
default: calendarPanel.defalutWeekView
|
|
164
169
|
},
|
|
165
|
-
//
|
|
170
|
+
// 日期标记,数组形式,支持 ['2022-06-27'] 或 [{ date: '2022-06-27', color: '#07C160' }]
|
|
166
171
|
marks: {
|
|
167
172
|
type: Array,
|
|
168
173
|
// []
|
|
@@ -218,6 +223,12 @@ export default {
|
|
|
218
223
|
},
|
|
219
224
|
getMarks() {
|
|
220
225
|
return this.marks.map(item => {
|
|
226
|
+
if (item && typeof item === 'object' && item.date) {
|
|
227
|
+
return {
|
|
228
|
+
...this.$pi.date.parseDate(item.date),
|
|
229
|
+
color: item.color
|
|
230
|
+
}
|
|
231
|
+
}
|
|
221
232
|
return this.$pi.date.parseDate(item)
|
|
222
233
|
})
|
|
223
234
|
},
|
|
@@ -314,7 +325,10 @@ export default {
|
|
|
314
325
|
return this.isSameDay(item, day)
|
|
315
326
|
})
|
|
316
327
|
if (mark) {
|
|
317
|
-
day.marked =
|
|
328
|
+
day.marked = true
|
|
329
|
+
if (mark.color) {
|
|
330
|
+
day.markStyle = { background: mark.color }
|
|
331
|
+
}
|
|
318
332
|
}
|
|
319
333
|
}
|
|
320
334
|
// 当天样式
|
|
@@ -414,23 +428,20 @@ export default {
|
|
|
414
428
|
z-index: 2;
|
|
415
429
|
width: calc(100% / 7);
|
|
416
430
|
overflow: hidden;
|
|
417
|
-
&.marked {
|
|
418
|
-
&::after {
|
|
419
|
-
content: '';
|
|
420
|
-
position: absolute;
|
|
421
|
-
bottom: 18rpx;
|
|
422
|
-
left: 50%;
|
|
423
|
-
width: 8rpx;
|
|
424
|
-
height: 8rpx;
|
|
425
|
-
background: #ff0027;
|
|
426
|
-
border-radius: 50%;
|
|
427
|
-
transform: translateX(-50%);
|
|
428
|
-
overflow: hidden;
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
431
|
.date-item-inner {
|
|
432
432
|
padding: 8rpx;
|
|
433
433
|
}
|
|
434
|
+
.date-mark {
|
|
435
|
+
position: absolute;
|
|
436
|
+
bottom: 18rpx;
|
|
437
|
+
left: 50%;
|
|
438
|
+
width: 8rpx;
|
|
439
|
+
height: 8rpx;
|
|
440
|
+
overflow: hidden;
|
|
441
|
+
background: #ff0027;
|
|
442
|
+
border-radius: 50%;
|
|
443
|
+
transform: translateX(-50%);
|
|
444
|
+
}
|
|
434
445
|
&.range {
|
|
435
446
|
.date-item-inner {
|
|
436
447
|
padding: 6rpx 0rpx;
|