接上一文章遮罩层模板内的功能实现
日期时间选择器Picker
WXML页面
<block wx:if="{
{current=='0'}}">
<view class="limitedAt">
<picker mode="date" value="{
{date}}" bindchange="changeDate">
<input class="picker-detail" disabled placeholder="年-月-日" value='{
{date}}'></input>
</picker>
</view>
<picker mode="time" value="{
{time}}" bindchange="changeTime">
<view class='picker-time'>到厂时间:
<input class="time" disabled placeholder="0:00-23:00" value='{
{time}}'></input></view>
</picker>
</block>
JS页面
Page({
data: {
current:0,
date: '',
time:'',
begin: '',
end: '',
},
// 到厂时间
changeDate(e) {
this.setData({
date: e.detail.value,
begin:'00:00:00',
})
},
changeTime(e) {
this.setData({
time: e.detail.value,
end:":00"
})
},
日期效果图
<block wx:if="{
{current=='1'}}">
<view class="cargoType">
<view class="in {
{state=='import'?'active1':''}}" data-state="import" bindtap="cargoType">进口</view>
<view class="ex {
{state=='export'?'active1':''}}" data-state="export" bindtap="cargoType">出口</view>
</view>
</block>
<block wx:if="{
{current=='3'}}">
<view class="cargoType">
<view class="in {
{states=='online'?'active1':''}}" data-states="online" bindtap="payType">平台垫付</view>
<view class="ex {
{stat