14 lines
1.1 KiB
Plaintext
14 lines
1.1 KiB
Plaintext
![]() |
<view bind:touchcancel="onTouchEnd" bind:touchend="onTouchEnd" bind:touchstart="onTouchStart" catch:touchmove="onTouchMove" class="van-picker-column custom-class" style="height: {{itemHeight*visibleItemCount}}px">
|
||
|
<view style="{{wrapperStyle}}">
|
||
|
<view bindtap="onClickItem" class="van-ellipsis van-picker-column__item {{option&&option.disabled?'van-picker-column__item--disabled':''}} {{index===currentIndex?'van-picker-column__item--selected active-class':''}}" data-index="{{index}}" style="height: {{itemHeight}}px" wx:for="{{options}}" wx:for-item="option" wx:key="index">{{getOptionText(option,valueKey)}}</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<wxs module="getOptionText">
|
||
|
function isObj(x) {
|
||
|
var type = typeof x;
|
||
|
return (x !== null && (type === 'object' || type === 'function'))
|
||
|
};
|
||
|
module.exports = (function(option, valueKey) {
|
||
|
return (isObj(option) && option[((nt_0 = (valueKey), null == nt_0 ? undefined : 'number' === typeof nt_0 ? nt_0 : "" + nt_0))] ? option[((nt_1 = (valueKey), null == nt_1 ? undefined : 'number' === typeof nt_1 ? nt_1 : "" + nt_1))] : option)
|
||
|
});
|
||
|
</wxs>
|