| | |
| | | indicatorStyle: { |
| | | type: Object, |
| | | default: null |
| | | } |
| | | }, |
| | | startDate: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | endDate: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | computed: { |
| | | years() { |
| | | return this.initTimeData(this.endYear, this.startYear); |
| | | let startYear = this.startYear; |
| | | let endYear = this.endYear; |
| | | if(this.startDate){ |
| | | if(this.startDate.indexOf('-')>-1){ |
| | | startYear = this.startDate.split('-')[0] |
| | | }else{ |
| | | startYear = this.startDate |
| | | } |
| | | } |
| | | return this.initTimeData(endYear, startYear); |
| | | }, |
| | | isShowYear() { |
| | | return this.type !== 'time' && this.type !== 'hour-minute'; |
| | | }, |
| | | months() { |
| | | return this.initTimeData(12, 1); |
| | | let startMonth = 1; |
| | | let endMonth = 12; |
| | | if(this.isShowMonth && this.startDate){ |
| | | let arr = this.startDate.split('-'); |
| | | if(arr.length>1 && arr[0] <= this.years[this.years.length-1]){ |
| | | startMonth = Number(arr[1]) |
| | | } |
| | | } |
| | | return this.initTimeData(endMonth, startMonth); |
| | | }, |
| | | isShowMonth() { |
| | | return this.type !== 'year' && this.type !== 'time' && this.type !== 'hour-minute'; |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | font-size: 28rpx; |
| | | font-size: 14px; |
| | | |
| | | .cancel-btn { |
| | | padding: 0 28rpx; |
| | |
| | | |
| | | .tool-title { |
| | | font-weight: 500; |
| | | font-size: 16px; |
| | | font-size: 15px; |
| | | max-width: 50%; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | |
| | | flex: 1; |
| | | |
| | | .item { |
| | | font-size: 34rpx; |
| | | font-size: 14px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |