From c02dae1f0ff865eb0edd664ede7f1fd71f433a56 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Mon, 11 Nov 2024 14:43:32 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(rate):=20=E5=A4=9A=E7=AB=AF=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config.json | 2 +- src/packages/rate/demo.taro.tsx | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/config.json b/src/config.json index cd08dd2e36..9a5633de4f 100644 --- a/src/config.json +++ b/src/config.json @@ -621,7 +621,7 @@ "author": "vickyYe" }, { - "version": "2.0.0", + "version": "3.0.0", "name": "Rate", "type": "component", "cName": "评分", diff --git a/src/packages/rate/demo.taro.tsx b/src/packages/rate/demo.taro.tsx index 3b8efe21f0..a7291396f9 100644 --- a/src/packages/rate/demo.taro.tsx +++ b/src/packages/rate/demo.taro.tsx @@ -4,18 +4,18 @@ import { View, ScrollView } from '@tarojs/components' import { Cell } from '@nutui/nutui-react-taro' import Header from '@/sites/components/header' import { useTranslate } from '@/sites/assets/locale/taro' -// import Demo1 from './demos/taro/demo1' -// import Demo2 from './demos/taro/demo2' -// import Demo3 from './demos/taro/demo3' -// import Demo4 from './demos/taro/demo4' -// import Demo5 from './demos/taro/demo5' -// import Demo6 from './demos/taro/demo6' -// import Demo7 from './demos/taro/demo7' -// import Demo8 from './demos/taro/demo8' -// import Demo9 from './demos/taro/demo9' -// import Demo10 from './demos/taro/demo10' -// import Demo11 from './demos/taro/demo11' -// import Demo12 from './demos/taro/demo12' +import Demo1 from './demos/taro/demo1' +import Demo2 from './demos/taro/demo2' +import Demo3 from './demos/taro/demo3' +import Demo4 from './demos/taro/demo4' +import Demo5 from './demos/taro/demo5' +import Demo6 from './demos/taro/demo6' +import Demo7 from './demos/taro/demo7' +import Demo8 from './demos/taro/demo8' +import Demo9 from './demos/taro/demo9' +import Demo10 from './demos/taro/demo10' +import Demo11 from './demos/taro/demo11' +import Demo12 from './demos/taro/demo12' const RateDemo = () => { const [translated] = useTranslate({ @@ -73,10 +73,9 @@ const RateDemo = () => { {translated.basic} - TODO:icon 问题需先解决 - {/* */} + - {/* + {translated.control} @@ -130,7 +129,7 @@ const RateDemo = () => { {translated.touchend} - */} + ) From e4187f6977b35dea7f774bd921197034324e06d2 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Thu, 14 Nov 2024 11:30:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20harmony=E6=A0=B7=E5=BC=8F=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/rate/rate.harmony.css | 8 +++++--- src/packages/rate/rate.scss | 9 +++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/packages/rate/rate.harmony.css b/src/packages/rate/rate.harmony.css index 377f975d3f..47fd7805cb 100644 --- a/src/packages/rate/rate.harmony.css +++ b/src/packages/rate/rate.harmony.css @@ -30,11 +30,13 @@ } .nut-rate-item-icon { display: flex; - color: #FF0F23; cursor: pointer; } -.nut-rate-item-icon-disabled { - color: #C2C4CC; +.nut-rate-item-icon .nut-icon { + color: #ff0f23; +} +.nut-rate-item-icon-disabled .nut-icon { + color: #c2c4cc; } .nut-rate-item-icon.nut-rate-item-icon.nut-rate-item-icon-half { position: absolute; diff --git a/src/packages/rate/rate.scss b/src/packages/rate/rate.scss index 2c13182e97..a8b0aa10b2 100644 --- a/src/packages/rate/rate.scss +++ b/src/packages/rate/rate.scss @@ -39,11 +39,16 @@ &-icon { display: flex; - color: $rate-icon-color; cursor: pointer; + .nut-icon { + color: $rate-icon-color; + } + &-disabled { - color: $rate-icon-inactive-color; + .nut-icon { + color: $rate-icon-inactive-color; + } } &.nut-rate-item-icon.nut-rate-item-icon-half { From 1bf926bb80b6c083423041c89e7689ac9c3aecd3 Mon Sep 17 00:00:00 2001 From: songchenglin3 <353833373@qq.com> Date: Thu, 14 Nov 2024 14:33:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20harmony=E6=A0=B7=E5=BC=8F=E9=80=82?= =?UTF-8?q?=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/rate/demo.taro.tsx | 22 +++++++++++++--------- src/packages/rate/rate.harmony.css | 6 +++--- src/packages/rate/rate.scss | 6 +++--- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/packages/rate/demo.taro.tsx b/src/packages/rate/demo.taro.tsx index a7291396f9..ae2f0fd066 100644 --- a/src/packages/rate/demo.taro.tsx +++ b/src/packages/rate/demo.taro.tsx @@ -4,6 +4,7 @@ import { View, ScrollView } from '@tarojs/components' import { Cell } from '@nutui/nutui-react-taro' import Header from '@/sites/components/header' import { useTranslate } from '@/sites/assets/locale/taro' +import { harmony } from '@/utils/platform-taro' import Demo1 from './demos/taro/demo1' import Demo2 from './demos/taro/demo2' import Demo3 from './demos/taro/demo3' @@ -120,16 +121,19 @@ const RateDemo = () => { + {harmony() ? null : ( + <> + {translated.touchable} + + + - {translated.touchable} - - - - - {translated.touchend} - - - + {translated.touchend} + + + + + )} ) diff --git a/src/packages/rate/rate.harmony.css b/src/packages/rate/rate.harmony.css index 47fd7805cb..3b23367383 100644 --- a/src/packages/rate/rate.harmony.css +++ b/src/packages/rate/rate.harmony.css @@ -12,10 +12,10 @@ display: flex; flex-shrink: 0; position: relative; - margin-right: 14px; + margin-left: 14px; } -.nut-rate-item:last-child { - margin-right: 0; +.nut-rate-item:first-child { + margin-left: 0; } .nut-rate-item-half { position: absolute; diff --git a/src/packages/rate/rate.scss b/src/packages/rate/rate.scss index a8b0aa10b2..48a1dd1d8d 100644 --- a/src/packages/rate/rate.scss +++ b/src/packages/rate/rate.scss @@ -18,10 +18,10 @@ display: flex; flex-shrink: 0; position: relative; - margin-right: $rate-item-margin; + margin-left: $rate-item-margin; - &:last-child { - margin-right: 0; + &:first-child { + margin-left: 0; } &-half {