meixioacomponent 1.1.49 → 1.1.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/lib/meixioacomponent.common.js +337 -52
  2. package/lib/meixioacomponent.umd.js +337 -52
  3. package/lib/meixioacomponent.umd.min.js +7 -7
  4. package/package.json +1 -1
  5. package/packages/components/base/baseArea/api.js +7 -0
  6. package/packages/components/base/baseArea/areaConfig.js +4 -3
  7. package/packages/components/base/baseArea/baseAreaV2.vue +157 -0
  8. package/packages/components/base/baseArea/index.js +2 -1
  9. package/packages/components/base/elDatePicker/basic/date-table.vue +441 -441
  10. package/packages/components/base/elDatePicker/basic/month-table.vue +269 -269
  11. package/packages/components/base/elDatePicker/basic/time-spinner.vue +304 -304
  12. package/packages/components/base/elDatePicker/basic/year-table.vue +111 -111
  13. package/packages/components/base/elDatePicker/index.js +6 -6
  14. package/packages/components/base/elDatePicker/index.vue +27 -27
  15. package/packages/components/base/elDatePicker/panel/date-range.vue +680 -680
  16. package/packages/components/base/elDatePicker/panel/date.vue +609 -609
  17. package/packages/components/base/elDatePicker/panel/month-range.vue +289 -289
  18. package/packages/components/base/elDatePicker/panel/time-range.vue +248 -248
  19. package/packages/components/base/elDatePicker/panel/time-select.vue +178 -178
  20. package/packages/components/base/elDatePicker/panel/time.vue +186 -186
  21. package/packages/components/base/elDatePicker/picker/date-picker.js +55 -55
  22. package/packages/components/base/elDatePicker/picker/time-picker.js +39 -39
  23. package/packages/components/base/elDatePicker/picker/time-select.js +21 -21
  24. package/packages/components/base/elDatePicker/picker.vue +956 -956
  25. package/packages/components/proForm/proForm/pro_form.vue +6 -4
