From 2555b26b1ba436d50bcb30995d9e5d0407d5ce81 Mon Sep 17 00:00:00 2001 From: oasis Date: Fri, 8 Nov 2024 11:32:37 +0800 Subject: [PATCH] feat: update icon --- src/packages/button/button.taro.tsx | 4 +- src/packages/button/demos/taro/demo4.tsx | 355 +++++++-------------- src/packages/button/demos/taro/demo5.tsx | 373 ++++++++--------------- 3 files changed, 239 insertions(+), 493 deletions(-) diff --git a/src/packages/button/button.taro.tsx b/src/packages/button/button.taro.tsx index 8903271d79..03bba559ab 100644 --- a/src/packages/button/button.taro.tsx +++ b/src/packages/button/button.taro.tsx @@ -158,9 +158,7 @@ export const Button = React.forwardRef>( onClick={(e) => handleClick(e as any)} > - {loading && !harmonyAndRn() && ( - - )} + {loading && } {!loading && icon ? icon : null} {children && ( { @@ -13,243 +12,121 @@ const Demo4 = () => { } return ( <> - {!harmonyAndRn() ? ( - - - - - - - - - - - - ) : ( - - - - - - - - - - - - )} + + + + + + + + + + + ) } diff --git a/src/packages/button/demos/taro/demo5.tsx b/src/packages/button/demos/taro/demo5.tsx index 2f3775630c..fb5e4bb308 100644 --- a/src/packages/button/demos/taro/demo5.tsx +++ b/src/packages/button/demos/taro/demo5.tsx @@ -1,7 +1,6 @@ import React from 'react' import { Button, Cell } from '@nutui/nutui-react-taro' -import { Star, Plus } from '@nutui/icons-react-taro' -import { harmonyAndRn, harmony } from '@/utils/platform-taro' +import { Plus, Star } from '@nutui/icons-react-taro' import pxTransform from '@/utils/px-transform' const Demo5 = () => { @@ -13,255 +12,127 @@ const Demo5 = () => { } return ( <> - {!harmonyAndRn() ? ( - - - - - - - - - - - - ) : ( - - - - - - - - - - - - )} + + + + + + + + + + + ) }