From 9d4064eaeb3dbca547b2ab0307066c2081ec986a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=A6=82=E6=91=B8=E9=B1=BC=E5=8E=BB?= <1780903673@qq.com> Date: Sat, 30 Nov 2024 14:47:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E4=BD=BF=E7=94=A8=20requestAnimationFrame=20=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E5=A4=8D=E5=BE=AE=E4=BF=A1=E5=B0=8F?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E6=8A=A5=E9=94=99=E6=96=B9=E6=B3=95=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=AE=9A=E4=B9=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: $549 --- .../wot-design-uni/components/common/util.ts | 2 +- .../monthPanel/month-panel.vue | 46 +++++++------- .../wd-calendar-view/yearPanel/year-panel.vue | 44 +++++++------- .../components/wd-calendar/wd-calendar.vue | 11 ++-- .../wd-collapse-item/wd-collapse-item.vue | 23 ++++--- .../components/wd-index-bar/wd-index-bar.vue | 9 ++- .../components/wd-input/wd-input.vue | 23 ++++--- .../components/wd-search/wd-search.vue | 60 +++++++------------ .../components/wd-segmented/wd-segmented.vue | 9 ++- .../wd-select-picker/wd-select-picker.vue | 41 ++++++------- .../components/wd-sticky/wd-sticky.vue | 13 ++-- .../components/wd-textarea/wd-textarea.vue | 23 ++++--- .../wd-transition/wd-transition.vue | 12 ++-- 13 files changed, 144 insertions(+), 172 deletions(-) diff --git a/src/uni_modules/wot-design-uni/components/common/util.ts b/src/uni_modules/wot-design-uni/components/common/util.ts index a638f49f5..1f21718c2 100644 --- a/src/uni_modules/wot-design-uni/components/common/util.ts +++ b/src/uni_modules/wot-design-uni/components/common/util.ts @@ -443,7 +443,7 @@ export const requestAnimationFrame = (cb = () => {}) => { * @param ms 延迟时间 * @returns */ -export const pause = (ms: number) => { +export const pause = (ms: number = 1000 / 30) => { return new AbortablePromise((resolve) => { const timer = setTimeout(() => { clearTimeout(timer) diff --git a/src/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue b/src/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue index 56dc2ef84..dbcbf5198 100644 --- a/src/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue +++ b/src/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue @@ -63,7 +63,7 @@ export default {