From 41b4bda9bdea226ae5228c8a9a6aee988c9869a1 Mon Sep 17 00:00:00 2001 From: "tianhaoyun@didiglobal.com" Date: Mon, 13 Jan 2025 15:35:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20rate=E4=B8=AD=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8F=92=E6=A7=BD=E5=8A=9F=E8=83=BD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/pages/rate/index.mpx | 24 ++++++++++++++----- package.json | 2 +- .../__tests__/components/rate/rate.spec.js | 6 ++--- .../mpx-cube-ui/src/components/rate/index.mpx | 10 ++++---- .../mpx-cube-ui/src/components/rate/index.ts | 4 ++-- .../src/components/rate/rate-item-index.ts | 6 ++--- .../src/components/rate/rate-item.mpx | 7 +++--- 7 files changed, 35 insertions(+), 24 deletions(-) diff --git a/example/pages/rate/index.mpx b/example/pages/rate/index.mpx index 3181d38..e2a8fd0 100644 --- a/example/pages/rate/index.mpx +++ b/example/pages/rate/index.mpx @@ -3,7 +3,10 @@ - + + + + @@ -39,8 +42,8 @@ CustomStar @@ -70,7 +73,7 @@ data: { value: 4.5, max: '5', - customStar: false, + customize: false, justify: false, allowHalf: true, disabled: true, @@ -98,9 +101,9 @@ const { value } = e.detail this.justify = value }, - updateCustomStar (e) { + updateCustomize (e) { const { value } = e.detail - this.customStar = value + this.customize = value }, updateAllowHalf (e) { const { value } = e.detail @@ -115,6 +118,11 @@ padding-top: 10px height 100% background-color rgba(239, 239, 244, .7) + .rate-item-demo + width: 100% + height: 100% + background-size: 100% + background-color: grey .options margin: 20px 0 .rate-option-list @@ -144,6 +152,10 @@ border-bottom: none .desc margin-top 15px + +.cube-rate-item_active + .rate-item-demo + background-color: orange @@ -20,8 +21,6 @@ content: "" display: block padding: $var(rate-item-after-padding) - &:last-child - margin-right: $var(rate-item-last-child-margin-right) .cube-rate-item-def position: absolute width: $var(rate-item-def-width)