NervJS/taro

组件 Picker mode="time" 时,不生效

xushuailing opened this issue · 0 comments

相关平台

React Native

使用框架: React

复现步骤

  1. 使用脚手架提供的模板
  2. 复制 Picker 提供的 demo

期望结果

正常可以选择时分秒

实际结果

显示为年月日

环境信息

👽 Taro v3.6.25


  Taro CLI 3.6.25 environment info:
    System:
      OS: macOS 14.1.2
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.0/bin/yarn
      npm: 9.6.7 - ~/.nvm/versions/node/v18.17.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.6.25 => 3.6.25 
      @tarojs/components: 3.6.25 => 3.6.25 
      @tarojs/helper: 3.6.25 => 3.6.25 
      @tarojs/plugin-framework-react: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-alipay: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-h5: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-jd: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-qq: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-swan: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-tt: 3.6.25 => 3.6.25 
      @tarojs/plugin-platform-weapp: 3.6.25 => 3.6.25 
      @tarojs/react: 3.6.25 => 3.6.25 
      @tarojs/rn-runner: 3.6.25 => 3.6.25 
      @tarojs/rn-supporter: 3.6.25 => 3.6.25 
      @tarojs/runtime: 3.6.25 => 3.6.25 
      @tarojs/runtime-rn: 3.6.25 => 3.6.25 
      @tarojs/shared: 3.6.25 => 3.6.25 
      @tarojs/taro: 3.6.25 => 3.6.25 
      @tarojs/taro-loader: 3.6.25 => 3.6.25 
      @tarojs/taro-rn: 3.6.25 => 3.6.25 
      @tarojs/webpack5-runner: 3.6.25 => 3.6.25 
      babel-preset-taro: 3.6.25 => 3.6.25 
      eslint-config-taro: 3.6.25 => 3.6.25 
      expo: ~47.0.3 => 47.0.14 
      react: ^18.1.0 => 18.3.1 
      react-native: ^0.70.1 => 0.70.15 

补充信息

@tarojs/components-rn 的包中,依赖的 @ant-design/react-native 组件为 ^5.0.0

通过 yarn install 安装的版本为 @ant-design/react-native@5.1.3,在 @ant-design/react-native tag@5.1.0 有进行对 PickerRefactor 导致的不能正常使用 mode=time

$ npm ls @ant-design/react-native
taro-rn@1.0.0 /Users/xsl/web/service/nestjs-demo/taro-rn
└─┬ @tarojs/runtime-rn@3.6.25
  └─┬ @tarojs/components-rn@3.6.25
    └── @ant-design/react-native@5.1.3

通过添加下面配置可正常使用,把@ant-design/react-native 固定版本为 5.0.4

package.json

+ "resolutions": {
+   "@ant-design/react-native": "5.0.4",
+ }