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;
},