Riku
2025-06-09 2547159bbd781c8e1a41ecc939385396c85f9766
src/components/search/OptionTime.vue
@@ -1,10 +1,11 @@
<template>
  <!-- <el-form-item label="时间" :prop="prop"> -->
  <el-date-picker
    v-model="date"
    @change="handleChange"
    :model-value="modelValue"
    @update:model-value="handleChange"
    :type="type"
    placeholder="选择时间"
    :disabled-date="disabledDate"
    size="small"
    style="width: 100px"
  />
@@ -13,6 +14,7 @@
<script>
const MONTH = 'month'
const DATE = 'date'
export default {
  props: {
@@ -47,6 +49,9 @@
        default:
          return 'YYYY-MM'
      }
    },
    disabledDate(time) {
      return time.getTime() > Date.now()
    }
  },
  mounted() {