mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
parent
bf287502e4
commit
3adba1a67b
@ -56,6 +56,21 @@
|
|||||||
.theme(background-color, '@picker-loading-mask-color');
|
.theme(background-color, '@picker-loading-mask-color');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__mask {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-image: linear-gradient(180deg, hsla(0, 0%, 100%, .9), hsla(0, 0%, 100%, .4)),
|
||||||
|
linear-gradient(0deg, hsla(0, 0%, 100%, .9), hsla(0, 0%, 100%, .4));
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: top, bottom;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
&__loading .van-loading,
|
&__loading .van-loading,
|
||||||
&__frame {
|
&__frame {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1,29 +1,4 @@
|
|||||||
<template name="toolbar">
|
<import src="./toolbar" />
|
||||||
<view
|
|
||||||
wx:if="{{ showToolbar }}"
|
|
||||||
class="van-picker__toolbar van-hairline--top-bottom toolbar-class"
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
class="van-picker__cancel"
|
|
||||||
hover-class="van-picker__cancel--hover"
|
|
||||||
hover-stay-time="70"
|
|
||||||
data-type="cancel"
|
|
||||||
bindtap="emit"
|
|
||||||
>
|
|
||||||
{{ cancelButtonText }}
|
|
||||||
</view>
|
|
||||||
<view wx:if="{{ title }}" class="van-picker__title van-ellipsis">{{ title }}</view>
|
|
||||||
<view
|
|
||||||
class="van-picker__confirm"
|
|
||||||
hover-class="van-picker__confirm--hover"
|
|
||||||
hover-stay-time="70"
|
|
||||||
data-type="confirm"
|
|
||||||
bindtap="emit"
|
|
||||||
>
|
|
||||||
{{ confirmButtonText }}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<view class="van-picker custom-class">
|
<view class="van-picker custom-class">
|
||||||
<template is="toolbar" wx:if="{{ toolbarPosition === 'top' }}" data="{{ showToolbar, cancelButtonText, title, confirmButtonText }}"></template>
|
<template is="toolbar" wx:if="{{ toolbarPosition === 'top' }}" data="{{ showToolbar, cancelButtonText, title, confirmButtonText }}"></template>
|
||||||
@ -49,6 +24,7 @@
|
|||||||
active-class="active-class"
|
active-class="active-class"
|
||||||
bind:change="onChange"
|
bind:change="onChange"
|
||||||
/>
|
/>
|
||||||
|
<view class="van-picker__mask" style="background-size: 100% {{ (itemHeight * visibleItemCount - itemHeight) / 2 }}px" />
|
||||||
<view
|
<view
|
||||||
class="van-picker__frame van-hairline--top-bottom"
|
class="van-picker__frame van-hairline--top-bottom"
|
||||||
style="height: {{ itemHeight }}px"
|
style="height: {{ itemHeight }}px"
|
||||||
|
28
packages/picker/toolbar.wxml
Normal file
28
packages/picker/toolbar.wxml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<template name="toolbar">
|
||||||
|
<view
|
||||||
|
wx:if="{{ showToolbar }}"
|
||||||
|
class="van-picker__toolbar van-hairline--top-bottom toolbar-class"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="van-picker__cancel"
|
||||||
|
hover-class="van-picker__cancel--hover"
|
||||||
|
hover-stay-time="70"
|
||||||
|
data-type="cancel"
|
||||||
|
bindtap="emit"
|
||||||
|
>
|
||||||
|
{{ cancelButtonText }}
|
||||||
|
</view>
|
||||||
|
<view wx:if="{{ title }}" class="van-picker__title van-ellipsis">{{
|
||||||
|
title
|
||||||
|
}}</view>
|
||||||
|
<view
|
||||||
|
class="van-picker__confirm"
|
||||||
|
hover-class="van-picker__confirm--hover"
|
||||||
|
hover-stay-time="70"
|
||||||
|
data-type="confirm"
|
||||||
|
bindtap="emit"
|
||||||
|
>
|
||||||
|
{{ confirmButtonText }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
Loading…
x
Reference in New Issue
Block a user