@opentinyvue/vue-calendar-view 3.22.0 → 3.23.0

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.
package/lib/index.js CHANGED
@@ -97,6 +97,10 @@ var calendarViewProps = _extends({}, $props, {
97
97
  showBackToday: {
98
98
  type: Boolean,
99
99
  default: true
100
+ },
101
+ showTipTime: {
102
+ type: Boolean,
103
+ default: true
100
104
  }
101
105
  });
102
106
  var CalendarView = defineComponent({
@@ -110,7 +114,7 @@ var CalendarView = defineComponent({
110
114
  });
111
115
  }
112
116
  });
113
- var version = "3.22.0";
117
+ var version = "3.23.0";
114
118
  CalendarView.model = {
115
119
  prop: "modelValue",
116
120
  event: "update:modelValue"
@@ -6,7 +6,7 @@ import SliderButton from '@opentinyvue/vue-slider-button';
6
6
  import SliderButtonGroup from '@opentinyvue/vue-slider-button-group';
7
7
  import Tooltip from '@opentinyvue/vue-tooltip';
8
8
  import { IconCheckedSur, IconPlus, IconChevronLeft, IconChevronRight, IconDayView, IconAgendaView, IconMonthView } from '@opentinyvue/vue-icon';
9
- import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createBlock, createTextVNode, createCommentVNode, normalizeClass, renderSlot, Fragment, renderList, resolveDynamicComponent, normalizeStyle } from 'vue';
9
+ import { resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, toDisplayString, createCommentVNode, createBlock, createTextVNode, normalizeClass, renderSlot, Fragment, renderList, resolveDynamicComponent, normalizeStyle } from 'vue';
10
10
 
