🎈 perf(InputX组件): 修复input 组件输入过快会出现闪烁的问题

This commit is contained in:
xuan
2022-11-23 19:35:32 +08:00
parent 457d109d37
commit 425eb9e3ae
11 changed files with 59 additions and 35 deletions
+24
View File
@@ -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