antd-vue 框架的日期选择选年份

 <a-date-picker :placeholder="placeholder" mode="year" format="YYYY" :open="showYear" v-model="valueYear"
        @openChange="changeOpen" @panelChange="panelChange"></a-date-picker>

changeOpen(status) {
      console.log(status);
      if(status){
        this.showYear = true
      }else {
        this.showYear = false
      }
      
    },
    handleDateChange(value, mode) {
      this.showYear = false
      this.valueYear = value
      console.log('当前选择日期', value, mode)
    },
    panelChange(value){
      this.valueYear = value
      this.showYear = true
    },
posted @ 2023-02-10 13:11  SultanST  阅读(253)  评论(0编辑  收藏  举报