diff --git a/packages/rax-countdown/CHANGELOG.md b/packages/rax-countdown/CHANGELOG.md index 3db4e7fc..c6cd9602 100644 --- a/packages/rax-countdown/CHANGELOG.md +++ b/packages/rax-countdown/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## v1.2.1 + +- Feat decrease setData data size for promote performance ## v1.2.0 diff --git a/packages/rax-countdown/package.json b/packages/rax-countdown/package.json index 29472141..900de395 100644 --- a/packages/rax-countdown/package.json +++ b/packages/rax-countdown/package.json @@ -1,6 +1,6 @@ { "name": "rax-countdown", - "version": "1.2.0", + "version": "1.2.1", "description": "Countdown component for Rax.", "license": "BSD-3-Clause", "main": "lib/index.js", diff --git a/packages/rax-countdown/src/miniapp-native/ali-miniapp/index.ts b/packages/rax-countdown/src/miniapp-native/ali-miniapp/index.ts index 259e8fad..ba75a0e1 100644 --- a/packages/rax-countdown/src/miniapp-native/ali-miniapp/index.ts +++ b/packages/rax-countdown/src/miniapp-native/ali-miniapp/index.ts @@ -88,11 +88,14 @@ Component({ case 'm': case 's': if (index % 2 === 0) { - // insert plain text before current matched item - return { - value: tpl.slice(lastPlaintextIndex, val), - style: textStyle - }; + const value = tpl.slice(lastPlaintextIndex, val); + if (value || textStyle) { + // insert plain text before current matched item + return { + value, + style: textStyle + }; + } } else { // replace current matched item to realtime string lastPlaintextIndex = val + 3;