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

1.6.5版本的pickView选择器组件按照官方demo,真机上显示上下结构并非左右结构?react-navigation下的一个纯净页面。 #1795

Closed
huangnan1994 opened this issue Sep 5, 2017 · 12 comments

Comments

@huangnan1994
Copy link

What problem does this feature solve?

希望能得到官方栗子的效果。

What does the proposed API look like?

希望能得到官方栗子的效果。

@ant-design-bot
Copy link

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.
See: ant-design/ant-design#4897

@huangnan1994
Copy link
Author

image

@ant-design-bot
Copy link

Hello @huangnan1994. Please provide a re-producible demo: https://codepen.io/pen?template=LWpaKe&editors=0010

@huangnan1994
Copy link
Author

import React, {Component} from 'react';
import {PickerView} from 'antd-mobile';

export default class DiscoveryPage extends Component {
  constructor(props) {
      super(props);
      this.state = {
          value: null,
      };
 }

onChange(value) {
     console.log(value);
     this.setState({
         value,
    });
  };

 componentDidMount() {
  }

static navigationOptions = {
    header: null,
};

render() {
    const seasons = [
        [
            {
                label: '2013',
                value: '2013',
            },
            {
                label: '2014',
                value: '2014',
            },
        ],
        [
            {
                label: '春',
                value: '春',
            },
            {
                label: '夏',
                value: '夏',
            },
        ],
    ];
    return (
        <PickerView
            onChange={this.onChange.bind(this)}
            value={this.state.value}
            data={seasons}
            cascade={false}
        />
    );
}
}

@huangnan1994
Copy link
Author

有人回答一下么

@huangnan1994
Copy link
Author

额?

@zhang740
Copy link
Contributor

zhang740 commented Sep 7, 2017

只有这个组件看不出什么,请提供一个完整点的例子,可以提交一个github仓库。 @huangnan1994

@silentcloud
Copy link
Contributor

@huangnan1994 这个问题已经修过了的 9d2a330 ,只是没发布 1.6.6

@zhang740 明天发 2.0 beta 的时候 , 1.x 也发个版本

@huangnan1994
Copy link
Author

谢谢

@silentcloud
Copy link
Contributor

这个 9 月9 号已经发了 1.6.6

@huangnan1994
Copy link
Author

我直接更新了1.66,情况没有发生改变,升级到2.0-beta,就直接报错;

@silentcloud
Copy link
Contributor

囧,我更新了 picker,忽略 picker-view 了,我等会再发一个版本

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

6 participants