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

Html5 feature picker #1668

Closed

Conversation

zhangquan
Copy link
Contributor

在浏览器端实现picker组件

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2016

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@Hanks10100
Copy link
Member

@zhangquan You should sign the CLA before merging this PR.

@MrRaindrop
Copy link
Member

这个 module 是否已经在其他端实现了 ?如果要把某个组件列入 weex 的核心组件库,即默认集成进 weex 的 render 或者 sdk 里,最好先提一个 spec / proposal 的 issue,weex 开发组评估确认集成这个组件 / module 以后,再提相关 pr 。否则单独提某个平台的实现的 pr 感觉没什么太大意义,一方面三端没有统一的实现,另一方面没有形成统一的接口规范和文档。

建议如果只是自己项目里用到这个 feature ,建议参考扩展 api / 组件的文档( CN )自行进行扩展,自行用在自己的项目里即可。希望共享出来给大家使用,可以将组件 / module 单独发到 npm。如果希望把组件集成到 weex sdk / h5 render 里,建议先提一个 [proposal] 的 issue,由 weex 团队评估一下这个功能集成进主仓库是否合适,同时也方便大家讨论在三个端上的一致实现。

@zhangquan
Copy link
Contributor Author

这个模块三端都会实现,相关pr,
ios: #1559
andorid: sospartan/weex#40

API

picker 选择器

  • 名字
  • picker
  • 类型
  • module
  • api
    1. 调用单选picker
      • pick( options )
        • options:单选的字典
          index:默认选中的选项(int)
          items:picker数据源(array)
      • callback(options) 选择后回调
        • options:返回的选择结果的字典{string result,string data}(dictionary)
          result:结果三种类型 success,cancel,error(string)
          data:选择的选项(number)

@zhangquan zhangquan closed this Nov 23, 2016
@zhangquan zhangquan deleted the html5-feature-picker branch November 23, 2016 06:45
@zhangquan zhangquan mentioned this pull request Nov 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants