taro icon indicating copy to clipboard operation
taro copied to clipboard

Input 组件设置 confirmType="search" 不生效

Open masterArwel opened this issue 3 years ago • 1 comments

相关平台

支付宝小程序

复现仓库

https://github.com/masterArwel/TaroApp 小程序基础库: 2.7.22 使用框架: React

复现步骤

编译 https://github.com/masterArwel/TaroApp 项目 支付宝开发工具预览,点击输入框,弹出的键盘右下角的确认按钮的文案没有变为”搜索“

期望结果

当设置 confirmType=search 时,手机键盘右下角的按钮文案变为”搜索“

实际结果

安卓手机键盘右下角按钮为:完成 苹果手机键盘右下角为:换行

环境信息

👽 Taro v3.4.13


  Taro CLI 3.4.13 environment info:
    System:
      OS: macOS 12.0.1
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 16.15.0 - /usr/local/bin/node
      Yarn: 1.22.19 - /usr/local/bin/yarn
      npm: 8.5.5 - /usr/local/bin/npm
    npmPackages:
      @tarojs/components: 3.4.13 => 3.4.13 
      @tarojs/mini-runner: 3.4.13 => 3.4.13 
      @tarojs/plugin-framework-react: 3.4.13 => 3.4.13 
      @tarojs/react: 3.4.13 => 3.4.13 
      @tarojs/runtime: 3.4.13 => 3.4.13 
      @tarojs/taro: 3.4.13 => 3.4.13 
      @tarojs/webpack-runner: 3.4.13 => 3.4.13 
      babel-preset-taro: 3.4.13 => 3.4.13 
      eslint-config-taro: 3.4.13 => 3.4.13 
      react: ^17.0.0 => 17.0.2 


补充信息

支付宝原生是可以正常展示为搜索的

masterArwel avatar Jul 06 '22 08:07 masterArwel

这个问题我遇到了,等解决方案

"@babel/runtime": "^7.7.7", "@nutui/nutui-taro": "3.2.1", "@tarojs/components": "3.4.12", "@tarojs/plugin-framework-vue3": "3.4.12", "@tarojs/plugin-html": "3.4.12", "@tarojs/runtime": "3.4.12", "@tarojs/taro": "3.4.12", "@types/crypto-js": "^4.1.1", "crypto-js": "^4.1.1", "vue": "^3.0.0"

xflihaibo avatar Sep 16 '22 05:09 xflihaibo

+1

nmsn avatar Nov 25 '22 06:11 nmsn

<Input /> 组件 加上 enableNative 属性即可

https://opendocs.alipay.com/mini/component/input

confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system

因为taro 会自动给 <Input /> 组件 加上 enableNative 属性并赋默认值false

TheKonka avatar Nov 27 '22 04:11 TheKonka

Hello~

你的问题楼上已经提供了解决方案,如果没有更多的问题这个 issue 将在 7 天后被自动关闭。

如果您在这 7 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

taro-bot2[bot] avatar Nov 27 '22 04:11 taro-bot2[bot]