0
点赞
收藏
分享

微信扫一扫

ant-vue 封装年份选择器

九点韶留学 2022-03-10 阅读 58
前端

ant-vue 封装年份选择器

HTML:

Markup

<a-date-picker 
                  format="YYYY"
                  mode="year"
                  v-model="queryParam.value1"
                  placeholder="请选择年度"
                  :open="open"
                  @openChange="openChange"
                  @panelChange="panelChange"
                  />

method:

openChange(status) {

        if (status) {

          this.open = true;

        } else {

          this.open = false;

        }

      },

      panelChange(value){

        // this.year = value;

        let year = String(value)

        // console.log(year);

        this.queryParam.value1 = year.substring(11,15);

        this.open = false;

      },

举报

相关推荐

选择器之类选择器

0 条评论