Files
miniprogram-picker/tools/demo/pages/index/index.wxml
qimengjie 6d6e4e07f5 Add demo
2018-12-12 20:43:54 +08:00

22 lines
830 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- 多级联动 -->
<!--
origin: 源数组,格式必须为数组和对象的集合,参考示例
steps: 多级联动的阶数默认为0
name: 多级联动展示数据的字段名称默认为name
subset: 多级联动的子节点的字段名称默认为subset
otherFields: 若需要额外返回其他字段的数据可以设置otherFields为数组参考示例
autoSelect: 初始化时自动选择每列第0项
bindchange: 回调函数,参考示例
-->
<comp
sourceData="{{originMultiArray}}"
steps="{{steps}}"
shownFieldName="{{name}}"
subsetFieldName="{{subset}}"
otherNeedFieldsName="{{otherFields}}"
autoSelect
bindchange="mutiPickerChange">
<view class="picker">
当前选择:<text wx:for="{{result}}" wx:key="index">{{item[name]}}</text>
</view>
</comp>