仿互站小程序
This commit is contained in:
14
vant/picker-column/index.wxml
Normal file
14
vant/picker-column/index.wxml
Normal file
@@ -0,0 +1,14 @@
|
||||
<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>
|
Reference in New Issue
Block a user