2.3.12 • Published 5 years ago

nuke-web-picker v2.3.12

Weekly downloads
89
License
Apache-2.0
Repository
gitlab
Last release
5 years ago

WebPicker

  • category: Components
  • chinese: web 版本 picker
  • type: basic

Usage

Web version encapsulation

API

Picker.show(options,onSelect,onCancel,onShow,onFail)

  • options params
ParameterDescriptionTypeDefault
titletitlestring
dataSourcetree structure, or arrayarray
selectedKeythe default value of the Picker(uncontrolled)string or arraynull
hasToolbarhas a top bar, or notbooleanfalse
hasToolbarButtonhas a top button ( confirm, cancel ), or notbooleanfalse
hasBottomButtonhas a bottom buttonbooleanfalse
buttonStylestyle of bottom buttonobject
maskClosableclick the floating layer to closed, or notbooleantrue
localebutton copyobject{cancel: 'Cancel',confirm: 'Confirm'}
  • onSelect: Click ok to confirm the triggered event
  • onCancel: Cancels the triggered event
  • onShow: Successfully render the triggered event
  • onFail: Render events that failed to trigger
  • dataSource structure
//一维
[
    {key:'1',value:'第一排'},
    {key:'2',value:'第二排'},
    {key:'3',value:'第三排'},
    {key:'4',value:'第四排'}
    ]

//级联
[
    {
        value: '浙江',
        key: '1111',
        children: [{
            value: '杭州',
            key: '310000'
        },{
            value: '宁波',
            key: '315000'
        }]
    }, {
        value: '江苏',
        key: '11222',
        children: [{
            value: '南京',
            key: '210000'
        },{
            value: '无锡',
            key: '214000'
        },{
            value: '镇江',
            key: '212000'
        }]
    }
]
  • selectedKey
//一维
selectedKey:'2'
//级联
selectedKey:['11222','210000']
Picker.show({
  title:'请选择',
  dataSource:dataSource,
  hasToolbar:true,
  hasToolbarButton:true,
  selectedKey:'2'
},(e)=>{
    console.log('select item ',e)
    //选择某一项
    // [{key:'2',value:'第二排'}]
    // 级联的情况
    // [{key:'11222',value:'江苏'},{key:'210000',value: '南京'}]
    
},(e)=>{
    console.log('cancel',e)
},()=>{
    console.log('success rendered')
},()=>{
    console.log('fail to render picker')
});

Picker.hide()

  • Manually close the picker method, without any arguments.

The Other

  • Chat with @翊晨[yichen] in Dingtalk desktop App Download
  • DingTalk Group
2.3.12

5 years ago

2.3.11

5 years ago

2.3.10

5 years ago

2.3.8

5 years ago

2.3.7

5 years ago

2.3.6

5 years ago

2.3.5

5 years ago

2.3.4

5 years ago

2.3.3

5 years ago

2.3.2

5 years ago

2.3.0

6 years ago

2.2.29

6 years ago

2.2.28

6 years ago

2.2.26

6 years ago

2.2.24

6 years ago

2.2.23

6 years ago

2.2.21

6 years ago

2.2.19

6 years ago

2.2.18

6 years ago

2.2.17

6 years ago

2.2.16

6 years ago

2.2.14

6 years ago

2.2.13

6 years ago

2.2.11

6 years ago

2.2.10

6 years ago

2.2.8

6 years ago

2.2.7

6 years ago

2.2.6

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.1.10

6 years ago

2.1.6

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.1-4.3

6 years ago

2.1.1-3

6 years ago

2.0.12

6 years ago

2.0.11

6 years ago

2.0.10

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago