<template> <dm-pop-view ref='popView' title="选择时段" :isShowConfirm="true" :maskTapHide='maskTapHide' @confirm="confirmAction"> <view class="content"> <uni-calendar :date = "date==''?startDate:date" :insert="true" :lunar="true" :range = "false" :startDate = "afterDate" :end-date="nowDate" @change="change" /> </view> </dm-pop-view> </template> <script> import dmPopView from './dmPopView.vue' import uniCalendar from '../uni-calendar/uni-calendar.vue' import moment from '../../static/moment.min.js' export default { props: { maskTapHide: { type: Boolean, default: true }, dataList: Array, date: String }, data() { return { nowDate:'', afterDate:'', startDate: '', endDate: '' } }, created() { this.startDate = moment().locale('zh-cn').format('YYYY-MM-DD'); }, methods: { show() { this.$refs.popView.show() }, confirmAction() { this.$emit('confirm',this.startDate) }, change(e) { this.startDate = e.fulldate; } }, components: { dmPopView, uniCalendar } } </script> <style scoped lang="scss"> .content { width: 100%; height: 776rpx; font-family: Verdana; padding-bottom: 100rpx; .list-content { margin-top: 20rpx; border-radius: 20rpx; background-color: #FFFFFF; margin-left: 20rpx; width: 670rpx; display: flex; flex-direction: column; padding: 30rpx 20rpx; .list-title { color: #333333; font-size: 28rpx; font-weight: bold; } .list-content-detail { margin-top: 14rpx; color: #333333; font-size: 24rpx; line-height: 46rpx; } } } </style>