sadais-piui 1.2.7-beta153 → 1.2.7-beta156
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/components/pi-badge/index.vue +8 -2
- package/components/pi-bottom-bar/index.vue +14 -3
- package/components/pi-bubble/index.vue +14 -3
- package/components/pi-button/index.vue +16 -3
- package/components/pi-calendar-input/index.vue +15 -5
- package/components/pi-calendar-panel/components/calendar-days/index.vue +7 -2
- package/components/pi-calendar-panel/index.vue +22 -7
- package/components/pi-canvas/index.vue +11 -2
- package/components/pi-card/index.vue +5 -1
- package/components/pi-cascader/index.vue +49 -15
- package/components/pi-circle-progress/index.vue +30 -5
- package/components/pi-code-input/index.vue +3 -2
- package/components/pi-collapse/index.vue +2 -1
- package/components/pi-count-up/index.vue +8 -2
- package/components/pi-date-picker-input/index.vue +15 -5
- package/components/pi-divider/index.vue +5 -1
- package/components/pi-dropdown/components/dropdown-tab.vue +6 -1
- package/components/pi-dropdown/index.vue +16 -4
- package/components/pi-dropdown-item/index.vue +13 -5
- package/components/pi-form/index.vue +8 -2
- package/components/pi-grid/index.vue +5 -1
- package/components/pi-grid-item/index.vue +13 -4
- package/components/pi-icon/index.vue +6 -1
- package/components/pi-img-cropper/canvas.js +10 -3
- package/components/pi-img-cropper/touch.js +4 -1
- package/components/pi-img-cropper/vector.js +2 -2
- package/components/pi-line-progress/index.vue +9 -2
- package/components/pi-list/index.vue +5 -1
- package/components/pi-list-item/index.vue +8 -3
- package/components/pi-loading/index.vue +10 -2
- package/components/pi-navbar/index.vue +22 -5
- package/components/pi-notify/index.vue +9 -3
- package/components/pi-number-keyboard/index.vue +15 -3
- package/components/pi-opentype-button/index.vue +11 -3
- package/components/pi-pagination/index.vue +5 -1
- package/components/pi-popup/index.vue +8 -4
- package/components/pi-radio-group/index.vue +3 -1
- package/components/pi-rate/index.vue +9 -2
- package/components/pi-regions-select/index.vue +45 -12
- package/components/pi-section/index.vue +5 -1
- package/components/pi-skeleton/index.vue +2 -1
- package/components/pi-status-bar/index.vue +4 -1
- package/components/pi-stepper/index.vue +118 -118
- package/components/pi-steps/index.vue +21 -5
- package/components/pi-subsection/index.vue +10 -5
- package/components/pi-switch/index.vue +14 -5
- package/components/pi-table/index.vue +61 -61
- package/components/pi-tabs/index.vue +45 -14
- package/components/pi-tag/index.vue +17 -5
- package/components/pi-upload-img/index.vue +36 -236
- package/components/pi-waterfall/index.vue +14 -5
- package/config/circleProgress.js +25 -5
- package/config/marqueePureCss.js +1 -1
- package/config/table.js +1 -1
- package/mixin/page-transitions/index.js +7 -2
- package/package.json +1 -1
- package/utils/file-utils.js +273 -0
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
class="badge-wrap"
|
|
4
|
+
:style="[customStyle]"
|
|
5
|
+
:class="[customClass]"
|
|
6
|
+
@tap="handleClick"
|
|
7
|
+
>
|
|
3
8
|
<view
|
|
4
9
|
class="badge"
|
|
5
10
|
:class="[
|
|
6
11
|
{
|
|
7
12
|
dot,
|
|
8
13
|
'abso': $slots.default || $slots.$default,
|
|
9
|
-
'hide-border':
|
|
14
|
+
'hide-border':
|
|
15
|
+
!dot && !getContent && !($slots.content || $slots.$content)
|
|
10
16
|
}
|
|
11
17
|
]"
|
|
12
18
|
:style="[badgeStyle]"
|
|
@@ -13,11 +13,18 @@
|
|
|
13
13
|
>
|
|
14
14
|
<slot />
|
|
15
15
|
</view>
|
|
16
|
-
<view
|
|
16
|
+
<view
|
|
17
|
+
v-if="safeArea"
|
|
18
|
+
class="pi-safearea"
|
|
19
|
+
:style="[{ backgroundColor: safeAreaBgColor }]"
|
|
20
|
+
/>
|
|
17
21
|
</view>
|
|
18
22
|
<!-- fixed时候的占位空间 -->
|
|
19
23
|
<template v-if="fixed">
|
|
20
|
-
<view
|
|
24
|
+
<view
|
|
25
|
+
class="pi-bottom-bar-placeholder"
|
|
26
|
+
:style="[{ height: barHeight }]"
|
|
27
|
+
/>
|
|
21
28
|
<!-- <view v-if="safeArea" class="pi-safearea" /> -->
|
|
22
29
|
</template>
|
|
23
30
|
</view>
|
|
@@ -114,7 +121,11 @@ export default {
|
|
|
114
121
|
methods: {
|
|
115
122
|
async init() {
|
|
116
123
|
if (!this.fixed || this.height) return // fixed并且未设定height,才需要计算高度
|
|
117
|
-
const barRect = await this.$pi.common.queryRect(
|
|
124
|
+
const barRect = await this.$pi.common.queryRect(
|
|
125
|
+
this,
|
|
126
|
+
'.pi-bottom-bar',
|
|
127
|
+
false
|
|
128
|
+
)
|
|
118
129
|
this.barHeight = `${barRect.height}px`
|
|
119
130
|
}
|
|
120
131
|
}
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
<view class="pi-bubble-angle pi-abso" />
|
|
17
17
|
</view>
|
|
18
18
|
</view>
|
|
19
|
-
<pi-mask
|
|
19
|
+
<pi-mask
|
|
20
|
+
v-model="showMaks"
|
|
21
|
+
background="transparent"
|
|
22
|
+
@close="showBubble = false"
|
|
23
|
+
/>
|
|
20
24
|
</view>
|
|
21
25
|
</template>
|
|
22
26
|
|
|
@@ -109,7 +113,11 @@ export default {
|
|
|
109
113
|
this.$set(this, 'bublePosition', { top: '-9999vh', left: 0 })
|
|
110
114
|
this.showBubble = true
|
|
111
115
|
setTimeout(() => {
|
|
112
|
-
reslove(
|
|
116
|
+
reslove(
|
|
117
|
+
this.$refs.bubble
|
|
118
|
+
? this.$refs.bubble.$el.getBoundingClientRect().width
|
|
119
|
+
: 0
|
|
120
|
+
)
|
|
113
121
|
this.showBubble = false
|
|
114
122
|
}, 500)
|
|
115
123
|
})
|
|
@@ -120,7 +128,10 @@ export default {
|
|
|
120
128
|
const lengthGap = (this.bubleWidth - bublePosition.width) / 2
|
|
121
129
|
const compRight = this.screenWidth - bublePosition.x - bublePosition.width
|
|
122
130
|
const posRes = {}
|
|
123
|
-
if (
|
|
131
|
+
if (
|
|
132
|
+
lengthGap <= 0 ||
|
|
133
|
+
(lengthGap < bublePosition.x && lengthGap < compRight)
|
|
134
|
+
) {
|
|
124
135
|
posRes.left = -Math.abs(lengthGap) + 'px'
|
|
125
136
|
} else {
|
|
126
137
|
posRes.right = 4 - Math.min(bublePosition.x, compRight) + 'px'
|
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
<!-- 按钮内容 -->
|
|
32
32
|
<slot />
|
|
33
33
|
<view v-if="ripple" class="pi-abso-full pi-of-hidden" :class="[{ round }]">
|
|
34
|
-
<view
|
|
34
|
+
<view
|
|
35
|
+
class="wave-ripple"
|
|
36
|
+
:class="[{ active: waveInfo.active }]"
|
|
37
|
+
:style="[waveStyle]"
|
|
38
|
+
/>
|
|
35
39
|
</view>
|
|
36
40
|
</button>
|
|
37
41
|
</template>
|
|
@@ -57,7 +61,9 @@ export default {
|
|
|
57
61
|
// 'default'
|
|
58
62
|
default: button.size,
|
|
59
63
|
validator: function(value) {
|
|
60
|
-
return ['default', 'large', 'medium', 'small', 'tiny', 'mini'].includes(
|
|
64
|
+
return ['default', 'large', 'medium', 'small', 'tiny', 'mini'].includes(
|
|
65
|
+
value
|
|
66
|
+
)
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
// 按钮的预置样式
|
|
@@ -67,7 +73,14 @@ export default {
|
|
|
67
73
|
// 'default'
|
|
68
74
|
default: button.type,
|
|
69
75
|
validator: function(value) {
|
|
70
|
-
return [
|
|
76
|
+
return [
|
|
77
|
+
'default',
|
|
78
|
+
'primary',
|
|
79
|
+
'warn',
|
|
80
|
+
'secondary',
|
|
81
|
+
'line',
|
|
82
|
+
'text'
|
|
83
|
+
].includes(value)
|
|
71
84
|
}
|
|
72
85
|
},
|
|
73
86
|
// 按钮是否镂空
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
<template>
|
|
11
11
|
<view class="pi-calendar-input">
|
|
12
12
|
<!-- 输入框 -->
|
|
13
|
-
<view
|
|
13
|
+
<view
|
|
14
|
+
v-if="$slots.default || $slots.$default"
|
|
15
|
+
class="pi-w-100P"
|
|
16
|
+
@click="handleShow()"
|
|
17
|
+
>
|
|
14
18
|
<slot />
|
|
15
19
|
</view>
|
|
16
20
|
<pi-input
|
|
@@ -168,11 +172,16 @@ export default {
|
|
|
168
172
|
return parseValue
|
|
169
173
|
}
|
|
170
174
|
if (!this.dateFormat) {
|
|
171
|
-
console.warn(
|
|
175
|
+
console.warn(
|
|
176
|
+
'使用pi-calendar-input组件,请设置.dateFormat,否则无法正常显示'
|
|
177
|
+
)
|
|
172
178
|
}
|
|
173
179
|
if (this.$pi.lang.isEmpty(this.val)) return ''
|
|
174
180
|
// 常规字段正常返回
|
|
175
|
-
if (
|
|
181
|
+
if (
|
|
182
|
+
this.$pi.lang.isString(this.val) ||
|
|
183
|
+
this.$pi.lang.isNumber(this.val)
|
|
184
|
+
) {
|
|
176
185
|
return this.val
|
|
177
186
|
}
|
|
178
187
|
// 如果是日期对象,返回格式化后的日期
|
|
@@ -190,9 +199,10 @@ export default {
|
|
|
190
199
|
},
|
|
191
200
|
getDisabled() {
|
|
192
201
|
const parentFormItem = this.$pi.parent(this, 'PiFormItem')
|
|
193
|
-
const disabled =
|
|
202
|
+
const disabled =
|
|
203
|
+
this.disabled || (parentFormItem && parentFormItem.getDisabled)
|
|
194
204
|
return disabled
|
|
195
|
-
}
|
|
205
|
+
}
|
|
196
206
|
},
|
|
197
207
|
methods: {
|
|
198
208
|
handleShow() {
|
|
@@ -249,7 +249,9 @@ export default {
|
|
|
249
249
|
// 当月数据
|
|
250
250
|
day = {
|
|
251
251
|
...day,
|
|
252
|
-
...this.$pi.date.parseDate(
|
|
252
|
+
...this.$pi.date.parseDate(
|
|
253
|
+
new Date(this.year, this.month - 1, i - firstDayCount)
|
|
254
|
+
)
|
|
253
255
|
}
|
|
254
256
|
}
|
|
255
257
|
|
|
@@ -274,7 +276,10 @@ export default {
|
|
|
274
276
|
const isBegin = this.isSameDay(start, day)
|
|
275
277
|
const isEnd = this.isSameDay(end, day)
|
|
276
278
|
const inRange =
|
|
277
|
-
start &&
|
|
279
|
+
start &&
|
|
280
|
+
end &&
|
|
281
|
+
day.timestamp > start.timestamp &&
|
|
282
|
+
day.timestamp < end.timestamp
|
|
278
283
|
const rangeStyle = {}
|
|
279
284
|
// 处理中间范围的样式
|
|
280
285
|
if (inRange) {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
<view class="pi-icon-right pi-pd-14" @tap="handleNextMonth()" />
|
|
15
15
|
</view>
|
|
16
16
|
</view>
|
|
17
|
-
<view v-if="showBackToday" class="back-today" @tap="handleBackToday"
|
|
17
|
+
<view v-if="showBackToday" class="back-today" @tap="handleBackToday"
|
|
18
|
+
>回到今日</view
|
|
19
|
+
>
|
|
18
20
|
</view>
|
|
19
21
|
<!-- 星期 -->
|
|
20
22
|
<view
|
|
@@ -72,7 +74,9 @@
|
|
|
72
74
|
>
|
|
73
75
|
<pi-icon
|
|
74
76
|
name="arrow-down_fill"
|
|
75
|
-
:custom-style="{
|
|
77
|
+
:custom-style="{
|
|
78
|
+
transform: `rotate(${weekView ? '0deg' : '180deg'})`
|
|
79
|
+
}"
|
|
76
80
|
/>
|
|
77
81
|
<text class="pi-fz-24 ">{{ weekView ? '展开' : '收起' }}</text>
|
|
78
82
|
</view>
|
|
@@ -244,8 +248,13 @@ export default {
|
|
|
244
248
|
// 第一天
|
|
245
249
|
firstDay() {
|
|
246
250
|
const preMonthLastDay = this.getPreMonthLastDay
|
|
247
|
-
const firstDay = new Date(
|
|
248
|
-
|
|
251
|
+
const firstDay = new Date(
|
|
252
|
+
`${this.year}/${this.month}/01 00:00:00`
|
|
253
|
+
).getDay()
|
|
254
|
+
return this.$pi.common.generateArray(
|
|
255
|
+
preMonthLastDay - firstDay + 1,
|
|
256
|
+
preMonthLastDay
|
|
257
|
+
)
|
|
249
258
|
},
|
|
250
259
|
weekDayZh() {
|
|
251
260
|
return this.$pi.date.getWeekDayZh()
|
|
@@ -281,7 +290,9 @@ export default {
|
|
|
281
290
|
init() {
|
|
282
291
|
console.log(TAG, '组件初始化', this.value)
|
|
283
292
|
let initValue = this.value
|
|
284
|
-
const nowDate = this.$pi.date.parseDate(
|
|
293
|
+
const nowDate = this.$pi.date.parseDate(
|
|
294
|
+
this.type === 'date' ? this.value : this.value[0]
|
|
295
|
+
)
|
|
285
296
|
if (this.type === 'range') {
|
|
286
297
|
initValue = initValue || []
|
|
287
298
|
if (this.value[1]) {
|
|
@@ -305,7 +316,8 @@ export default {
|
|
|
305
316
|
this.value && this.handleChange(initValue)
|
|
306
317
|
if (this.canChangeWeekView) {
|
|
307
318
|
// 如果可以切换周视图,则初始化当前周
|
|
308
|
-
let targetDay =
|
|
319
|
+
let targetDay =
|
|
320
|
+
this.type === 'date' ? this.calendarValue : this.calendarValue[0]
|
|
309
321
|
if (!targetDay) {
|
|
310
322
|
targetDay = this.now
|
|
311
323
|
}
|
|
@@ -392,7 +404,10 @@ export default {
|
|
|
392
404
|
? this.calendarValue.map(cv =>
|
|
393
405
|
this.$pi.date.formatDate(new Date(cv.timestamp), this.dateFormat)
|
|
394
406
|
)
|
|
395
|
-
: this.$pi.date.formatDate(
|
|
407
|
+
: this.$pi.date.formatDate(
|
|
408
|
+
new Date(this.calendarValue.timestamp),
|
|
409
|
+
this.dateFormat
|
|
410
|
+
)
|
|
396
411
|
this.handleEmitChange()
|
|
397
412
|
},
|
|
398
413
|
handleTabChange(e) {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
ref="root"
|
|
4
|
+
:class="['wrapper', customClass, { disabled }]"
|
|
5
|
+
:style="[customStyle]"
|
|
6
|
+
>
|
|
3
7
|
<canvas
|
|
4
8
|
ref="canvas"
|
|
5
9
|
:style="[canvasStyle]"
|
|
@@ -236,7 +240,12 @@ export default {
|
|
|
236
240
|
this.emitCrop(imageData, x1 - x, y1 - y)
|
|
237
241
|
} else {
|
|
238
242
|
// 直接获取整张画布区域的像素点数据
|
|
239
|
-
const imageData = await this.getImageData(
|
|
243
|
+
const imageData = await this.getImageData(
|
|
244
|
+
0,
|
|
245
|
+
0,
|
|
246
|
+
this.canvasw,
|
|
247
|
+
this.canvash
|
|
248
|
+
)
|
|
240
249
|
this.emitCrop(imageData, this.canvasw, this.canvash)
|
|
241
250
|
}
|
|
242
251
|
},
|
|
@@ -24,7 +24,11 @@
|
|
|
24
24
|
<slot />
|
|
25
25
|
</view>
|
|
26
26
|
<!-- body -->
|
|
27
|
-
<view
|
|
27
|
+
<view
|
|
28
|
+
v-if="$slots.body"
|
|
29
|
+
class="pi-pd-tb-24"
|
|
30
|
+
:style="[{ padding: getPadding }]"
|
|
31
|
+
>
|
|
28
32
|
<slot name="body" />
|
|
29
33
|
</view>
|
|
30
34
|
<!-- footer -->
|
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
class="breadcrumb-item"
|
|
34
34
|
@click="handleClickItem(item)"
|
|
35
35
|
>
|
|
36
|
-
<pi-icon
|
|
36
|
+
<pi-icon
|
|
37
|
+
v-if="item[keyField] !== ROOT_NODE"
|
|
38
|
+
name="right"
|
|
39
|
+
custom-class="pi-mg-lr-6"
|
|
40
|
+
/>
|
|
37
41
|
<view
|
|
38
42
|
class="breadcrumb-item-title"
|
|
39
43
|
:class="{
|
|
@@ -45,7 +49,12 @@
|
|
|
45
49
|
</view>
|
|
46
50
|
</scroll-view>
|
|
47
51
|
<!-- 选择区域 -->
|
|
48
|
-
<scroll-view
|
|
52
|
+
<scroll-view
|
|
53
|
+
class="scroll-view"
|
|
54
|
+
:scroll-left="scrollLeft"
|
|
55
|
+
scroll-x
|
|
56
|
+
scroll-with-animation
|
|
57
|
+
>
|
|
49
58
|
<scroll-view
|
|
50
59
|
v-for="(col, index) of columns"
|
|
51
60
|
:key="index"
|
|
@@ -73,7 +82,10 @@
|
|
|
73
82
|
class="pi-mg-right-16"
|
|
74
83
|
@change="handleChangeParentSelect(item, $event)"
|
|
75
84
|
/>
|
|
76
|
-
<view
|
|
85
|
+
<view
|
|
86
|
+
class="pi-align-center pi-lh-36 pi-flex-sub column-item-inner"
|
|
87
|
+
@click="handleClickItem(item)"
|
|
88
|
+
>
|
|
77
89
|
{{ item[displayField] || '' }}
|
|
78
90
|
</view>
|
|
79
91
|
</view>
|
|
@@ -122,10 +134,12 @@
|
|
|
122
134
|
class="breadcrumb-item"
|
|
123
135
|
@click="handleClickItem(item)"
|
|
124
136
|
>
|
|
125
|
-
<pi-icon
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
137
|
+
<pi-icon
|
|
138
|
+
v-if="index > 0"
|
|
139
|
+
name="right"
|
|
140
|
+
custom-class="pi-mg-lr-6"
|
|
141
|
+
/>
|
|
142
|
+
<view class="breadcrumb-item-title">
|
|
129
143
|
{{ item[displayField] }}
|
|
130
144
|
</view>
|
|
131
145
|
</view>
|
|
@@ -262,7 +276,10 @@ export default {
|
|
|
262
276
|
return ROOT_NODE
|
|
263
277
|
},
|
|
264
278
|
getPopupSelect() {
|
|
265
|
-
const popupSelect = this.$pi.lang.mergeDeep(
|
|
279
|
+
const popupSelect = this.$pi.lang.mergeDeep(
|
|
280
|
+
cascader.popupSelect,
|
|
281
|
+
this.popupSelect
|
|
282
|
+
)
|
|
266
283
|
if (!this.singleCancel && this.singleConfirm) {
|
|
267
284
|
popupSelect.toolbarPosition = 'none'
|
|
268
285
|
}
|
|
@@ -283,7 +300,10 @@ export default {
|
|
|
283
300
|
return this.$pi.lang.mergeDeep(cascaderCancelBtn, this.cancelBtn)
|
|
284
301
|
},
|
|
285
302
|
getPopup() {
|
|
286
|
-
const cascaderPopup = this.$pi.lang.mergeDeep(
|
|
303
|
+
const cascaderPopup = this.$pi.lang.mergeDeep(
|
|
304
|
+
cascader.popup,
|
|
305
|
+
this.popupSelect.popup
|
|
306
|
+
)
|
|
287
307
|
return this.$pi.lang.mergeDeep(cascaderPopup, this.popup)
|
|
288
308
|
},
|
|
289
309
|
getItemStyle() {
|
|
@@ -427,9 +447,14 @@ export default {
|
|
|
427
447
|
this.$nextTick(this.syncScrollLeft)
|
|
428
448
|
return
|
|
429
449
|
}
|
|
430
|
-
const isLeafNode =
|
|
450
|
+
const isLeafNode =
|
|
451
|
+
!item[this.childrenField] || item[this.childrenField]?.length === 0
|
|
431
452
|
// 点击非叶子节点
|
|
432
|
-
if (
|
|
453
|
+
if (
|
|
454
|
+
item &&
|
|
455
|
+
!isLeafNode &&
|
|
456
|
+
this.currentItem[this.keyField] !== item[this.keyField]
|
|
457
|
+
) {
|
|
433
458
|
this.currentItem = item
|
|
434
459
|
this.$nextTick(this.syncScrollLeft)
|
|
435
460
|
return
|
|
@@ -464,7 +489,11 @@ export default {
|
|
|
464
489
|
// 调用此方法的时候,必须使用$nextTick,因为column是动态变化的,需要等待界面更新渲染后,才能正确设置scrollLeft的位置
|
|
465
490
|
let scrollLeft = 0
|
|
466
491
|
if (this.cascaderWidth === 0) {
|
|
467
|
-
const srollWrapRect = await this.$pi.common.queryRect(
|
|
492
|
+
const srollWrapRect = await this.$pi.common.queryRect(
|
|
493
|
+
this,
|
|
494
|
+
'.cascader-wrap',
|
|
495
|
+
false
|
|
496
|
+
)
|
|
468
497
|
console.log(this, srollWrapRect)
|
|
469
498
|
if (srollWrapRect) {
|
|
470
499
|
this.cascaderWidth = srollWrapRect.width
|
|
@@ -494,7 +523,9 @@ export default {
|
|
|
494
523
|
*/
|
|
495
524
|
handleCancel() {
|
|
496
525
|
this.$emit('cancel')
|
|
497
|
-
this.selectedIds = this.isSingle
|
|
526
|
+
this.selectedIds = this.isSingle
|
|
527
|
+
? [this.defaultValue]
|
|
528
|
+
: [...this.defaultValue]
|
|
498
529
|
this.getPopupSelect.onCancelClose && this.handlePopupClose()
|
|
499
530
|
},
|
|
500
531
|
/**
|
|
@@ -502,7 +533,10 @@ export default {
|
|
|
502
533
|
* 确认选择
|
|
503
534
|
*/
|
|
504
535
|
handleConfirm() {
|
|
505
|
-
this.$emit(
|
|
536
|
+
this.$emit(
|
|
537
|
+
'confirm',
|
|
538
|
+
this.isSingle ? this.selectedIds[0] || '' : this.selectedIds
|
|
539
|
+
)
|
|
506
540
|
this.getPopupSelect.onConfirmClose && this.handlePopupClose()
|
|
507
541
|
}
|
|
508
542
|
}
|
|
@@ -533,7 +567,7 @@ export default {
|
|
|
533
567
|
min-height: 100rpx;
|
|
534
568
|
width: 100%;
|
|
535
569
|
white-space: initial;
|
|
536
|
-
padding:
|
|
570
|
+
padding: 16rpx 32rpx;
|
|
537
571
|
font-size: 28rpx;
|
|
538
572
|
color: #333333;
|
|
539
573
|
overflow: hidden;
|
|
@@ -87,7 +87,9 @@ export default {
|
|
|
87
87
|
type: String,
|
|
88
88
|
default: circleProgress.type,
|
|
89
89
|
validator: function(value) {
|
|
90
|
-
return ['success', 'error', 'info', 'primary', 'warning'].includes(
|
|
90
|
+
return ['success', 'error', 'info', 'primary', 'warning'].includes(
|
|
91
|
+
value
|
|
92
|
+
)
|
|
91
93
|
}
|
|
92
94
|
},
|
|
93
95
|
// 主题列表
|
|
@@ -198,7 +200,14 @@ export default {
|
|
|
198
200
|
// 设置一个原点(110,110),半径为100的圆的路径到当前路径
|
|
199
201
|
let radius = this.widthPx / 2
|
|
200
202
|
// 用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
|
|
201
|
-
ctx.arc(
|
|
203
|
+
ctx.arc(
|
|
204
|
+
radius,
|
|
205
|
+
radius,
|
|
206
|
+
radius - this.borderWidthPx,
|
|
207
|
+
0,
|
|
208
|
+
2 * Math.PI,
|
|
209
|
+
false
|
|
210
|
+
)
|
|
202
211
|
ctx.stroke() // 对路径进行描绘
|
|
203
212
|
ctx.draw()
|
|
204
213
|
},
|
|
@@ -227,11 +236,20 @@ export default {
|
|
|
227
236
|
const color = colorData.slice(index * 4, index * 4 + 4)
|
|
228
237
|
ctx.beginPath()
|
|
229
238
|
|
|
230
|
-
ctx.setStrokeStyle(
|
|
239
|
+
ctx.setStrokeStyle(
|
|
240
|
+
`rgba(${color[0]},${color[1]},${color[2]},${color[3] / 255})`
|
|
241
|
+
)
|
|
231
242
|
ctx.globalAlpha = color[3] / 255
|
|
232
243
|
let endAngle = ((2 * Math.PI) / 100) * (i + 1) + this.startAngle
|
|
233
244
|
let startAngle = this.startAngle + ((2 * Math.PI) / 100) * i
|
|
234
|
-
ctx.arc(
|
|
245
|
+
ctx.arc(
|
|
246
|
+
radius,
|
|
247
|
+
radius,
|
|
248
|
+
radius - this.borderWidthPx,
|
|
249
|
+
startAngle,
|
|
250
|
+
endAngle,
|
|
251
|
+
false
|
|
252
|
+
)
|
|
235
253
|
ctx.stroke()
|
|
236
254
|
}
|
|
237
255
|
} else {
|
|
@@ -242,7 +260,14 @@ export default {
|
|
|
242
260
|
let endAngle = ((2 * Math.PI) / 100) * progress + this.startAngle
|
|
243
261
|
ctx.beginPath()
|
|
244
262
|
// 半径为整个canvas宽度的一半
|
|
245
|
-
ctx.arc(
|
|
263
|
+
ctx.arc(
|
|
264
|
+
radius,
|
|
265
|
+
radius,
|
|
266
|
+
radius - this.borderWidthPx,
|
|
267
|
+
this.startAngle,
|
|
268
|
+
endAngle,
|
|
269
|
+
false
|
|
270
|
+
)
|
|
246
271
|
ctx.stroke()
|
|
247
272
|
}
|
|
248
273
|
ctx.beginPath()
|
|
@@ -171,9 +171,10 @@ export default {
|
|
|
171
171
|
},
|
|
172
172
|
getDisabled() {
|
|
173
173
|
const parentFormItem = this.$pi.parent(this, 'PiFormItem')
|
|
174
|
-
const disabled =
|
|
174
|
+
const disabled =
|
|
175
|
+
this.disabled || (parentFormItem && parentFormItem.getDisabled)
|
|
175
176
|
return disabled
|
|
176
|
-
}
|
|
177
|
+
}
|
|
177
178
|
},
|
|
178
179
|
mounted() {
|
|
179
180
|
if (this.autoFocus) {
|
|
@@ -71,7 +71,8 @@ export default {
|
|
|
71
71
|
if (this.children.length) {
|
|
72
72
|
this.children.map(child => {
|
|
73
73
|
// 判断子组件(pi-collapse-item)如果有updateParentData方法的话,就就执行(执行的结果是子组件重新从父组件拉取了最新的值)
|
|
74
|
-
typeof child.updateParentData === 'function' &&
|
|
74
|
+
typeof child.updateParentData === 'function' &&
|
|
75
|
+
child.updateParentData()
|
|
75
76
|
})
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -167,8 +167,14 @@ export default {
|
|
|
167
167
|
if (this.countDown) {
|
|
168
168
|
this.printVal =
|
|
169
169
|
this.startNumCache - this.isEase
|
|
170
|
-
? this.easingFn(
|
|
171
|
-
|
|
170
|
+
? this.easingFn(
|
|
171
|
+
progress,
|
|
172
|
+
0,
|
|
173
|
+
this.startNumCache - this.endNum,
|
|
174
|
+
this.durationCache
|
|
175
|
+
)
|
|
176
|
+
: (this.startNumCache - this.endNum) *
|
|
177
|
+
(progress / this.durationCache)
|
|
172
178
|
} else {
|
|
173
179
|
this.printVal = this.isEase
|
|
174
180
|
? this.easingFn(
|
|
@@ -10,7 +10,11 @@
|
|
|
10
10
|
<template>
|
|
11
11
|
<view class="pi-datePicker-input">
|
|
12
12
|
<!-- 输入框 -->
|
|
13
|
-
<view
|
|
13
|
+
<view
|
|
14
|
+
v-if="$slots.default || $slots.$default"
|
|
15
|
+
class="pi-w-100P"
|
|
16
|
+
@click="handleShow()"
|
|
17
|
+
>
|
|
14
18
|
<slot />
|
|
15
19
|
</view>
|
|
16
20
|
<pi-input
|
|
@@ -165,7 +169,10 @@ export default {
|
|
|
165
169
|
return this.$pi.lang.mergeDeep(datePickerInput.input, this.input)
|
|
166
170
|
},
|
|
167
171
|
getDatePicker() {
|
|
168
|
-
return this.$pi.lang.mergeDeep(
|
|
172
|
+
return this.$pi.lang.mergeDeep(
|
|
173
|
+
datePickerInput.datePicker,
|
|
174
|
+
this.datePicker
|
|
175
|
+
)
|
|
169
176
|
},
|
|
170
177
|
getInputValue() {
|
|
171
178
|
const parseValueFn = this.parseValueFn[PI_DEFAULT_FN_FLAG]
|
|
@@ -176,7 +183,9 @@ export default {
|
|
|
176
183
|
return parseValue
|
|
177
184
|
}
|
|
178
185
|
if (!this.dateFormat) {
|
|
179
|
-
console.warn(
|
|
186
|
+
console.warn(
|
|
187
|
+
'使用pi-datePicker-input组件,请设置.dateFormat,否则无法正常显示'
|
|
188
|
+
)
|
|
180
189
|
}
|
|
181
190
|
if (this.$pi.lang.isEmpty(this.val)) return ''
|
|
182
191
|
const date = this.$pi.date.parseDate(this.val)
|
|
@@ -184,9 +193,10 @@ export default {
|
|
|
184
193
|
},
|
|
185
194
|
getDisabled() {
|
|
186
195
|
const parentFormItem = this.$pi.parent(this, 'PiFormItem')
|
|
187
|
-
const disabled =
|
|
196
|
+
const disabled =
|
|
197
|
+
this.disabled || (parentFormItem && parentFormItem.getDisabled)
|
|
188
198
|
return disabled
|
|
189
|
-
}
|
|
199
|
+
}
|
|
190
200
|
},
|
|
191
201
|
methods: {
|
|
192
202
|
handleShow() {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
class="pi-rela pi-w-100P pi-align-center"
|
|
4
|
+
:style="[customStyle]"
|
|
5
|
+
:class="[customClass]"
|
|
6
|
+
>
|
|
3
7
|
<view
|
|
4
8
|
v-if="['center', 'right'].includes(contentPosition)"
|
|
5
9
|
class="pi-divider"
|
|
@@ -21,7 +21,12 @@
|
|
|
21
21
|
<text class="pi-pd-right-12 pi-fz-28">
|
|
22
22
|
{{ item.text }}
|
|
23
23
|
</text>
|
|
24
|
-
<pi-icon
|
|
24
|
+
<pi-icon
|
|
25
|
+
:class="{ rotate: item.opened }"
|
|
26
|
+
name="arrow-down_fill"
|
|
27
|
+
size="26"
|
|
28
|
+
color="#999"
|
|
29
|
+
/>
|
|
25
30
|
</view>
|
|
26
31
|
</template>
|
|
27
32
|
|