🎈 perf(InputX组件): 修复input 组件输入过快会出现闪烁的问题
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { CustomWrapper, Input, View } from "@tarojs/components"
|
||||
import React, { FC } from "react"
|
||||
// 解决 input 组件输入过快会出现闪烁的问题
|
||||
// https://github.com/NervJS/taro/issues/9664
|
||||
interface PropsType {
|
||||
customClassName?: string
|
||||
customStyle?: React.CSSProperties
|
||||
customInputStyle?: React.CSSProperties
|
||||
customInputClassName?: string
|
||||
[Property: string]: any
|
||||
}
|
||||
const InputX: FC<PropsType> = (props) => {
|
||||
const {customClassName, customStyle,customInputStyle, customInputClassName,...inputProps} = props
|
||||
console.log('props', props);
|
||||
return (
|
||||
<View className={customClassName} style={customStyle}>
|
||||
<CustomWrapper>
|
||||
<Input className={customInputClassName} style={customInputStyle} {...inputProps} ></Input>
|
||||
</CustomWrapper>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default InputX
|
||||
Reference in New Issue
Block a user