From 57f5fb6c994dd79cff74d411da49d8eedb3bb3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=9D=B0?= Date: Thu, 18 Apr 2024 17:23:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=A9=E5=B0=8Fpicker=E7=9A=84scale,?= =?UTF-8?q?=E5=B9=B6=E9=85=8D=E7=BD=AE=E6=96=87=E5=AD=97=E7=9A=84=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/lemon-tomatoes-peel.md | 5 +++++ .../src/components/WheelPicker/WheelPickerItem.tsx | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/lemon-tomatoes-peel.md diff --git a/.changeset/lemon-tomatoes-peel.md b/.changeset/lemon-tomatoes-peel.md new file mode 100644 index 0000000000..0aa92f9c75 --- /dev/null +++ b/.changeset/lemon-tomatoes-peel.md @@ -0,0 +1,5 @@ +--- +'@td-design/react-native-picker': patch +--- + +fix: 缩小picker的scale,并配置文字的超出效果 diff --git a/packages/react-native-picker/src/components/WheelPicker/WheelPickerItem.tsx b/packages/react-native-picker/src/components/WheelPicker/WheelPickerItem.tsx index d562361d6c..ed904caeff 100644 --- a/packages/react-native-picker/src/components/WheelPicker/WheelPickerItem.tsx +++ b/packages/react-native-picker/src/components/WheelPicker/WheelPickerItem.tsx @@ -23,7 +23,7 @@ function WheelPickerItem({ textStyle, style, visibleRest, height, option, index, opacityOutputRange.push(y); } - const scaleOutputRange = [1.3]; + const scaleOutputRange = [1.1]; for (let x = 1; x <= visibleRest + 1; x++) { const y = scaleFunction(x); scaleOutputRange.unshift(y); @@ -52,7 +52,9 @@ function WheelPickerItem({ textStyle, style, visibleRest, height, option, index, return ( - {option?.label} + + {option?.label} + ); }