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

Ios feature picker #1559

Merged
merged 4 commits into from
Nov 3, 2016
Merged

Conversation

kfeagle
Copy link
Contributor

@kfeagle kfeagle commented Nov 2, 2016

在千牛的工作台模块中添加选择功能的时候
没有通用性的picker,千牛无法实现城市的选择,订单搜索条件过滤等功能
期望:
实现通用性的picker
解决方案:
实现picker组件

具体方案及接口
组件名字
picker
普通单选选择器:

  • 名字
  • picker
  • 类型
  • module
  • api
    1. 调用单选picker
      • pick( options )
        • options:单选的字典
          • index:默认选中的选项(int)
          • items:picker数据源(array)
      • callback(options) 选择后回调
        • options:返回的选择结果的字典
          • result:结果三种类型 success,cancel,error(string)
          • data:选择的选项,仅成功确认时候存在(number)
      • 测试用例[picker]单选picker例子
        使用例子
pick:function (e)
      {
        var picker = require('@weex-module/picker');
        var items = new Array("Saab","Volvo","BMW");
        var index = 0;
        var self = this;
        picker.pick({
          'items':items,
          'index':index
        },function (ret) {
          var result = ret.result;
          if(result == 'success')
          {
            self.value = items[ret.data];
          }
        });
      }

相关PR
android picker 40

参考 http://velocity.alibaba-inc.com/issues/3034

@kfeagle kfeagle closed this Nov 2, 2016
@kfeagle kfeagle reopened this Nov 2, 2016
@boboning boboning merged commit b6b7ad5 into alibaba:ios-feature-20161118 Nov 3, 2016
@zhangquan zhangquan mentioned this pull request Nov 22, 2016
@kfeagle kfeagle mentioned this pull request Nov 24, 2016
@kfeagle kfeagle deleted the ios-feature-picker branch November 24, 2016 02:37
@cxfeng1-zz
Copy link
Contributor

@kfeagle github issue 上不要贴内部链接

@zhangquan zhangquan mentioned this pull request Nov 24, 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