| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- <template>
- <view class="popup" @tap="closePopup">
- <view class="model" @tap.stop>
- <view class="title">
- <text>选择时间段</text>
- <image src="/static/index/cut.png" mode="" @click="isAddGroup = false"></image>
- </view>
- <view class="popup-body">
- <view class="time-picker">
- <text>开始时间</text>
- <!-- <picker mode="date" :value="startTime" @change="onStartTimeChange">
- <view class="picker">{{ startTime }}</view>
- </picker> -->
- </view>
- <view class="time-picker">
- <text>结束时间</text>
- <!-- <picker mode="date" :value="endTime" @change="onEndTimeChange">
- <view class="picker">{{ endTime }}</view>
- </picker> -->
- </view>
- </view>
- <view class="foot">
- <view @tap="closePopup">取消</view>
- <view @tap="confirm">确定</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- startTime: '开始时间',
- endTime: '结束时间'
- };
- },
- methods: {
- closePopup() {
- this.$emit('close');
- },
- confirm() {
- this.$emit('confirm', {
- startTime: this.startTime,
- endTime: this.endTime
- });
- this.closePopup();
- },
- onStartTimeChange(e) {
- this.startTime = e.detail.value;
- },
- onEndTimeChange(e) {
- this.endTime = e.detail.value;
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .popup {
- width: 100vw;
- height: 100vh;
- position: fixed;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.4);
- display: flex;
- align-items: end;
- z-index: 99;
- .model{
- width: 100%;
- background-color: #fff;
- border-radius: 20rpx 20rpx 0rpx 0rpx;
- padding: 0rpx 24rpx;
- padding-bottom: 20rpx;
- .title {
- width: 100%;
- height: 86rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- position: relative;
- border-bottom: 1px solid #eeeeee;
- margin-bottom: 24rpx;
-
- image {
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- right: 0px;
- }
- }
- .foot{
-
- }
- }
- }
- .popup-content {
- background-color: #fff;
- width: 80%;
- border-radius: 10px;
- overflow: hidden;
- }
- .popup-header {
- padding: 20px;
- border-bottom: 1px solid #eee;
- text-align: center;
- font-size: 18px;
- font-weight: bold;
- }
- .popup-body {
- padding: 20px;
- }
- .time-picker {
- margin-bottom: 20px;
- }
- .time-picker text {
- display: block;
- margin-bottom: 10px;
- font-size: 16px;
- }
- .picker {
- padding: 10px;
- border: 1px solid #eee;
- border-radius: 5px;
- text-align: center;
- }
- .popup-footer {
- display: flex;
- justify-content: space-between;
- padding: 10px;
- border-top: 1px solid #eee;
- }
- .popup-footer button {
- flex: 1;
- margin: 0 5px;
- }
- </style>
|