Post

antdv 年份筛选

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<a-date-picker
    v-if="timeType == 'year'"
    v-model="year"
    mode="year"
    format="YYYY"
    :open="open"
    :allowClear="false"
    @openChange="openChange"
    @panelChange="panelChange"
/>

openChange(status) {
    if (status) {
    this.open = true;
    } else {
    this.open = false;
    }
},
panelChange(value) {
    this.year = String(value.year());
    this.open = false;
    this.init();
},
This post is licensed under CC BY 4.0 by the author.