啥也不说,直接上代码
<el-date-picker
v-model="query.strYear"
type="year"
format="yyyy"
value-format="yyyy"
placeholder="请选择">
</el-date-picker>
<el-date-picker
v-model="query.strMonth"
type="month"
format="MM"
value-format="MM"
placeholder="请选择">
</el-date-picker>