11
11
  function _createForOfIteratorHelperLoose(r, e) {
12
12
  var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
@@ -79,7 +79,7 @@ var _sfc_main = defineComponent({
79
79
  TinyDatePicker: DatePicker,
80
80
  TinyTooltip: Tooltip
81
81
  },
82
- props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "mark-color", "multi-select", "showBackToday"]),
82
+ props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "mark-color", "multi-select", "showBackToday", "showTipTime"]),
83
83
  setup: function setup$1(props2, context) {
84
84
  return setup({
85
85
  props: props2,
@@ -102,12 +102,13 @@ var _hoisted_1 = {
102
102
  class: "w-full h-auto"
103
103
  };
104
104
  var _hoisted_2 = {
105
- class: "p-2"
105
+ class: "p-2 max-h-[80vh] overflow-auto"
106
106
  };
107
107
  var _hoisted_3 = {
108
108
  class: "px-1.5 mb-1.5 border-l-2 border-color-brand"
109
109
  };
110
110
  var _hoisted_4 = {
111
+ key: 0,
111
112
  class: "mb-1.5 px-2 text-color-text-placeholder"
112
113
  };
113
114
  var _hoisted_5 = {
@@ -170,35 +171,37 @@ var _hoisted_20 = {
170
171
  "data-tag": "tiny-calendar-view-weekdates",
171
172
  class: "flex justify-around flex-1 h-full"
172
173
  };
173
- var _hoisted_21 = {
174
+ var _hoisted_21 = ["onClick"];
175
+ var _hoisted_22 = {
174
176
  class: "w-12",
175
177
  "data-tag": "tiny-calendar-view-timelinelist"
176
178
  };
177
- var _hoisted_22 = {
179
+ var _hoisted_23 = {
178
180
  class: "text-sm text-color-text-primary"
179
181
  };
180
- var _hoisted_23 = {
182
+ var _hoisted_24 = {
181
183
  class: "flex-1",
182
184
  "data-tag": "tiny-calendar-view-timelinelist"
183
185
  };
184
- var _hoisted_24 = {
186
+ var _hoisted_25 = {
185
187
  class: "w-full flex justify-around"
186
188
  };
187
- var _hoisted_25 = {
189
+ var _hoisted_26 = {
188
190
  class: "flex w-full",
189
191
  "data-tag": "tiny-calendar-view-schedulelist"
190
192
  };
191
- var _hoisted_26 = {
193
+ var _hoisted_27 = {
192
194
  class: "px-1.5 mb-1.5 border-l-2 border-color-brand break-all"
193
195
  };
194
- var _hoisted_27 = {
196
+ var _hoisted_28 = {
197
+ key: 0,
195
198
  class: "mb-1.5 px-2 text-color-text-placeholder"
196
199
  };
197
- var _hoisted_28 = {
200
+ var _hoisted_29 = {
198
201
  class: "px-2 text-xs text-color-icon-primary line-clamp-2"
199
202
  };
200
- var _hoisted_29 = ["onClick"];
201
- var _hoisted_30 = {
203
+ var _hoisted_30 = ["onClick"];
204
+ var _hoisted_31 = {
202
205
  class: "ml-1 text-color-text-placeholder"
203
206
  };
204
207
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -211,41 +214,42 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
211
214
  var _component_icon_chevron_right = resolveComponent("icon-chevron-right");
212
215
  var _component_icon_checked_sur = resolveComponent("icon-checked-sur");
213
216
  var _component_icon_plus = resolveComponent("icon-plus");
214
- return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(_component_tiny_tooltip, {
215
- ref: "tooltip",
216
- modelValue: _ctx.state.eventTipVisible,
217
- "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
218
- return _ctx.state.eventTipVisible = $event;
219
- }),
220
- "popper-class": "absolute max-w-[theme(spacing.80)]",
221
- manual: true,
222
- effect: "light",
223
- placement: "right"
224
- }, {
225
- content: withCtx(function() {
226
- return [createElementVNode("div", _hoisted_2, [createElementVNode(
227
- "div",
228
- _hoisted_3,
229
- toDisplayString(_ctx.state.eventTipContent.title),
230
- 1
231
- /* TEXT */
232
- ), createElementVNode(
233
- "div",
234
- _hoisted_4,
235
- toDisplayString(_ctx.state.eventTipContent.startDay) + " " + toDisplayString(_ctx.state.eventTipContent.startTime) + " ~ " + toDisplayString(_ctx.state.eventTipContent.endDay) + " " + toDisplayString(_ctx.state.eventTipContent.endTime),
236
- 1
237
- /* TEXT */
238
- ), createElementVNode(
239
- "p",
240
- _hoisted_5,
241
- toDisplayString(_ctx.state.eventTipContent.content || ""),
242
- 1
243
- /* TEXT */
244
- )])];
245
- }),
246
- _: 1
247
- /* STABLE */
248
- }, 8, ["modelValue"]), createElementVNode("div", _hoisted_6, [_ctx.showBackToday ? (openBlock(), createBlock(_component_tiny_button, {
217
+ return openBlock(), createElementBlock("div", _hoisted_1, [createVNode(
218
+ _component_tiny_tooltip,
219
+ {
220
+ ref: "tooltip",
221
+ "popper-class": "absolute max-w-[theme(spacing.80)]",
222
+ effect: "light",
223
+ placement: "right"
224
+ },
225
+ {
226
+ content: withCtx(function() {
227
+ return [createElementVNode("div", _hoisted_2, [createElementVNode(
228
+ "div",
229
+ _hoisted_3,
230
+ toDisplayString(_ctx.state.eventTipContent.title),
231
+ 1
232
+ /* TEXT */
233
+ ), _ctx.showTipTime ? (openBlock(), createElementBlock(
234
+ "div",
235
+ _hoisted_4,
236
+ toDisplayString(_ctx.state.eventTipContent.startDay) + " " + toDisplayString(_ctx.state.eventTipContent.startTime) + " ~ " + toDisplayString(_ctx.state.eventTipContent.endDay) + " " + toDisplayString(_ctx.state.eventTipContent.endTime),
237
+ 1
238
+ /* TEXT */
239
+ )) : createCommentVNode("v-if", true), createElementVNode(
240
+ "p",
241
+ _hoisted_5,
242
+ toDisplayString(_ctx.state.eventTipContent.content || ""),
243
+ 1
244
+ /* TEXT */
245
+ )])];
246
+ }),
247
+ _: 1
248
+ /* STABLE */
249
+ },
250
+ 512
251
+ /* NEED_PATCH */
252
+ ), createElementVNode("div", _hoisted_6, [_ctx.showBackToday ? (openBlock(), createBlock(_component_tiny_button, {
249
253
  key: 0,
250
254
  onClick: _ctx.toToday
251
255
  }, {
@@ -260,7 +264,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
260
264
  /* STABLE */
261
265
  }, 8, ["onClick"])) : createCommentVNode("v-if", true), createVNode(_component_tiny_date_picker, {
262
266
  modelValue: _ctx.state.currentDate,
263
- "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
267
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function($event) {
264
268
  return _ctx.state.currentDate = $event;
265
269
  }),
266
270
  class: normalizeClass([_ctx.showBackToday ? "ml-5" : "", "shrink-0"]),
@@ -272,7 +276,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
272
276
  }, null, 8, ["modelValue", "class", "onChange", "format"]), createElementVNode("div", _hoisted_7, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_slider_button_group, {
273
277
  key: 1,
274
278
  modelValue: _ctx.state.mode,
275
- "onUpdate:modelValue": _cache[2] || (_cache[2] = function($event) {
279
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
276
280
  return _ctx.state.mode = $event;
277
281
  }),
278
282
  type: "icon",
@@ -303,7 +307,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
303
307
  }, 8, ["modelValue"])) : createCommentVNode("v-if", true)]), _ctx.state.mode === "month" ? (openBlock(), createElementBlock("div", _hoisted_8, [createElementVNode("div", _hoisted_9, [createElementVNode("div", {
304
308
  "data-tag": "tiny-calendar-view-prevmonth",
305
309
  class: "absolute left-3 top-2.5 cursor-pointer",
306
- onClick: _cache[3] || (_cache[3] = function() {
310
+ onClick: _cache[2] || (_cache[2] = function() {
307
311
  return _ctx.goPrevMonth && _ctx.goPrevMonth.apply(_ctx, arguments);
308
312
  })
309
313
  }, [createVNode(_component_icon_chevron_left)]), createElementVNode("ul", _hoisted_10, [(openBlock(true), createElementBlock(
@@ -327,7 +331,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
327
331
  ))]), createElementVNode("div", {
328
332
  "data-tag": "tiny-calendar-view-nextmonth",
329
333
  class: "absolute right-3 top-2.5 cursor-pointer",
330
- onClick: _cache[4] || (_cache[4] = function() {
334
+ onClick: _cache[3] || (_cache[3] = function() {
331
335
  return _ctx.goNextMonth && _ctx.goNextMonth.apply(_ctx, arguments);
332
336
  })
333
337
  }, [createVNode(_component_icon_chevron_right)])]), createElementVNode("div", _hoisted_12, [createElementVNode("div", _hoisted_13, [(openBlock(true), createElementBlock(
@@ -419,7 +423,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
419
423
  ))])])])) : (openBlock(), createElementBlock("div", _hoisted_18, [createElementVNode("div", _hoisted_19, [createElementVNode("div", {
420
424
  class: "w-7 shrink-0 text-right cursor-pointer",
421
425
  "data-tag": "tiny-calendar-view-prevweek",
422
- onClick: _cache[5] || (_cache[5] = function() {
426
+ onClick: _cache[4] || (_cache[4] = function() {
423
427
  return _ctx.getPrevWeek && _ctx.getPrevWeek.apply(_ctx, arguments);
424
428
  })
425
429
  }, [createVNode(_component_icon_chevron_left)]), createElementVNode("ul", _hoisted_20, [(openBlock(true), createElementBlock(
@@ -429,7 +433,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
429
433
  return openBlock(), createElementBlock("li", {
430
434
  "data-tag": "tiny-calendar-view-weekitem",
431
435
  key: date.value,
432
- class: "leading-10"
436
+ class: "leading-10 cursor-pointer",
437
+ onClick: function onClick($event) {
438
+ return _ctx.selectDay(date);
439
+ }
433
440
  }, [renderSlot(_ctx.$slots, "header", {
434
441
  slotScope: {
435
442
  date: date.value,
@@ -439,7 +446,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
439
446
  return [createElementVNode(
440
447
  "span",
441
448
  {
442
- class: normalizeClass(["relative mr-2.5 text-base", [_ctx.dateIsToday(date.value) ? "text-color-brand" : "text-color-text-primary"]])
449
+ class: normalizeClass(["relative mr-2.5 text-base", [_ctx.dateIsToday(date.value) || _ctx.computedSelectDay(date) ? "text-color-brand" : "text-color-text-primary"]])
443
450
  },
444
451
  [createElementVNode(
445
452
  "span",
@@ -462,20 +469,20 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
462
469
  ), createElementVNode(
463
470
  "span",
464
471
  {
465
- class: normalizeClass(["text-sm", [_ctx.dateIsToday(date.value) ? "text-color-brand" : "text-color-text-placeholder"]])
472
+ class: normalizeClass(["text-sm", [_ctx.dateIsToday(date.value) || _ctx.computedSelectDay(date) ? "text-color-brand" : "text-color-text-placeholder"]])
466
473
  },
467
474
  toDisplayString(_ctx.dateIsToday(date.value) ? _ctx.t("ui.datepicker.today") : _ctx.t("ui.calendarView.weekDays." + index)),
468
475
  3
469
476
  /* TEXT, CLASS */
470
477
  )];
471
- })]);
478
+ })], 8, _hoisted_21);
472
479
  }),
473
480
  128
474
481
  /* KEYED_FRAGMENT */
475
482
  ))]), createElementVNode("div", {
476
483
  "data-tag": "tiny-calendar-view-nextvweek",
477
484
  class: "w-7 shrink-0 text-left cursor-pointer",
478
- onClick: _cache[6] || (_cache[6] = function() {
485
+ onClick: _cache[5] || (_cache[5] = function() {
479
486
  return _ctx.getNextWeek && _ctx.getNextWeek.apply(_ctx, arguments);
480
487
  })
481
488
  }, [createVNode(_component_icon_chevron_right)])]), _ctx.state.mode === "timeline" ? (openBlock(), createElementBlock(
@@ -488,7 +495,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
488
495
  "height": _ctx.height
489
496
  })
490
497
  },
491
- [createElementVNode("div", _hoisted_21, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
498
+ [createElementVNode("div", _hoisted_22, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
492
499
  Fragment,
493
500
  null,
494
501
  renderList(_ctx.state.dayTimes, function(item, i) {
@@ -501,7 +508,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
501
508
  },
502
509
  [createElementVNode(
503
510
  "span",
504
- _hoisted_22,
511
+ _hoisted_23,
505
512
  toDisplayString(item.text.includes("30") ? "" : item.text),
506
513
  1
507
514
  /* TEXT */
@@ -512,7 +519,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
512
519
  }),
513
520
  128
514
521
  /* KEYED_FRAGMENT */
515
- ))])]), createElementVNode("div", _hoisted_23, [createElementVNode("ul", _hoisted_24, [(openBlock(true), createElementBlock(
522
+ ))])]), createElementVNode("div", _hoisted_24, [createElementVNode("ul", _hoisted_25, [(openBlock(true), createElementBlock(
516
523
  Fragment,
517
524
  null,
518
525
  renderList(_ctx.state.weekDates, function(date, index) {
@@ -598,7 +605,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
598
605
  "height": _ctx.height
599
606
  })
600
607
  },
601
- [createElementVNode("ul", _hoisted_25, [(openBlock(true), createElementBlock(
608
+ [createElementVNode("ul", _hoisted_26, [(openBlock(true), createElementBlock(
602
609
  Fragment,
603
610
  null,
604
611
  renderList(_ctx.state.weekDates, function(date, index) {
@@ -625,19 +632,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
625
632
  class: "py-1.5 h-auto border border-color-border-separator rounded mb-2 shadow-sm"
626
633
  }, [createElementVNode(
627
634
  "div",
628
- _hoisted_26,
635
+ _hoisted_27,
629
636
  toDisplayString(event.title),
630
637
  1
631
638
  /* TEXT */
632
- ), createElementVNode(
639
+ ), _ctx.showTipTime ? (openBlock(), createElementBlock(
633
640
  "div",
634
- _hoisted_27,
641
+ _hoisted_28,
635
642
  toDisplayString(_ctx.getEventShowTime("start", event, date.value)) + " - " + toDisplayString(_ctx.getEventShowTime("end", event, date.value)),
636
643
  1
637
644
  /* TEXT */
638
- ), createElementVNode(
645
+ )) : createCommentVNode("v-if", true), createElementVNode(
639
646
  "p",
640
- _hoisted_28,
647
+ _hoisted_29,
641
648
  toDisplayString(event.content || ""),
642
649
  1
643
650
  /* TEXT */
@@ -657,11 +664,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
657
664
  class: "align-sub fill-color-text-placeholder"
658
665
  }), createElementVNode(
659
666
  "span",
660
- _hoisted_30,
667
+ _hoisted_31,
661
668
  toDisplayString(_ctx.t("ui.calendarView.new")),
662
669
  1
663
670
  /* TEXT */
664
- )], 8, _hoisted_29)) : createCommentVNode("v-if", true)]);
671
+ )], 8, _hoisted_30)) : createCommentVNode("v-if", true)]);
665
672
  }),
666
673
  128
667
674
  /* KEYED_FRAGMENT */
package/lib/pc.js CHANGED
@@ -54,7 +54,7 @@ var _sfc_main = defineComponent({
54
54
  TinyDatePicker: DatePicker,
55
55
  TinyTooltip: Tooltip
56
56
  },
57
- props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "markColor", "multiSelect"]),
57
+ props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "markColor", "multiSelect", "showTipTime"]),
58
58
  setup: function setup$1(props2, context) {
59
59
  return setup({
60
60
  props: props2,
@@ -115,43 +115,46 @@ var _hoisted_13 = {
115
115
  var _hoisted_14 = {
116
116
  class: "header-main"
117
117
  };
118
- var _hoisted_15 = {
118
+ var _hoisted_15 = ["onClick"];
119
+ var _hoisted_16 = {
119
120
  key: 0,
120
121
  class: "tiny-calendar-view-week__timeline"
121
122
  };
122
- var _hoisted_16 = {
123
+ var _hoisted_17 = {
123
124
  class: "day-times"
124
125
  };
125
- var _hoisted_17 = {
126
+ var _hoisted_18 = {
126
127
  class: "day-events"
127
128
  };
128
- var _hoisted_18 = {
129
+ var _hoisted_19 = {
129
130
  class: "events-list"
130
131
  };
131
- var _hoisted_19 = {
132
+ var _hoisted_20 = {
132
133
  key: 1,
133
134
  class: "tiny-calendar-view-week__schedule"
134
135
  };
135
- var _hoisted_20 = {
136
+ var _hoisted_21 = {
136
137
  class: "title"
137
138
  };
138
- var _hoisted_21 = {
139
+ var _hoisted_22 = {
140
+ key: 0,
139
141
  class: "date"
140
142
  };
141
- var _hoisted_22 = {
143
+ var _hoisted_23 = {
142
144
  class: "content"
143
145
  };
144
- var _hoisted_23 = ["onClick"];
145
- var _hoisted_24 = {
146
+ var _hoisted_24 = ["onClick"];
147
+ var _hoisted_25 = {
146
148
  class: "tooltip-main"
147
149
  };
148
- var _hoisted_25 = {
150
+ var _hoisted_26 = {
149
151
  class: "title"
150
152
  };
151
- var _hoisted_26 = {
153
+ var _hoisted_27 = {
154
+ key: 0,
152
155
  class: "date"
153
156
  };
154
- var _hoisted_27 = {
157
+ var _hoisted_28 = {
155
158
  class: "content"
156
159
  };
157
160
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -341,7 +344,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
341
344
  null,
342
345
  renderList(_ctx.state.weekDates, function(date, index) {
343
346
  return openBlock(), createElementBlock("li", {
344
- key: date.value
347
+ key: date.value,
348
+ onClick: function onClick($event) {
349
+ return _ctx.selectDay(date);
350
+ }
345
351
  }, [renderSlot(_ctx.$slots, "header", {
346
352
  slotScope: {
347
353
  date: date.value,
@@ -351,7 +357,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
351
357
  return [createElementVNode(
352
358
  "span",
353
359
  {
354
- class: normalizeClass(["date", _ctx.dateIsToday(date.value) && "is-today"])
360
+ class: normalizeClass(["date", [_ctx.dateIsToday(date.value) && "is-today", {
361
+ current: _ctx.computedSelectDay(date)
362
+ }]])
355
363
  },
356
364
  [createElementVNode(
357
365
  "span",
@@ -374,13 +382,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
374
382
  ), createElementVNode(
375
383
  "span",
376
384
  {
377
- class: normalizeClass(["week-day", _ctx.dateIsToday(date.value) && "is-today"])
385
+ class: normalizeClass(["week-day", [_ctx.dateIsToday(date.value) && "is-today", {
386
+ current: _ctx.computedSelectDay(date)
387
+ }]])
378
388
  },
379
389
  toDisplayString(_ctx.dateIsToday(date.value) ? _ctx.t("ui.datepicker.today") : _ctx.t("ui.calendarView.weekDays." + index)),
380
390
  3
381
391
  /* TEXT, CLASS */
382
392
  )];
383
- })]);
393
+ })], 8, _hoisted_15);
384
394
  }),
385
395
  128
386
396
  /* KEYED_FRAGMENT */
@@ -389,7 +399,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
389
399
  onClick: _cache[5] || (_cache[5] = function() {
390
400
  return _ctx.getNextWeek && _ctx.getNextWeek.apply(_ctx, arguments);
391
401
  })
392
- }, [createVNode(_component_icon_chevron_right)])]), _ctx.state.mode === "timeline" ? (openBlock(), createElementBlock("div", _hoisted_15, [createElementVNode("div", _hoisted_16, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
402
+ }, [createVNode(_component_icon_chevron_right)])]), _ctx.state.mode === "timeline" ? (openBlock(), createElementBlock("div", _hoisted_16, [createElementVNode("div", _hoisted_17, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
393
403
  Fragment,
394
404
  null,
395
405
  renderList(_ctx.state.dayTimes, function(item, i) {
@@ -412,7 +422,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
412
422
  }),
413
423
  128
414
424
  /* KEYED_FRAGMENT */
415
- ))])]), createElementVNode("div", _hoisted_17, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
425
+ ))])]), createElementVNode("div", _hoisted_18, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
416
426
  Fragment,
417
427
  null,
418
428
  renderList(_ctx.state.weekDates, function(date, index) {
@@ -431,7 +441,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
431
441
  events: _ctx.state.curWeekEvents[date.value]
432
442
  }
433
443
  }, function() {
434
- return [createElementVNode("ul", _hoisted_18, [(openBlock(true), createElementBlock(
444
+ return [createElementVNode("ul", _hoisted_19, [(openBlock(true), createElementBlock(
435
445
  Fragment,
436
446
  null,
437
447
  renderList(_ctx.state.dayTimes, function(item, i) {
@@ -484,7 +494,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
484
494
  }),
485
495
  128
486
496
  /* KEYED_FRAGMENT */
487
- ))])])])) : createCommentVNode("v-if", true), _ctx.state.mode === "schedule" ? (openBlock(), createElementBlock("div", _hoisted_19, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
497
+ ))])])])) : createCommentVNode("v-if", true), _ctx.state.mode === "schedule" ? (openBlock(), createElementBlock("div", _hoisted_20, [createElementVNode("ul", null, [(openBlock(true), createElementBlock(
488
498
  Fragment,
489
499
  null,
490
500
  renderList(_ctx.state.weekDates, function(date, index) {
@@ -508,19 +518,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
508
518
  class: "day-events"
509
519
  }, [createElementVNode(
510
520
  "div",
511
- _hoisted_20,
521
+ _hoisted_21,
512
522
  toDisplayString(event.title),
513
523
  1
514
524
  /* TEXT */
515
- ), createElementVNode(
525
+ ), _ctx.showTipTime ? (openBlock(), createElementBlock(
516
526
  "div",
517
- _hoisted_21,
527
+ _hoisted_22,
518
528
  toDisplayString(_ctx.getEventShowTime("start", event, date.value)) + " - " + toDisplayString(_ctx.getEventShowTime("end", event, date.value)),
519
529
  1
520
530
  /* TEXT */
521
- ), createElementVNode(
531
+ )) : createCommentVNode("v-if", true), createElementVNode(
522
532
  "p",
523
- _hoisted_22,
533
+ _hoisted_23,
524
534
  toDisplayString(event.content || ""),
525
535
  1
526
536
  /* TEXT */
@@ -541,45 +551,46 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
541
551
  toDisplayString(_ctx.t("ui.calendarView.new")),
542
552
  1
543
553
  /* TEXT */
544
- )], 8, _hoisted_23)) : createCommentVNode("v-if", true)]);
554
+ )], 8, _hoisted_24)) : createCommentVNode("v-if", true)]);
545
555
  }),
546
556
  128
547
557
  /* KEYED_FRAGMENT */
548
- ))])])) : createCommentVNode("v-if", true)])), createVNode(_component_tiny_tooltip, {
549
- ref: "tooltip",
550
- modelValue: _ctx.state.eventTipVisible,
551
- "onUpdate:modelValue": _cache[6] || (_cache[6] = function($event) {
552
- return _ctx.state.eventTipVisible = $event;
553
- }),
554
- "popper-class": "tiny-calendar-view-tooltip",
555
- manual: true,
556
- effect: "light",
557
- placement: "right"
558
- }, {
559
- content: withCtx(function() {
560
- return [createElementVNode("div", _hoisted_24, [createElementVNode(
561
- "div",
562
- _hoisted_25,
563
- toDisplayString(_ctx.state.eventTipContent.title),
564
- 1
565
- /* TEXT */
566
- ), createElementVNode(
567
- "div",
568
- _hoisted_26,
569
- toDisplayString(_ctx.state.eventTipContent.startDay) + " " + toDisplayString(_ctx.state.eventTipContent.startTime) + " ~ " + toDisplayString(_ctx.state.eventTipContent.endDay) + " " + toDisplayString(_ctx.state.eventTipContent.endTime),
570
- 1
571
- /* TEXT */
572
- ), createElementVNode(
573
- "p",
574
- _hoisted_27,
575
- toDisplayString(_ctx.state.eventTipContent.content || ""),
576
- 1
577
- /* TEXT */
578
- )])];
579
- }),
580
- _: 1
581
- /* STABLE */
582
- }, 8, ["modelValue"])],
558
+ ))])])) : createCommentVNode("v-if", true)])), createVNode(
559
+ _component_tiny_tooltip,
560
+ {
561
+ ref: "tooltip",
562
+ "popper-class": "tiny-calendar-view-tooltip",
563
+ effect: "light",
564
+ placement: "right"
565
+ },
566
+ {
567
+ content: withCtx(function() {
568
+ return [createElementVNode("div", _hoisted_25, [createElementVNode(
569
+ "div",
570
+ _hoisted_26,
571
+ toDisplayString(_ctx.state.eventTipContent.title),
572
+ 1
573
+ /* TEXT */
574
+ ), _ctx.showTipTime ? (openBlock(), createElementBlock(
575
+ "div",
576
+ _hoisted_27,
577
+ toDisplayString(_ctx.state.eventTipContent.startDay) + " " + toDisplayString(_ctx.state.eventTipContent.startTime) + " ~ " + toDisplayString(_ctx.state.eventTipContent.endDay) + " " + toDisplayString(_ctx.state.eventTipContent.endTime),
578
+ 1
579
+ /* TEXT */
580
+ )) : createCommentVNode("v-if", true), createElementVNode(
581
+ "p",
582
+ _hoisted_28,
583
+ toDisplayString(_ctx.state.eventTipContent.content || ""),
584
+ 1
585
+ /* TEXT */
586
+ )])];
587
+ }),
588
+ _: 1
589
+ /* STABLE */
590
+ },
591
+ 512
592
+ /* NEED_PATCH */
593
+ )],
583
594
  4
