🎈 perf(InputX组件): 修复input 组件输入过快会出现闪烁的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Input, View } from '@tarojs/components'
|
||||
import { memo, ReactHTMLElement, ReactNode, useDebugValue, useMemo } from 'react'
|
||||
import { View } from '@tarojs/components'
|
||||
import { memo, ReactNode, useMemo } from 'react'
|
||||
import IconFont from '../iconfont/iconfont'
|
||||
import InputX from '../InputX'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type Params = {
|
||||
@@ -47,7 +48,7 @@ export default memo((props: Params) => {
|
||||
)}
|
||||
<View className={styles.searchInput_con}>
|
||||
{(!props.children && (
|
||||
<Input disabled={disabled} placeholder={placeholder} onClick={() => clickOnInput?.()} onInput={e => changeOnInput?.(e.detail.value)} />
|
||||
<InputX disabled={disabled} placeholder={placeholder} onClick={() => clickOnInput?.()} onInput={e => changeOnInput?.(e.detail.value)} />
|
||||
)) || <>{props.children}</>}
|
||||
</View>
|
||||
{showIcon && <IconFont customClassName={styles.icon_more_self} name='icon-chakanquanbukehu' size={36} color='#333'></IconFont>}
|
||||
|
||||
Reference in New Issue
Block a user