From f647654ccbaf7c18b6637e7a228ae4fe142255ba Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 23 Jun 2025 17:36:59 +0800 Subject: [PATCH 1/2] fix: disable increaseEffect in label did not take effect --- .../src/animation/label-animate.ts | 20 ++++++++++--------- packages/vrender-components/src/label/base.ts | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/vrender-components/src/animation/label-animate.ts b/packages/vrender-components/src/animation/label-animate.ts index 031d16f83..fae35b416 100644 --- a/packages/vrender-components/src/animation/label-animate.ts +++ b/packages/vrender-components/src/animation/label-animate.ts @@ -10,7 +10,7 @@ export class LabelUpdate extends AComponentAnimate { const duration = this.duration; const easing = this.easing; - const { prevText, curText, prevLabelLine, curLabelLine } = this.params; + const { prevText, curText, prevLabelLine, curLabelLine, increaseEffect = true } = this.params; const diff: Record = {}; for (const key in curText.attribute) { @@ -28,14 +28,16 @@ export class LabelUpdate extends AComponentAnimate { easing }); - animator.animate(prevText, { - type: 'increaseCount', - to: { - text: curText.attribute.text - }, - duration, - easing - }); + if (increaseEffect !== false) { + animator.animate(prevText, { + type: 'increaseCount', + to: { + text: curText.attribute.text + }, + duration, + easing + }); + } if (prevLabelLine) { animator.animate(prevLabelLine, { diff --git a/packages/vrender-components/src/label/base.ts b/packages/vrender-components/src/label/base.ts index 67f23a849..93a1b5157 100644 --- a/packages/vrender-components/src/label/base.ts +++ b/packages/vrender-components/src/label/base.ts @@ -853,8 +853,8 @@ export class LabelBase extends AnimateComponent { name: 'update', animation: { type: 'labelUpdate', - ...this._animationConfig.update, customParameters: { + ...this._animationConfig.update, prevText, curText, prevLabelLine, From c10c4b53a422dd30180fc645979b6786120e1528 Mon Sep 17 00:00:00 2001 From: xiaoluoHe Date: Mon, 23 Jun 2025 17:39:58 +0800 Subject: [PATCH 2/2] docs: update changelog of rush --- ...sable-increaseEffect-not-work_2025-06-23-09-39.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vrender-animate/fix-label-disable-increaseEffect-not-work_2025-06-23-09-39.json diff --git a/common/changes/@visactor/vrender-animate/fix-label-disable-increaseEffect-not-work_2025-06-23-09-39.json b/common/changes/@visactor/vrender-animate/fix-label-disable-increaseEffect-not-work_2025-06-23-09-39.json new file mode 100644 index 000000000..58529004d --- /dev/null +++ b/common/changes/@visactor/vrender-animate/fix-label-disable-increaseEffect-not-work_2025-06-23-09-39.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-animate", + "comment": "fix: disable increaseEffect in label did not take effect", + "type": "none" + } + ], + "packageName": "@visactor/vrender-animate" +} \ No newline at end of file