584
595
  /* STYLE */
585
596
  );
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-calendar-view",
3
- "version": "3.22.0",
3
+ "version": "3.23.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
7
7
  "sideEffects": false,
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@opentinyvue/vue-common": "~3.22.0",
11
- "@opentinyvue/vue-icon": "~3.22.0",
12
- "@opentinyvue/vue-renderless": "~3.22.0",
13
- "@opentinyvue/vue-tooltip": "~3.22.0",
14
- "@opentinyvue/vue-button": "~3.22.0",
15
- "@opentinyvue/vue-date-picker": "~3.22.0",
16
- "@opentinyvue/vue-radio-button": "~3.22.0",
17
- "@opentinyvue/vue-radio-group": "~3.22.0",
18
- "@opentinyvue/vue-slider-button": "~3.22.0",
19
- "@opentinyvue/vue-slider-button-group": "~3.22.0",
20
- "@opentinyvue/vue-theme": "~3.22.0"
10
+ "@opentinyvue/vue-common": "~3.23.0",
11
+ "@opentinyvue/vue-icon": "~3.23.0",
12
+ "@opentinyvue/vue-renderless": "~3.23.0",
13
+ "@opentinyvue/vue-tooltip": "~3.23.0",
14
+ "@opentinyvue/vue-button": "~3.23.0",
15
+ "@opentinyvue/vue-date-picker": "~3.23.0",
16
+ "@opentinyvue/vue-radio-button": "~3.23.0",
17
+ "@opentinyvue/vue-radio-group": "~3.23.0",
18
+ "@opentinyvue/vue-slider-button": "~3.23.0",
19
+ "@opentinyvue/vue-slider-button-group": "~3.23.0",
20
+ "@opentinyvue/vue-theme": "~3.23.0"
21
21
  },
