| | |
| | | type="year" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyy'" |
| | | @change="(v) => panelChange(v, 'yyyy')" |
| | | /> |
| | | <!--月选择器--> |
| | |
| | | type="month" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMM'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM')" |
| | | /> |
| | | <!--日选择器--> |
| | |
| | | type="date" |
| | | :clearable="true" |
| | | style="width: 150px" |
| | | :value-format="item.format?item.format:'yyyyMMdd'" |
| | | @change="(v) => panelChange(v, 'yyyy-MM-dd')" |
| | | /> |
| | | <!--日期带时间选择器--> |
| | |
| | | } |
| | | }, |
| | | panelChange(v, type) { |
| | | var info = null |
| | | if (v && this.item.type !== 'date-time-picker') { |
| | | info = formatDates(v, type) |
| | | } else { |
| | | info = v |
| | | } |
| | | this.val = info |
| | | this.$emit('change', info) |
| | | this.$emit('change', v) |
| | | }, |
| | | filterOption(input, option) { |
| | | return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0; |