@tuya-miniapp/smart-ui 2.3.3-beta-5 → 2.3.3-beta-6
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/dist/circle/index.js +17 -17
- package/dist/circle/index.wxml +1 -1
- package/lib/circle/index.js +17 -17
- package/lib/circle/index.wxml +1 -1
- package/package.json +1 -1
package/dist/circle/index.js
CHANGED
@@ -95,6 +95,20 @@ SmartComponent({
|
|
95
95
|
});
|
96
96
|
},
|
97
97
|
});
|
98
|
+
const sizeVal = this.parseSize();
|
99
|
+
const params = {
|
100
|
+
canvasWidth: +sizeVal,
|
101
|
+
canvasHeight: +sizeVal,
|
102
|
+
width: +sizeVal,
|
103
|
+
height: +sizeVal,
|
104
|
+
lineWidth: this.data.trackWidth,
|
105
|
+
trackColor: this.data.trackColor,
|
106
|
+
fillColor: this.data.fillColor,
|
107
|
+
fillColorStops: this.data.fillColorStops,
|
108
|
+
maskColor: this.data.maskColor,
|
109
|
+
dpr: this.data.dpr,
|
110
|
+
};
|
111
|
+
this.setData(params);
|
98
112
|
},
|
99
113
|
renderAll(canvas, ctx, progress, ops = {
|
100
114
|
lineCap: 'round',
|
@@ -245,28 +259,14 @@ SmartComponent({
|
|
245
259
|
render(val, canvasId) {
|
246
260
|
// @ts-ignore
|
247
261
|
const context = ty.createCanvasContext(canvasId);
|
248
|
-
const sizeVal = this.parseSize();
|
249
|
-
const params = {
|
250
|
-
canvasWidth: +sizeVal,
|
251
|
-
canvasHeight: +sizeVal,
|
252
|
-
width: +sizeVal,
|
253
|
-
height: +sizeVal,
|
254
|
-
lineWidth: this.data.trackWidth,
|
255
|
-
trackColor: this.data.trackColor,
|
256
|
-
fillColor: this.data.fillColor,
|
257
|
-
fillColorStops: this.data.fillColorStops,
|
258
|
-
maskColor: this.data.maskColor,
|
259
|
-
dpr: this.data.dpr,
|
260
|
-
};
|
261
|
-
this.setData(params);
|
262
262
|
if (this.data.mode === 'basic') {
|
263
|
-
this.renderAll(
|
263
|
+
this.renderAll(this.data, context, val / 100, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
264
264
|
}
|
265
265
|
if (this.data.mode === 'angle') {
|
266
|
-
this.renderHalf(
|
266
|
+
this.renderHalf(this.data, context, val / 200, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
267
267
|
}
|
268
268
|
if (this.data.mode === 'angle2') {
|
269
|
-
this.renderHalf2(
|
269
|
+
this.renderHalf2(this.data, context, val / 150, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
270
270
|
}
|
271
271
|
},
|
272
272
|
},
|
package/dist/circle/index.wxml
CHANGED
package/lib/circle/index.js
CHANGED
@@ -99,6 +99,20 @@ var idListRef = {
|
|
99
99
|
});
|
100
100
|
},
|
101
101
|
});
|
102
|
+
var sizeVal = this.parseSize();
|
103
|
+
var params = {
|
104
|
+
canvasWidth: +sizeVal,
|
105
|
+
canvasHeight: +sizeVal,
|
106
|
+
width: +sizeVal,
|
107
|
+
height: +sizeVal,
|
108
|
+
lineWidth: this.data.trackWidth,
|
109
|
+
trackColor: this.data.trackColor,
|
110
|
+
fillColor: this.data.fillColor,
|
111
|
+
fillColorStops: this.data.fillColorStops,
|
112
|
+
maskColor: this.data.maskColor,
|
113
|
+
dpr: this.data.dpr,
|
114
|
+
};
|
115
|
+
this.setData(params);
|
102
116
|
},
|
103
117
|
renderAll: function (canvas, ctx, progress, ops) {
|
104
118
|
if (ops === void 0) { ops = {
|
@@ -252,28 +266,14 @@ var idListRef = {
|
|
252
266
|
render: function (val, canvasId) {
|
253
267
|
// @ts-ignore
|
254
268
|
var context = ty.createCanvasContext(canvasId);
|
255
|
-
var sizeVal = this.parseSize();
|
256
|
-
var params = {
|
257
|
-
canvasWidth: +sizeVal,
|
258
|
-
canvasHeight: +sizeVal,
|
259
|
-
width: +sizeVal,
|
260
|
-
height: +sizeVal,
|
261
|
-
lineWidth: this.data.trackWidth,
|
262
|
-
trackColor: this.data.trackColor,
|
263
|
-
fillColor: this.data.fillColor,
|
264
|
-
fillColorStops: this.data.fillColorStops,
|
265
|
-
maskColor: this.data.maskColor,
|
266
|
-
dpr: this.data.dpr,
|
267
|
-
};
|
268
|
-
this.setData(params);
|
269
269
|
if (this.data.mode === 'basic') {
|
270
|
-
this.renderAll(
|
270
|
+
this.renderAll(this.data, context, val / 100, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
271
271
|
}
|
272
272
|
if (this.data.mode === 'angle') {
|
273
|
-
this.renderHalf(
|
273
|
+
this.renderHalf(this.data, context, val / 200, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
274
274
|
}
|
275
275
|
if (this.data.mode === 'angle2') {
|
276
|
-
this.renderHalf2(
|
276
|
+
this.renderHalf2(this.data, context, val / 150, this.data.round ? { lineCap: 'round' } : { lineCap: '' });
|
277
277
|
}
|
278
278
|
},
|
279
279
|
},
|
package/lib/circle/index.wxml
CHANGED