22
22
  "license": "MIT",
23
23
  "types": "index.d.ts"
package/src/index.d.ts CHANGED
@@ -65,6 +65,10 @@ export declare const calendarViewProps: {
65
65
  type: BooleanConstructor;
66
66
  default: boolean;
67
67
  };
68
+ showTipTime: {
69
+ type: BooleanConstructor;
70
+ default: boolean;
71
+ };
68
72
  tiny_mode: StringConstructor;
69
73
  tiny_mode_root: BooleanConstructor;
70
74
  tiny_template: (ObjectConstructor | FunctionConstructor)[];
@@ -21,6 +21,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
21
21
  "mark-color"?: any;
22
22
  "multi-select"?: any;
23
23
  showBackToday?: any;
24
+ showTipTime?: any;
24
25
  }>, {
25
26
  t: (this: any, path: any, options?: any) => any;
26
27
  vm: any;
@@ -53,6 +54,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
53
54
  "mark-color"?: any;
54
55
  "multi-select"?: any;
55
56
  showBackToday?: any;
57
+ showTipTime?: any;
56
58
  }>>> & {
57
59
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
58
60
  "onWeek-change"?: ((...args: any[]) => any) | undefined;
@@ -87,5 +89,6 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
87
89
  readonly "mark-color"?: any;
88
90
  readonly "multi-select"?: any;
89
91
  readonly showBackToday?: any;
92
+ readonly showTipTime?: any;
90
93
  }, {}>;
91
94
  export default _default;
package/src/pc.vue.d.ts CHANGED
@@ -18,6 +18,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
18
18
  setDayBgColor?: any;
19
19
  modes?: any;
20
20
  dayTimes?: any;
21
+ showTipTime?: any;
21
22
  multiSelect?: any;
22
23
  markColor?: any;
23
24
  }>, {
@@ -49,6 +50,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
49
50
  setDayBgColor?: any;
50
51
  modes?: any;
51
52
  dayTimes?: any;
53
+ showTipTime?: any;
52
54
  multiSelect?: any;
53
55
  markColor?: any;
54
56
  }>>> & {
@@ -82,6 +84,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
82
84
  readonly setDayBgColor?: any;
83
85
  readonly modes?: any;
84
86
  readonly dayTimes?: any;
87
+ readonly showTipTime?: any;
85
88
  readonly multiSelect?: any;
86
89
  readonly markColor?: any;
87
90
  }, {}>;