Commit 435bf7814a6ad6aab47a357ceae8cd28480fbb57
1 parent
63bd0f7d
add split panel props
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
src/components/date-picker/panel/Date/date-range.vue
| ... | ... | @@ -21,9 +21,11 @@ |
| 21 | 21 | :current-view="currentView" |
| 22 | 22 | :date-prefix-cls="datePrefixCls"></date-panel-label> |
| 23 | 23 | <span |
| 24 | + v-if="splitPanels" | |
| 24 | 25 | :class="iconBtnCls('next', '-double')" |
| 25 | 26 | @click="nextYear('left')"><Icon type="ios-arrow-right"></Icon></span> |
| 26 | 27 | <span |
| 28 | + v-if="splitPanels" | |
| 27 | 29 | :class="iconBtnCls('next')" |
| 28 | 30 | @click="nextMonth('left')" |
| 29 | 31 | v-show="currentView === 'date'"><Icon type="ios-arrow-right"></Icon></span> |
| ... | ... | @@ -45,9 +47,11 @@ |
| 45 | 47 | <div :class="[prefixCls + '-content', prefixCls + '-content-right']" v-show="!isTime"> |
| 46 | 48 | <div :class="[datePrefixCls + '-header']" v-show="currentView !== 'time'"> |
| 47 | 49 | <span |
| 50 | + v-if="splitPanels" | |
| 48 | 51 | :class="iconBtnCls('prev', '-double')" |
| 49 | 52 | @click="prevYear('right')"><Icon type="ios-arrow-left"></Icon></span> |
| 50 | 53 | <span |
| 54 | + v-if="splitPanels" | |
| 51 | 55 | :class="iconBtnCls('prev')" |
| 52 | 56 | @click="prevMonth('right')" |
| 53 | 57 | v-show="currentView === 'date'"><Icon type="ios-arrow-left"></Icon></span> |
| ... | ... | @@ -125,7 +129,11 @@ |
| 125 | 129 | mixins: [ Mixin, Locale, DateMixin ], |
| 126 | 130 | components: { Icon, DateTable, YearTable, MonthTable, TimePicker, Confirm, datePanelLabel }, |
| 127 | 131 | props: { |
| 128 | - // in the mixin | |
| 132 | + // more props in the mixin | |
| 133 | + splitPanels: { | |
| 134 | + type: Boolean, | |
| 135 | + default: false | |
| 136 | + }, | |
| 129 | 137 | }, |
| 130 | 138 | data(){ |
| 131 | 139 | const [minDate, maxDate] = this.value.map(date => date || initTimeDate()); | ... | ... |
src/components/date-picker/picker.vue
| ... | ... | @@ -40,6 +40,7 @@ |
| 40 | 40 | :format="format" |
| 41 | 41 | :value="internalValue" |
| 42 | 42 | :start-date="startDate" |
| 43 | + :split-panels="splitPanels" | |
| 43 | 44 | |
| 44 | 45 | v-bind="ownPickerProps" |
| 45 | 46 | |
| ... | ... | @@ -205,6 +206,10 @@ |
| 205 | 206 | type: Boolean, |
| 206 | 207 | default: false |
| 207 | 208 | }, |
| 209 | + splitPanels: { | |
| 210 | + type: Boolean, | |
| 211 | + default: false | |
| 212 | + }, | |
| 208 | 213 | startDate: { |
| 209 | 214 | type: Date |
| 210 | 215 | }, | ... | ... |