File tree Expand file tree Collapse file tree 2 files changed +9
-21
lines changed
Expand file tree Collapse file tree 2 files changed +9
-21
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
2- // import { Failure } from '@nutui/icons-react-taro'
2+ import { Failure } from '@nutui/icons-react-taro'
33import { Cell , Tag } from '@nutui/nutui-react-taro'
44import Taro from '@tarojs/taro'
55
@@ -41,9 +41,7 @@ const Demo2 = () => {
4141 extra = {
4242 < Tag
4343 closeable
44- // TODO: icon 适配
45- closeIcon = "C"
46- // closeIcon={<Failure size={8} />}
44+ closeIcon = { < Failure size = { 8 } /> }
4745 onClose = { ( ) => Taro . showToast ( { title : 'Tag closed' } ) }
4846 type = "primary"
4947 >
Original file line number Diff line number Diff line change 1+ import type { MouseEvent } from 'react'
12import React , {
23 CSSProperties ,
34 FunctionComponent ,
4- useState ,
55 ReactNode ,
6+ useState ,
67} from 'react'
7- import type { MouseEvent } from 'react'
8- import { View , ITouchEvent , Text } from '@tarojs/components'
9- // import { Close } from '@nutui/icons-react-taro'
8+ import { ITouchEvent , View } from '@tarojs/components'
9+ import { Close } from '@nutui/icons-react-taro'
1010import classNames from 'classnames'
1111
1212import { BasicComponent , ComponentDefaults } from '@/utils/typings'
@@ -132,23 +132,13 @@ export const Tag: FunctionComponent<Partial<TagProps>> = (props) => {
132132 { closeIcon }
133133 </ View >
134134 ) : (
135- // TODO: icon 适配
136- // <Close
137- // size={8}
138- // onClick={(e) => {
139- // setVisible(false)
140- // onClose && onClose(e)
141- // }}
142- // />
143- < Text
135+ < Close
136+ size = { 8 }
144137 onClick = { ( e ) => {
145138 setVisible ( false )
146139 onClose && onClose ( e )
147140 } }
148- className = { `${ classPrefix } -custom-icon` }
149- >
150- X
151- </ Text >
141+ />
152142 ) }
153143 </ View >
154144 )
You can’t perform that action at this time.
0 commit comments