riku
2024-09-11 89ab2ec7f8790c5cc184de98682af032c69c2afc
src/components/search/OptionTime.vue
@@ -5,6 +5,7 @@
    @change="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() {