@@ -1,304 +1,304 @@
1
- <template>
2
- <div class="el-time-spinner" :class="{ 'has-seconds': showSeconds }">
3
- <template v-if="!arrowControl">
4
- <el-scrollbar
5
- @mouseenter.native="emitSelectRange('hours')"
6
- @mousemove.native="adjustCurrentSpinner('hours')"
7
- class="el-time-spinner__wrapper"
8
- wrap-style="max-height: inherit;"
9
- view-class="el-time-spinner__list"
10
- noresize
11
- tag="ul"
12
- ref="hours">
13
- <li
14
- @click="handleClick('hours', { value: hour, disabled: disabled })"
15
- v-for="(disabled, hour) in hoursList"
16
- class="el-time-spinner__item"
17
- :key="hour"
18
- :class="{ 'active': hour === hours, 'disabled': disabled }">{{ ('0' + (amPmMode ? (hour % 12 || 12) : hour )).slice(-2) }}{{ amPm(hour) }}</li>
19
- </el-scrollbar>
20
- <el-scrollbar
21
- @mouseenter.native="emitSelectRange('minutes')"
22
- @mousemove.native="adjustCurrentSpinner('minutes')"
23
- class="el-time-spinner__wrapper"
24
- wrap-style="max-height: inherit;"
25
- view-class="el-time-spinner__list"
26
- noresize
27
- tag="ul"
28
- ref="minutes">
29
- <li
30
- @click="handleClick('minutes', { value: key, disabled: false })"
31
- v-for="(enabled, key) in minutesList"
32
- :key="key"
33
- class="el-time-spinner__item"
34
- :class="{ 'active': key === minutes, disabled: !enabled }">{{ ('0' + key).slice(-2) }}</li>
35
- </el-scrollbar>
36
- <el-scrollbar
37
- v-show="showSeconds"
38
- @mouseenter.native="emitSelectRange('seconds')"
39
- @mousemove.native="adjustCurrentSpinner('seconds')"
40
- class="el-time-spinner__wrapper"
41
- wrap-style="max-height: inherit;"
42
- view-class="el-time-spinner__list"
43
- noresize
44
- tag="ul"
45
- ref="seconds">
46
- <li
47
- @click="handleClick('seconds', { value: key, disabled: false })"
48
- v-for="(second, key) in 60"
49
- class="el-time-spinner__item"
50
- :class="{ 'active': key === seconds }"
51
- :key="key">{{ ('0' + key).slice(-2) }}</li>
52
- </el-scrollbar>
53
- </template>
54
- <template v-if="arrowControl">
55
- <div
56
- @mouseenter="emitSelectRange('hours')"
57
- class="el-time-spinner__wrapper is-arrow">
58
- <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
59
- <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
60
- <ul class="el-time-spinner__list" ref="hours">
61
- <li
62
- class="el-time-spinner__item"
63
- :class="{ 'active': hour === hours, 'disabled': hoursList[hour] }"
64
- v-for="(hour, key) in arrowHourList"
65
- :key="key">{{ hour === undefined ? '' : ('0' + (amPmMode ? (hour % 12 || 12) : hour )).slice(-2) + amPm(hour) }}</li>
66
- </ul>
67
- </div>
68
- <div
69
- @mouseenter="emitSelectRange('minutes')"
70
- class="el-time-spinner__wrapper is-arrow">
71
- <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
72
- <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
73
- <ul class="el-time-spinner__list" ref="minutes">
74
- <li
75
- class="el-time-spinner__item"
76
- :class="{ 'active': minute === minutes }"
77
- v-for="(minute, key) in arrowMinuteList"
78
- :key="key">
79
- {{ minute === undefined ? '' : ('0' + minute).slice(-2) }}
80
- </li>
81
- </ul>
82
- </div>
83
- <div
84
- @mouseenter="emitSelectRange('seconds')"
85
- class="el-time-spinner__wrapper is-arrow"
86
- v-if="showSeconds">
87
- <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
88
- <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
89
- <ul class="el-time-spinner__list" ref="seconds">
90
- <li
91
- v-for="(second, key) in arrowSecondList"
92
- class="el-time-spinner__item"
93
- :class="{ 'active': second === seconds }"
94
- :key="key">
95
- {{ second === undefined ? '' : ('0' + second).slice(-2) }}
96
- </li>
97
- </ul>
98
- </div>
99
- </template>
100
- </div>
101
- </template>
102
-
103
- <script type="text/babel">
104
- import { getRangeHours, getRangeMinutes, modifyTime } from 'element-ui/src/utils/date-util';
105
- import ElScrollbar from 'element-ui/packages/scrollbar';
106
- import RepeatClick from 'element-ui/src/directives/repeat-click';
107
-
108
- export default {
109
- components: { ElScrollbar },
110
-
111
- directives: {
112
- repeatClick: RepeatClick
113
- },
114
-
115
- props: {
116
- date: {},
117
- defaultValue: {}, // reserved for future use
118
- showSeconds: {
119
- type: Boolean,
120
- default: true
121
- },
122
- arrowControl: Boolean,
123
- amPmMode: {
124
- type: String,
125
- default: '' // 'a': am/pm; 'A': AM/PM
126
- }
127
- },
128
-
129
- computed: {
130
- hours() {
131
- return this.date.getHours();
132
- },
133
- minutes() {
134
- return this.date.getMinutes();
135
- },
136
- seconds() {
137
- return this.date.getSeconds();
138
- },
139
- hoursList() {
140
- return getRangeHours(this.selectableRange);
141
- },
142
- minutesList() {
143
- return getRangeMinutes(this.selectableRange, this.hours);
144
- },
145
- arrowHourList() {
146
- const hours = this.hours;
147
- return [
148
- hours > 0 ? hours - 1 : undefined,
149
- hours,
150
- hours < 23 ? hours + 1 : undefined
151
- ];
152
- },
153
- arrowMinuteList() {
154
- const minutes = this.minutes;
155
- return [
156
- minutes > 0 ? minutes - 1 : undefined,
157
- minutes,
158
- minutes < 59 ? minutes + 1 : undefined
159
- ];
160
- },
161
- arrowSecondList() {
162
- const seconds = this.seconds;
163
- return [
164
- seconds > 0 ? seconds - 1 : undefined,
165
- seconds,
166
- seconds < 59 ? seconds + 1 : undefined
167
- ];
168
- }
169
- },
170
-
171
- data() {
172
- return {
173
- selectableRange: [],
174
- currentScrollbar: null
175
- };
176
- },
177
-
178
- mounted() {
179
- this.$nextTick(() => {
180
- !this.arrowControl && this.bindScrollEvent();
181
- });
182
- },
183
-
184
- methods: {
185
- increase() {
186
- this.scrollDown(1);
187
- },
188
-
189
- decrease() {
190
- this.scrollDown(-1);
191
- },
192
-
193
- modifyDateField(type, value) {
194
- switch (type) {
195
- case 'hours': this.$emit('change', modifyTime(this.date, value, this.minutes, this.seconds)); break;
196
- case 'minutes': this.$emit('change', modifyTime(this.date, this.hours, value, this.seconds)); break;
197
- case 'seconds': this.$emit('change', modifyTime(this.date, this.hours, this.minutes, value)); break;
198
- }
199
- },
200
-
201
- handleClick(type, {value, disabled}) {
202
- if (!disabled) {
203
- this.modifyDateField(type, value);
204
- this.emitSelectRange(type);
205
- this.adjustSpinner(type, value);
206
- }
207
- },
208
-
209
- emitSelectRange(type) {
210
- if (type === 'hours') {
211
- this.$emit('select-range', 0, 2);
212
- } else if (type === 'minutes') {
213
- this.$emit('select-range', 3, 5);
214
- } else if (type === 'seconds') {
215
- this.$emit('select-range', 6, 8);
216
- }
217
- this.currentScrollbar = type;
218
- },
219
-
220
- bindScrollEvent() {
221
- const bindFunction = (type) => {
222
- this.$refs[type].wrap.onscroll = (e) => {
223
- // TODO: scroll is emitted when set scrollTop programatically
224
- // should find better solutions in the future!
225
- this.handleScroll(type, e);
226
- };
227
- };
228
- bindFunction('hours');
229
- bindFunction('minutes');
230
- bindFunction('seconds');
231
- },
232
-
233
- handleScroll(type) {
234
- const value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), (type === 'hours' ? 23 : 59));
235
- this.modifyDateField(type, value);
236
- },
237
-
238
- // NOTE: used by datetime / date-range panel
239
- // renamed from adjustScrollTop
240
- // should try to refactory it
241
- adjustSpinners() {
242
- this.adjustSpinner('hours', this.hours);
243
- this.adjustSpinner('minutes', this.minutes);
244
- this.adjustSpinner('seconds', this.seconds);
245
- },
246
-
247
- adjustCurrentSpinner(type) {
248
- this.adjustSpinner(type, this[type]);
249
- },
250
-
251
- adjustSpinner(type, value) {
252
- if (this.arrowControl) return;
253
- const el = this.$refs[type].wrap;
254
- if (el) {
255
- el.scrollTop = Math.max(0, value * this.typeItemHeight(type));
256
- }
257
- },
258
-
259
- scrollDown(step) {
260
- if (!this.currentScrollbar) {
261
- this.emitSelectRange('hours');
262
- }
263
-
264
- const label = this.currentScrollbar;
265
- const hoursList = this.hoursList;
266
- let now = this[label];
267
-
268
- if (this.currentScrollbar === 'hours') {
269
- let total = Math.abs(step);
270
- step = step > 0 ? 1 : -1;
271
- let length = hoursList.length;
272
- while (length-- && total) {
273
- now = (now + step + hoursList.length) % hoursList.length;
274
- if (hoursList[now]) {
275
- continue;
276
- }
277
- total--;
278
- }
279
- if (hoursList[now]) return;
280
- } else {
281
- now = (now + step + 60) % 60;
282
- }
283
-
284
- this.modifyDateField(label, now);
285
- this.adjustSpinner(label, now);
286
- this.$nextTick(() => this.emitSelectRange(this.currentScrollbar));
287
- },
288
- amPm(hour) {
289
- let shouldShowAmPm = this.amPmMode.toLowerCase() === 'a';
290
- if (!shouldShowAmPm) return '';
291
- let isCapital = this.amPmMode === 'A';
292
- let content = (hour < 12) ? ' am' : ' pm';
293
- if (isCapital) content = content.toUpperCase();
294
- return content;
295
- },
296
- typeItemHeight(type) {
297
- return this.$refs[type].$el.querySelector('li').offsetHeight;
298
- },
299
- scrollBarHeight(type) {
300
- return this.$refs[type].$el.offsetHeight;
301
- }
302
- }
303
- };
304
- </script>
1
+ <template>
2
+ <div class="el-time-spinner" :class="{ 'has-seconds': showSeconds }">
3
+ <template v-if="!arrowControl">
4
+ <el-scrollbar
5
+ @mouseenter.native="emitSelectRange('hours')"
6
+ @mousemove.native="adjustCurrentSpinner('hours')"
7
+ class="el-time-spinner__wrapper"
8
+ wrap-style="max-height: inherit;"
9
+ view-class="el-time-spinner__list"
10
+ noresize
11
+ tag="ul"
12
+ ref="hours">
13
+ <li
14
+ @click="handleClick('hours', { value: hour, disabled: disabled })"
15
+ v-for="(disabled, hour) in hoursList"
16
+ class="el-time-spinner__item"
17
+ :key="hour"
18
+ :class="{ 'active': hour === hours, 'disabled': disabled }">{{ ('0' + (amPmMode ? (hour % 12 || 12) : hour )).slice(-2) }}{{ amPm(hour) }}</li>
19
+ </el-scrollbar>
20
+ <el-scrollbar
21
+ @mouseenter.native="emitSelectRange('minutes')"
22
+ @mousemove.native="adjustCurrentSpinner('minutes')"
23
+ class="el-time-spinner__wrapper"
24
+ wrap-style="max-height: inherit;"
25
+ view-class="el-time-spinner__list"
26
+ noresize
27
+ tag="ul"
28
+ ref="minutes">
29
+ <li
30
+ @click="handleClick('minutes', { value: key, disabled: false })"
31
+ v-for="(enabled, key) in minutesList"
32
+ :key="key"
33
+ class="el-time-spinner__item"
34
+ :class="{ 'active': key === minutes, disabled: !enabled }">{{ ('0' + key).slice(-2) }}</li>
35
+ </el-scrollbar>
36
+ <el-scrollbar
37
+ v-show="showSeconds"
38
+ @mouseenter.native="emitSelectRange('seconds')"
39
+ @mousemove.native="adjustCurrentSpinner('seconds')"
40
+ class="el-time-spinner__wrapper"
41
+ wrap-style="max-height: inherit;"
42
+ view-class="el-time-spinner__list"
43
+ noresize
44
+ tag="ul"
45
+ ref="seconds">
46
+ <li
47
+ @click="handleClick('seconds', { value: key, disabled: false })"
48
+ v-for="(second, key) in 60"
49
+ class="el-time-spinner__item"
50
+ :class="{ 'active': key === seconds }"
51
+ :key="key">{{ ('0' + key).slice(-2) }}</li>
52
+ </el-scrollbar>
53
+ </template>
54
+ <template v-if="arrowControl">
55
+ <div
56
+ @mouseenter="emitSelectRange('hours')"
57
+ class="el-time-spinner__wrapper is-arrow">
58
+ <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
59
+ <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
60
+ <ul class="el-time-spinner__list" ref="hours">
61
+ <li
62
+ class="el-time-spinner__item"
63
+ :class="{ 'active': hour === hours, 'disabled': hoursList[hour] }"
64
+ v-for="(hour, key) in arrowHourList"
65
+ :key="key">{{ hour === undefined ? '' : ('0' + (amPmMode ? (hour % 12 || 12) : hour )).slice(-2) + amPm(hour) }}</li>
66
+ </ul>
67
+ </div>
68
+ <div
69
+ @mouseenter="emitSelectRange('minutes')"
70
+ class="el-time-spinner__wrapper is-arrow">
71
+ <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
72
+ <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
73
+ <ul class="el-time-spinner__list" ref="minutes">
74
+ <li
75
+ class="el-time-spinner__item"
76
+ :class="{ 'active': minute === minutes }"
77
+ v-for="(minute, key) in arrowMinuteList"
78
+ :key="key">
79
+ {{ minute === undefined ? '' : ('0' + minute).slice(-2) }}
80
+ </li>
81
+ </ul>
82
+ </div>
83
+ <div
84
+ @mouseenter="emitSelectRange('seconds')"
85
+ class="el-time-spinner__wrapper is-arrow"
86
+ v-if="showSeconds">
87
+ <i v-repeat-click="decrease" class="el-time-spinner__arrow el-icon-arrow-up"></i>
88
+ <i v-repeat-click="increase" class="el-time-spinner__arrow el-icon-arrow-down"></i>
89
+ <ul class="el-time-spinner__list" ref="seconds">
90
+ <li
91
+ v-for="(second, key) in arrowSecondList"
92
+ class="el-time-spinner__item"
93
+ :class="{ 'active': second === seconds }"
94
+ :key="key">
95
+ {{ second === undefined ? '' : ('0' + second).slice(-2) }}
96
+ </li>
97
+ </ul>
98
+ </div>
99
+ </template>
100
+ </div>
101
+ </template>
102
+
103
+ <script type="text/babel">
104
+ import { getRangeHours, getRangeMinutes, modifyTime } from 'element-ui/src/utils/date-util';
105
+ import ElScrollbar from 'element-ui/packages/scrollbar';
106
+ import RepeatClick from 'element-ui/src/directives/repeat-click';
107
+
108
+ export default {
109
+ components: { ElScrollbar },
110
+
111
+ directives: {
112
+ repeatClick: RepeatClick
113
+ },
114
+
115
+ props: {
116
+ date: {},
117
+ defaultValue: {}, // reserved for future use
118
+ showSeconds: {
119
+ type: Boolean,
120
+ default: true
121
+ },
122
+ arrowControl: Boolean,
123
+ amPmMode: {
124
+ type: String,
125
+ default: '' // 'a': am/pm; 'A': AM/PM
126
+ }
127
+ },
128
+
129
+ computed: {
130
+ hours() {
131
+ return this.date.getHours();
132
+ },
133
+ minutes() {
134
+ return this.date.getMinutes();
135
+ },
136
+ seconds() {
137
+ return this.date.getSeconds();
138
+ },
139
+ hoursList() {
140
+ return getRangeHours(this.selectableRange);
141
+ },
142
+ minutesList() {
143
+ return getRangeMinutes(this.selectableRange, this.hours);
144
+ },
145
+ arrowHourList() {
146
+ const hours = this.hours;
147
+ return [
148
+ hours > 0 ? hours - 1 : undefined,
149
+ hours,
150
+ hours < 23 ? hours + 1 : undefined
151
+ ];
152
+ },
153
+ arrowMinuteList() {
154
+ const minutes = this.minutes;
155
+ return [
156
+ minutes > 0 ? minutes - 1 : undefined,
157
+ minutes,
158
+ minutes < 59 ? minutes + 1 : undefined
159
+ ];
160
+ },
161
+ arrowSecondList() {
162
+ const seconds = this.seconds;
163
+ return [
164
+ seconds > 0 ? seconds - 1 : undefined,
165
+ seconds,
166
+ seconds < 59 ? seconds + 1 : undefined
167
+ ];
168
+ }
169
+ },
170
+
171
+ data() {
172
+ return {
173
+ selectableRange: [],
174
+ currentScrollbar: null
175
+ };
176
+ },
177
+
178
+ mounted() {
179
+ this.$nextTick(() => {
180
+ !this.arrowControl && this.bindScrollEvent();
181
+ });
182
+ },
183
+
184
+ methods: {
185
+ increase() {
186
+ this.scrollDown(1);
187
+ },
188
+
189
+ decrease() {
190
+ this.scrollDown(-1);
191
+ },
192
+
193
+ modifyDateField(type, value) {
194
+ switch (type) {
195
+ case 'hours': this.$emit('change', modifyTime(this.date, value, this.minutes, this.seconds)); break;
196
+ case 'minutes': this.$emit('change', modifyTime(this.date, this.hours, value, this.seconds)); break;
197
+ case 'seconds': this.$emit('change', modifyTime(this.date, this.hours, this.minutes, value)); break;
198
+ }
199
+ },
200
+
201
+ handleClick(type, {value, disabled}) {
202
+ if (!disabled) {
203
+ this.modifyDateField(type, value);
204
+ this.emitSelectRange(type);
205
+ this.adjustSpinner(type, value);
206
+ }
207
+ },
208
+
209
+ emitSelectRange(type) {
210
+ if (type === 'hours') {
211
+ this.$emit('select-range', 0, 2);
212
+ } else if (type === 'minutes') {
213
+ this.$emit('select-range', 3, 5);
214
+ } else if (type === 'seconds') {
215
+ this.$emit('select-range', 6, 8);
216
+ }
217
+ this.currentScrollbar = type;
218
+ },
219
+
220
+ bindScrollEvent() {
221
+ const bindFunction = (type) => {
222
+ this.$refs[type].wrap.onscroll = (e) => {
223
+ // TODO: scroll is emitted when set scrollTop programatically
224
+ // should find better solutions in the future!
225
+ this.handleScroll(type, e);
226
+ };
227
+ };
228
+ bindFunction('hours');
229
+ bindFunction('minutes');
230
+ bindFunction('seconds');
231
+ },
232
+
233
+ handleScroll(type) {
234
+ const value = Math.min(Math.round((this.$refs[type].wrap.scrollTop - (this.scrollBarHeight(type) * 0.5 - 10) / this.typeItemHeight(type) + 3) / this.typeItemHeight(type)), (type === 'hours' ? 23 : 59));
235
+ this.modifyDateField(type, value);
236
+ },
237
+
238
+ // NOTE: used by datetime / date-range panel
239
+ // renamed from adjustScrollTop
240
+ // should try to refactory it
241
+ adjustSpinners() {
242
+ this.adjustSpinner('hours', this.hours);
243
+ this.adjustSpinner('minutes', this.minutes);
244
+ this.adjustSpinner('seconds', this.seconds);
245
+ },
246
+
247
+ adjustCurrentSpinner(type) {
248
+ this.adjustSpinner(type, this[type]);
249
+ },
250
+
251
+ adjustSpinner(type, value) {
252
+ if (this.arrowControl) return;
253
+ const el = this.$refs[type].wrap;
254
+ if (el) {
255
+ el.scrollTop = Math.max(0, value * this.typeItemHeight(type));
256
+ }
257
+ },
258
+
259
+ scrollDown(step) {
260
+ if (!this.currentScrollbar) {
261
+ this.emitSelectRange('hours');
262
+ }
263
+
264
+ const label = this.currentScrollbar;
265
+ const hoursList = this.hoursList;
266
+ let now = this[label];
267
+
268
+ if (this.currentScrollbar === 'hours') {
269
+ let total = Math.abs(step);
270
+ step = step > 0 ? 1 : -1;
271
+ let length = hoursList.length;
272
+ while (length-- && total) {
273
+ now = (now + step + hoursList.length) % hoursList.length;
274
+ if (hoursList[now]) {
275
+ continue;
276
+ }
277
+ total--;
278
+ }
279
+ if (hoursList[now]) return;
280
+ } else {
281
+ now = (now + step + 60) % 60;
282
+ }
283
+
284
+ this.modifyDateField(label, now);
285
+ this.adjustSpinner(label, now);
286
+ this.$nextTick(() => this.emitSelectRange(this.currentScrollbar));
287
+ },
288
+ amPm(hour) {
289
+ let shouldShowAmPm = this.amPmMode.toLowerCase() === 'a';
290
+ if (!shouldShowAmPm) return '';
291
+ let isCapital = this.amPmMode === 'A';
292
+ let content = (hour < 12) ? ' am' : ' pm';
293
+ if (isCapital) content = content.toUpperCase();
294
+ return content;
295
+ },
296
+ typeItemHeight(type) {
297
+ return this.$refs[type].$el.querySelector('li').offsetHeight;
298
+ },
299
+ scrollBarHeight(type) {
300
+ return this.$refs[type].$el.offsetHeight;
301
+ }
302
+ }
303
+ };
304
+ </script>