<template>
  <u-popup :show="show" mode="bottom" :closeable="false" @close="handleClose">
    <view class="c-dialog">
      <view>
        <view class="box">
          <text @click="handleClose">取消</text>
          <text class="btn" @click="handleClose">完成</text>
        </view>
        <uni-calendar
          :insert="true"
          :lunar="true"
          :start-date="'2014-1-1'"
          :end-date="'2099-1-1'"
          :range="true"
          @change="handleChangeDate"
        />
      </view>
    </view>
  </u-popup>
</template>
<script setup lang="ts">
const props = defineProps<{
  show: boolean,
}>()
const emit = defineEmits(['handleDialog']);
const handleClose = () => {
  emit('handleDialog', false)
}

const showCalendar = ref(false)
const handleChangeDate = (v: any) => {
  console.log(v);
};
</script>
<style lang="scss" scoped>

::v-deep .u-popup__content {
  box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(5, 68, 37, 0.12);
  border-radius: 32rpx 32rpx 0rpx 0rpx;
}
.c-dialog {
  margin: 30rpx;
  font-family: Source Han Sans CN;
  font-weight: 500;
  font-size: 24rpx;
  color: #000000;
  .box-btn,
  .box {
    line-height: 80rpx;
    display: flex;
    justify-content: space-between;
  }
  .box-btn {
    line-height: 40rpx;
    margin-bottom: 30rpx;
    text {
      font-weight: 400;
      font-size: 24rpx;
      color: #999999;
      width: 117rpx;
      background: #ffffff;
      border-radius: 6rpx;
      border: 1px solid rgba(153, 153, 153, 0.64);
      text-align: center;
      cursor: pointer;
    }
    .active {
      border-color: $u-primary;
      color: $u-primary;
    }
  }
  .btn {
    font-weight: 500;
    font-size: 24rpx;
    color: $u-primary;
  }
  .box-border {
    border-top: 1px solid rgba(233, 233, 233, 0.76);
  }
  .line {
    height: 18rpx;
    background: #f8f8f8;
  }
}
</style>