sadais-piui 1.2.7-beta82 → 1.2.7-beta84
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.
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
<view class="badge-wrap" :style="[customStyle]" :class="[customClass]" @tap="handleClick">
|
|
3
3
|
<view
|
|
4
4
|
class="badge"
|
|
5
|
-
:class="[
|
|
5
|
+
:class="[
|
|
6
|
+
{
|
|
7
|
+
dot,
|
|
8
|
+
'abso': $slots.default || $slots.$default,
|
|
9
|
+
'hide-border': !dot && !getContent && !($slots.content || $slots.$content)
|
|
10
|
+
}
|
|
11
|
+
]"
|
|
6
12
|
:style="[badgeStyle]"
|
|
7
13
|
>
|
|
8
14
|
<slot name="content">
|
|
@@ -119,6 +125,10 @@ export default {
|
|
|
119
125
|
border: 1px solid #ffffff;
|
|
120
126
|
border-radius: 16px;
|
|
121
127
|
|
|
128
|
+
&.hide-border {
|
|
129
|
+
border: none;
|
|
130
|
+
}
|
|
131
|
+
|
|
122
132
|
&.dot {
|
|
123
133
|
min-width: 0;
|
|
124
134
|
background-color: #ee0a24;
|
|
@@ -227,13 +227,15 @@ export default {
|
|
|
227
227
|
}
|
|
228
228
|
},
|
|
229
229
|
data() {
|
|
230
|
-
|
|
230
|
+
let date = this.$pi.date.parseDate(this.defaultValue)
|
|
231
231
|
if(this.field === 'halfday') {
|
|
232
|
+
const time = date.time
|
|
232
233
|
if(date.hour < 12){
|
|
233
|
-
|
|
234
|
+
time.setHours(0)
|
|
234
235
|
} else {
|
|
235
|
-
|
|
236
|
+
time.setHours(12)
|
|
236
237
|
}
|
|
238
|
+
date = this.$pi.date.parseDate(time)
|
|
237
239
|
}
|
|
238
240
|
return {
|
|
239
241
|
date,
|
|
@@ -423,11 +425,13 @@ export default {
|
|
|
423
425
|
init() {
|
|
424
426
|
this.date = this.$pi.date.parseDate(this.defaultValue)
|
|
425
427
|
if(this.field === 'halfday') {
|
|
428
|
+
const time = this.date.time
|
|
426
429
|
if(this.date.hour < 12){
|
|
427
|
-
|
|
430
|
+
time.setHours(0)
|
|
428
431
|
} else {
|
|
429
|
-
|
|
432
|
+
time.setHours(12)
|
|
430
433
|
}
|
|
434
|
+
this.date = this.$pi.date.parseDate(time)
|
|
431
435
|
}
|
|
432
436
|
},
|
|
433
437
|
handlePickstart() {
|
|
@@ -482,6 +486,7 @@ export default {
|
|
|
482
486
|
const time = this.date.time
|
|
483
487
|
time.setMinutes(0)
|
|
484
488
|
time.setSeconds(0)
|
|
489
|
+
time.setMilliseconds(0)
|
|
485
490
|
this.date = this.$pi.date.parseDate(time)
|
|
486
491
|
}
|
|
487
492
|
const value = this.format ? this.date.format(this.format) : this.date
|
|
@@ -324,7 +324,7 @@ export default {
|
|
|
324
324
|
if (closeIconRect && closeIconRect.width) {
|
|
325
325
|
this.closeIconWidth = closeIconRect.width
|
|
326
326
|
}
|
|
327
|
-
console.log(TAG, '计算.pi-icon宽度', this.closeIconWidth)
|
|
327
|
+
// console.log(TAG, '计算.pi-icon宽度', this.closeIconWidth)
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
330
|
handleItemClick(e) {
|
|
@@ -222,6 +222,7 @@ export default {
|
|
|
222
222
|
borderRadius: this.getBorderRadius,
|
|
223
223
|
borderWidth: this.getBorder
|
|
224
224
|
}
|
|
225
|
+
|
|
225
226
|
if (this.getActiveColor && this.val) {
|
|
226
227
|
style.borderColor = this.getActiveColor
|
|
227
228
|
if (['text', 'button'].includes(this.getShape) && this.getActiveMode === 'fill') {
|
|
@@ -297,10 +298,9 @@ $unactive-color: #cccccc;
|
|
|
297
298
|
transition-property: border, color, background-color;
|
|
298
299
|
&.text {
|
|
299
300
|
padding: 12rpx 24rpx;
|
|
300
|
-
|
|
301
|
-
color: $unactive-color;
|
|
302
301
|
border-color: transparent;
|
|
303
302
|
border-style: solid;
|
|
303
|
+
background-color: #f5f5f5;
|
|
304
304
|
}
|
|
305
305
|
&.button {
|
|
306
306
|
padding: 24rpx;
|
|
@@ -331,9 +331,6 @@ $unactive-color: #cccccc;
|
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
&.line {
|
|
334
|
-
.radio-label.text {
|
|
335
|
-
border-color: $unactive-color;
|
|
336
|
-
}
|
|
337
334
|
.radio-label.button {
|
|
338
335
|
border-color: $unactive-color;
|
|
339
336
|
}
|