sadais-piui 1.2.7-beta16 → 1.2.7-beta19
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.
|
@@ -106,10 +106,14 @@ export default {
|
|
|
106
106
|
},
|
|
107
107
|
data() {
|
|
108
108
|
return {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
// #ifdef MP-WEIXIN
|
|
110
|
+
elBgId: 'pCircleProgressBgId', // 微信小程序中不能使用this.$pi形式动态生成id值,否则会报错
|
|
111
|
+
elId: 'pCircleProgressElId',
|
|
112
|
+
// #endif
|
|
113
|
+
// #ifndef MP-WEIXIN
|
|
111
114
|
elBgId: this.$pi.guid(), // 支付宝等小程序 动态生产ID
|
|
112
115
|
elId: this.$pi.guid(),
|
|
116
|
+
// #endif
|
|
113
117
|
progressContext: null,
|
|
114
118
|
// 开始的角度
|
|
115
119
|
widthPx: uni.upx2px(this.width), // 转成px后的整个组件的背景宽度
|
|
@@ -236,16 +240,18 @@ export default {
|
|
|
236
240
|
this.drawCircleByProgress(progress)
|
|
237
241
|
}, time)
|
|
238
242
|
},
|
|
239
|
-
|
|
243
|
+
createColorData() {
|
|
240
244
|
let canvas
|
|
245
|
+
let ctx
|
|
241
246
|
// #ifndef MP-WEIXIN
|
|
242
247
|
canvas = document.createElement('canvas')
|
|
243
248
|
canvas.width = 256
|
|
244
249
|
canvas.height = 1
|
|
245
|
-
|
|
250
|
+
ctx = canvas.getContext('2d')
|
|
246
251
|
// #endif
|
|
247
252
|
// #ifdef MP-WEIXIN
|
|
248
253
|
canvas = uni.createOffscreenCanvas({ type: '2d', width: 256, height: 1 })
|
|
254
|
+
ctx = canvas.getContext('2d')
|
|
249
255
|
// #endif
|
|
250
256
|
const linearGradient = ctx.createLinearGradient(0, 0, 256, 1)
|
|
251
257
|
this.linearGradient.colorStop.forEach(color => {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<!-- 展示dropdownItem下的数据 -->
|
|
22
22
|
<view
|
|
23
23
|
class="pi-dropdown-content"
|
|
24
|
-
:class="[contentClass, show ? 'pi-ani-slide-
|
|
24
|
+
:class="[contentClass, show ? 'pi-ani-slide-bottom-show' : 'pi-ani-slide-bottom-hide']"
|
|
25
25
|
:style="[contentStyle, contentCombinationStyle]"
|
|
26
26
|
>
|
|
27
27
|
<slot />
|