From 3ec1be59d1da719962130f5a7c8a08ae298baf96 Mon Sep 17 00:00:00 2001 From: ashes1452 <16416236+ashes1452@user.noreply.gitee.com> Date: Tue, 21 Jul 2026 23:58:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(button):=20Button=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=87=B3=20react-native-elements?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/index.tsx | 53 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index e1ad810e..67cc6ec5 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -1,11 +1,9 @@ -import React, { FC } from 'react'; -import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'; -import { RectButton } from 'react-native-gesture-handler'; +import { FC } from 'react'; +import { StyleSheet, TouchableNativeFeedback, View } from 'react-native'; +import { Button as RNEButton } from 'react-native-elements'; import { ButtonProps } from '@/components/button/type'; - import useVisualScheme from '@/store/visualScheme'; - import { commonColors } from '@/styles/common'; const Button: FC = ({ @@ -16,29 +14,31 @@ const Button: FC = ({ children, }) => { const currentStyle = useVisualScheme(state => state.currentStyle); + const btnGlobalStyle = currentStyle?.button_style ?? {}; + const textGlobalStyle = currentStyle?.button_text_style ?? {}; + const ripplePurple = commonColors.lightPurple ?? '#B8A6F5'; + return ( - { - if (!isLoading) onPress?.(...props); - }} + onPress?.(true)} > - - {isLoading && ( - // 加载指示器 - )} - - {children} - + + - + ); }; @@ -49,10 +49,9 @@ const styles = StyleSheet.create({ overflow: 'hidden', }, button: { - flex: 1, + flexDirection: 'row', alignItems: 'center', justifyContent: 'center', - flexDirection: 'row', borderRadius: 6, }, });