Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input输入框ios收起键盘会重置上一次的 #2408

Open
github149 opened this issue Jul 3, 2024 · 1 comment
Open

Input输入框ios收起键盘会重置上一次的 #2408

github149 opened this issue Jul 3, 2024 · 1 comment
Labels
to be closed 未提供最小化可复现 demo 且长期无进展的 issue

Comments

@github149
Copy link

NutUI React 包名

@nutui/nutui-react

NutUI React 版本号

1.5.13

平台

weapp

重现链接

2

重现步骤

const [userInfo, setUserInfo] = useState({
keyContent: "", //密码
});
const [isPasInput, setIsPasInput] = useState(true);
<Input
label=""
defaultValue={userInfo.keyContent}
placeholder="请输入6-10位数字密码"
border={false}
value={userInfo.keyContent}
type="number"
maxlength="10"
password={isPasInput}
rightIcon={isPasInput ? "eye" : "marshalling"}
onClickRightIcon={() =>
setIsPasInput(isPasInput ? false : true)
}
onChange={(v) => {
console.log('userInfo.keyContent-----', userInfo.keyContent)
setUserInfo({ ...userInfo, keyContent: v })
}}
/>

期望的结果是什么?

ios上输入几个字符后,关闭键盘,点击再次输入,显示字符包含上一次显示的,比如当输入123,关闭键盘,再次输入框中输入456,应该显示123456六位数字。

实际的结果是什么?

ios上输入几个字符后,关闭键盘,点击再次输入,不包含上一次,比如当输入123,关闭键盘,再次输入框中输入456,实际上显示456

环境信息

Taro v3.6.28

process.env.NODE_ENV undefined

Taro CLI 3.6.28 environment info:
System:
OS: Windows 10 10.0.22631
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
@tarojs/cli: 3.6.8 => 3.6.8
@tarojs/components: 3.6.8 => 3.6.8
@tarojs/helper: 3.6.8 => 3.6.8
@tarojs/mini-runner: ^3.6.8 => 3.6.8
@tarojs/plugin-framework-react: 3.6.8 => 3.6.8
@tarojs/plugin-html: 3.6.8 => 3.6.8
@tarojs/plugin-platform-alipay: 3.6.8 => 3.6.8
@tarojs/plugin-platform-h5: 3.6.8 => 3.6.8
@tarojs/plugin-platform-jd: 3.6.8 => 3.6.8
@tarojs/plugin-platform-qq: 3.6.8 => 3.6.8
@tarojs/plugin-platform-swan: 3.6.8 => 3.6.8
@tarojs/plugin-platform-tt: 3.6.8 => 3.6.8
@tarojs/plugin-platform-weapp: ^3.6.17 => 3.6.17
@tarojs/react: 3.6.8 => 3.6.8
@tarojs/runtime: 3.6.8 => 3.6.8
@tarojs/shared: 3.6.8 => 3.6.8
@tarojs/taro: 3.6.8 => 3.6.8
@tarojs/taro-loader: 3.6.8 => 3.6.8
@tarojs/webpack5-runner: 3.6.8 => 3.6.8
babel-preset-taro: 3.6.8 => 3.6.8
eslint-config-taro: 3.6.8 => 3.6.8
react: ^18.0.0 => 18.2.0

其他补充信息

node 16.15.1

@oasis-cloud
Copy link
Collaborator

@tarojs/plugin-platform-weapp: ^3.6.17 => 3.6.17 版本需要和 taro 保持一致。

@Alex-huxiyang Alex-huxiyang added the to be closed 未提供最小化可复现 demo 且长期无进展的 issue label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be closed 未提供最小化可复现 demo 且长期无进展的 issue
Projects
None yet
Development

No branches or pull requests

3 participants