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

Picker组件在H5中选中值状态没有与小程序保持一致 #2253

Closed
WQone opened this issue Feb 25, 2019 · 5 comments
Closed

Picker组件在H5中选中值状态没有与小程序保持一致 #2253

WQone opened this issue Feb 25, 2019 · 5 comments
Assignees

Comments

@WQone
Copy link

WQone commented Feb 25, 2019

问题描述
Picker组件在H5中选中值状态没有与小程序保持一致

复现步骤
使用的代码为官网示例

state = {
    selector: ['美国', '中国', '巴西', '日本'],
    selectorChecked: '美国',
  };

  onChange = (e) => {
    this.setState({
      selectorChecked: this.state.selector[e.detail.value],
    });
  };

  render() {
    return (
      <View className="container">
        <View className="page-body">
          <View className="page-section">
            <Text>地区选择器</Text>
            <View>
              <Picker mode="selector" range={this.state.selector} onChange={this.onChange}>
                <View className="picker">当前选择:{this.state.selectorChecked}</View>
              </Picker>
            </View>
          </View>
        </View>
      </View>
    );
  }

期望行为
Picker组件在H5中对于选中的当前状态可以与小程序端表现一致

报错信息
H5端:选中后再展开选中值依然保持在0的位置
dfcdsf2

小程序端:正常
dfcdsf1

系统信息
Taro CLI 1.2.13 environment info:
System:
OS: Windows 10
Binaries:
Node: 8.12.0 - C:\Program Files\nodejs\node.EXE
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

@taro-bot
Copy link

taro-bot bot commented Feb 25, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@jinjinjin0731
Copy link
Contributor

请问你的 taro 是什么版本? 这个问题已经在之前已经修复过了

@taro-bot
Copy link

taro-bot bot commented Feb 25, 2019

CC @jinjinjin0731

@WQone
Copy link
Author

WQone commented Feb 25, 2019

@jinjinjin0731 v1.2.13

@jinjinjin0731
Copy link
Contributor

jinjinjin0731 commented Feb 25, 2019

@WQone 复现了,确实是个问题, 单列的没有修改。 多列的修改了。 近期修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants