sadais-piui 1.2.7-beta16 → 1.2.7-beta17

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
- // elBgId: 'pCircleProgressBgId', // 微信小程序中不能使用this.$pi形式动态生成id值,否则会报错
110
- // elId: 'pCircleProgressElId',
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
- createColorData() {
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
- let ctx = canvas.getContext('2d')
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 => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7beta16",
3
+ "version": "1.2.7beta17",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {