患者1.2
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
/// <reference types="miniprogram-api-typings" />
|
||||
declare type CanvasContext = WechatMiniprogram.CanvasContext;
|
||||
type CanvasContext = WechatMiniprogram.CanvasContext;
|
||||
export declare function adaptor(ctx: CanvasContext & Record<string, unknown>): CanvasContext;
|
||||
export {};
|
||||
|
||||
@@ -98,6 +98,8 @@ var STEP = 1;
|
||||
var _a = this.data, color = _a.color, size = _a.size;
|
||||
if ((0, validator_1.isObj)(color)) {
|
||||
return this.getContext().then(function (context) {
|
||||
if (!context)
|
||||
return;
|
||||
var LinearColor = context.createLinearGradient(size, 0, 0, 0);
|
||||
Object.keys(color)
|
||||
.sort(function (a, b) { return parseFloat(a) - parseFloat(b); })
|
||||
@@ -142,6 +144,8 @@ var STEP = 1;
|
||||
var _this = this;
|
||||
var size = this.data.size;
|
||||
this.getContext().then(function (context) {
|
||||
if (!context)
|
||||
return;
|
||||
context.clearRect(0, 0, size, size);
|
||||
_this.renderLayerCircle(context);
|
||||
var formatValue = format(currentValue);
|
||||
|
||||
Reference in New Issue
Block a user