仿互站小程序
This commit is contained in:
24
vant/picker/index.wxml
Normal file
24
vant/picker/index.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view class="van-picker custom-class">
|
||||
<view class="van-picker__toolbar van-hairline--top-bottom toolbar-class" wx:if="{{showToolbar}}">
|
||||
<view bindtap="emit" class="van-picker__cancel" data-type="cancel" hoverClass="van-picker__cancel--hover" hoverStayTime="70">
|
||||
{{cancelButtonText}}
|
||||
</view>
|
||||
<view class="van-picker__title van-ellipsis" wx:if="{{title}}">{{title}}</view>
|
||||
<view bindtap="emit" class="van-picker__confirm" data-type="confirm" hoverClass="van-picker__confirm--hover" hoverStayTime="70">
|
||||
{{confirmButtonText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="van-picker__loading" wx:if="{{loading}}">
|
||||
<loading color="#1989fa"></loading>
|
||||
</view>
|
||||
<view catch:touchmove="noop" class="van-picker__columns" style="height: {{itemHeight*visibleItemCount}}px">
|
||||
<picker-column activeClass="active-class" bind:change="onChange" class="van-picker__column" customClass="column-class" data-index="{{index}}" defaultIndex="{{item.defaultIndex||defaultIndex}}" initialOptions="{{isSimple(columns)?item:item.values}}" itemHeight="{{itemHeight}}" valueKey="{{valueKey}}" visibleItemCount="{{visibleItemCount}}" wx:for="{{isSimple(columns)?[columns]:columns}}" wx:key="index"></picker-column>
|
||||
<view class="van-picker__frame van-hairline--top-bottom" style="height: {{itemHeight}}px"></view>
|
||||
</view>
|
||||
</view>
|
||||
<wxs module="isSimple">
|
||||
function isSimple(columns) {
|
||||
return (columns.length && !columns[(0)].values)
|
||||
};
|
||||
module.exports = isSimple;
|
||||
</wxs>
|
Reference in New Issue
Block a user