@opentinyvue/vue-calendar-view 2.22.0 → 2.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 = "2.22.0";
117
+ var version = "2.23.0";
114
118
  CalendarView.model = {
115
119
  prop: "modelValue",
116
120
  event: "update:modelValue"
@@ -75,7 +75,7 @@ var __vue2_script = defineComponent({
75
75
  TinyDatePicker: DatePicker,
76
76
  TinyTooltip: Tooltip
77
77
  },
78
- props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "mark-color", "multi-select", "showBackToday"]),
78
+ props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "mark-color", "multi-select", "showBackToday", "showTipTime"]),
79
79
  setup: function setup$1(props2, context) {
80
80
  return setup({
81
81
  props: props2,
@@ -106,7 +106,6 @@ var render = function render2() {
106
106
  ref: "tooltip",
107
107
  attrs: {
108
108
  "popper-class": "absolute max-w-[theme(spacing.80)]",
109
- "manual": true,
110
109
  "effect": "light",
111
110
  "placement": "right"
112
111
  },
@@ -114,24 +113,17 @@ var render = function render2() {
114
113
  key: "content",
115
114
  fn: function fn() {
116
115
  return [_c("div", {
117
- staticClass: "p-2"
116
+ staticClass: "p-2 max-h-[80vh] overflow-auto"
118
117
  }, [_c("div", {
119
118
  staticClass: "px-1.5 mb-1.5 border-l-2 border-color-brand"
120
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _c("div", {
119
+ }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _vm.showTipTime ? _c("div", {
121
120
  staticClass: "mb-1.5 px-2 text-color-text-placeholder"
122
- }, [_vm._v(" " + _vm._s(_vm.state.eventTipContent.startDay) + " " + _vm._s(_vm.state.eventTipContent.startTime) + " ~ " + _vm._s(_vm.state.eventTipContent.endDay) + " " + _vm._s(_vm.state.eventTipContent.endTime) + " ")]), _c("p", {
121
+ }, [_vm._v(" " + _vm._s(_vm.state.eventTipContent.startDay) + " " + _vm._s(_vm.state.eventTipContent.startTime) + " ~ " + _vm._s(_vm.state.eventTipContent.endDay) + " " + _vm._s(_vm.state.eventTipContent.endTime) + " ")]) : _vm._e(), _c("p", {
123
122
  staticClass: "px-2 text-color-icon-primary"
124
123
  }, [_vm._v(_vm._s(_vm.state.eventTipContent.content || ""))])])];
125
124
  },
126
125
  proxy: true
127
- }]),
128
- model: {
129
- value: _vm.state.eventTipVisible,
130
- callback: function callback($$v) {
131
- _vm.$set(_vm.state, "eventTipVisible", $$v);
132
- },
133
- expression: "state.eventTipVisible"
134
- }
126
+ }])
135
127
  }), _c("div", {
136
128
  staticClass: "flex justify-around items-center mb-3",
137
129
  attrs: {
@@ -330,20 +322,25 @@ var render = function render2() {
330
322
  }, _vm._l(_vm.state.weekDates, function(date, index) {
331
323
  return _c("li", {
332
324
  key: date.value,
333
- staticClass: "leading-10",
325
+ staticClass: "leading-10 cursor-pointer",
334
326
  attrs: {
335
327
  "data-tag": "tiny-calendar-view-weekitem"
328
+ },
329
+ on: {
330
+ "click": function click($event) {
331
+ return _vm.selectDay(date);
332
+ }
336
333
  }
337
334
  }, [_vm._t("header", function() {
338
335
  return [_c("span", {
339
336
  staticClass: "relative mr-2.5 text-base",
340
- class: [_vm.dateIsToday(date.value) ? "text-color-brand" : "text-color-text-primary"]
337
+ class: [_vm.dateIsToday(date.value) || _vm.computedSelectDay(date) ? "text-color-brand" : "text-color-text-primary"]
341
338
  }, [_c("span", [_vm._v(_vm._s(date.value.split("-")[2]))]), _vm.isShowMark(date.value) ? _c("span", {
342
339
  staticClass: "w-1.5 h-1.5 absolute -bottom-2 rounded-full",
343
340
  class: [date.value.split("-")[2] > 9 ? "left-2" : "left-0.5", _vm.gcls("mark-" + _vm.markColor)]
344
341
  }) : _vm._e()]), _c("span", {
345
342
  staticClass: "text-sm",
346
- class: [_vm.dateIsToday(date.value) ? "text-color-brand" : "text-color-text-placeholder"]
343
+ class: [_vm.dateIsToday(date.value) || _vm.computedSelectDay(date) ? "text-color-brand" : "text-color-text-placeholder"]
347
344
  }, [_vm._v(_vm._s(_vm.dateIsToday(date.value) ? _vm.t("ui.datepicker.today") : _vm.t("ui.calendarView.weekDays." + index)))])];
348
345
  }, {
349
346
  "slotScope": {
@@ -459,9 +456,9 @@ var render = function render2() {
459
456
  }
460
457
  }, [_c("div", {
461
458
  staticClass: "px-1.5 mb-1.5 border-l-2 border-color-brand break-all"
462
- }, [_vm._v(_vm._s(event.title))]), _c("div", {
459
+ }, [_vm._v(_vm._s(event.title))]), _vm.showTipTime ? _c("div", {
463
460
  staticClass: "mb-1.5 px-2 text-color-text-placeholder"
464
- }, [_vm._v(" " + _vm._s(_vm.getEventShowTime("start", event, date.value)) + " - " + _vm._s(_vm.getEventShowTime("end", event, date.value)) + " ")]), _c("p", {
461
+ }, [_vm._v(" " + _vm._s(_vm.getEventShowTime("start", event, date.value)) + " - " + _vm._s(_vm.getEventShowTime("end", event, date.value)) + " ")]) : _vm._e(), _c("p", {
465
462
  staticClass: "px-2 text-xs text-color-icon-primary line-clamp-2"
466
463
  }, [_vm._v(_vm._s(event.content || ""))])]);
467
464
  });
package/lib/pc.js CHANGED
@@ -179,17 +179,26 @@ var render = function render2() {
179
179
  staticClass: "header-main"
180
180
  }, _vm._l(_vm.state.weekDates, function(date, index) {
181
181
  return _c("li", {
182
- key: date.value
182
+ key: date.value,
183
+ on: {
184
+ "click": function click($event) {
185
+ return _vm.selectDay(date);
186
+ }
187
+ }
183
188
  }, [_vm._t("header", function() {
184
189
  return [_c("span", {
185
190
  staticClass: "date",
186
- class: _vm.dateIsToday(date.value) && "is-today"
191
+ class: [_vm.dateIsToday(date.value) && "is-today", {
192
+ current: _vm.computedSelectDay(date)
193
+ }]
187
194
  }, [_c("span", [_vm._v(_vm._s(date.value.split("-")[2]))]), _vm.isShowMark(date.value) ? _c("span", {
188
195
  staticClass: "mark",
189
196
  class: [date.value.split("-")[2] > 9 ? "is-two-digit" : "", _vm.markColor ? "mark-" + _vm.markColor : ""]
190
197
  }) : _vm._e()]), _c("span", {
191
198
  staticClass: "week-day",
192
- class: _vm.dateIsToday(date.value) && "is-today"
199
+ class: [_vm.dateIsToday(date.value) && "is-today", {
200
+ current: _vm.computedSelectDay(date)
201
+ }]
193
202
  }, [_vm._v(_vm._s(_vm.dateIsToday(date.value) ? _vm.t("ui.datepicker.today") : _vm.t("ui.calendarView.weekDays." + index)))])];
194
203
  }, {
195
204
  "slotScope": {
@@ -261,9 +270,9 @@ var render = function render2() {
261
270
  staticClass: "day-events"
262
271
  }, [_c("div", {
263
272
  staticClass: "title"
264
- }, [_vm._v(_vm._s(event.title))]), _c("div", {
273
+ }, [_vm._v(_vm._s(event.title))]), _vm.showTipTime ? _c("div", {
265
274
  staticClass: "date"
266
- }, [_vm._v(" " + _vm._s(_vm.getEventShowTime("start", event, date.value)) + " - " + _vm._s(_vm.getEventShowTime("end", event, date.value)) + " ")]), _c("p", {
275
+ }, [_vm._v(" " + _vm._s(_vm.getEventShowTime("start", event, date.value)) + " - " + _vm._s(_vm.getEventShowTime("end", event, date.value)) + " ")]) : _vm._e(), _c("p", {
267
276
  staticClass: "content"
268
277
  }, [_vm._v(_vm._s(event.content || ""))])]);
269
278
  });
@@ -284,7 +293,6 @@ var render = function render2() {
284
293
  ref: "tooltip",
285
294
  attrs: {
286
295
  "popper-class": "tiny-calendar-view-tooltip",
287
- "manual": true,
288
296
  "effect": "light",
289
297
  "placement": "right"
290
298
  },
@@ -295,21 +303,14 @@ var render = function render2() {
295
303
  staticClass: "tooltip-main"
296
304
  }, [_c("div", {
297
305
  staticClass: "title"
298
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _c("div", {
306
+ }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _vm.showTipTime ? _c("div", {
299
307
  staticClass: "date"
300
- }, [_vm._v(" " + _vm._s(_vm.state.eventTipContent.startDay) + " " + _vm._s(_vm.state.eventTipContent.startTime) + " ~ " + _vm._s(_vm.state.eventTipContent.endDay) + " " + _vm._s(_vm.state.eventTipContent.endTime) + " ")]), _c("p", {
308
+ }, [_vm._v(" " + _vm._s(_vm.state.eventTipContent.startDay) + " " + _vm._s(_vm.state.eventTipContent.startTime) + " ~ " + _vm._s(_vm.state.eventTipContent.endDay) + " " + _vm._s(_vm.state.eventTipContent.endTime) + " ")]) : _vm._e(), _c("p", {
301
309
  staticClass: "content"
302
310
  }, [_vm._v(_vm._s(_vm.state.eventTipContent.content || ""))])])];
303
311
  },
304
312
  proxy: true
305
- }]),
306
- model: {
307
- value: _vm.state.eventTipVisible,
308
- callback: function callback($$v) {
309
- _vm.$set(_vm.state, "eventTipVisible", $$v);
310
- },
311
- expression: "state.eventTipVisible"
312
- }
313
+ }])
313
314
  })], 1);
314
315
  };
315
316
  var staticRenderFns = [];
@@ -326,7 +327,7 @@ var __vue2_script = defineComponent({
326
327
  TinyDatePicker: DatePicker,
327
328
  TinyTooltip: Tooltip
328
329
  },
329
- props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "markColor", "multiSelect"]),
330
+ props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "markColor", "multiSelect", "showTipTime"]),
330
331
  setup: function setup$1(props2, context) {
331
332
  return setup({
332
333
  props: props2,
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-calendar-view",
3
- "version": "2.22.0",
3
+ "version": "2.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": "~2.22.0",
11
- "@opentinyvue/vue-icon": "~2.22.0",
12
- "@opentinyvue/vue-renderless": "~3.22.0",
13
- "@opentinyvue/vue-tooltip": "~2.22.0",
14
- "@opentinyvue/vue-button": "~2.22.0",
15
- "@opentinyvue/vue-date-picker": "~2.22.0",
16
- "@opentinyvue/vue-radio-button": "~2.22.0",
17
- "@opentinyvue/vue-radio-group": "~2.22.0",
18
- "@opentinyvue/vue-slider-button": "~2.22.0",
19
- "@opentinyvue/vue-slider-button-group": "~2.22.0",
20
- "@opentinyvue/vue-theme": "~3.22.0"
10
+ "@opentinyvue/vue-common": "~2.23.0",
11
+ "@opentinyvue/vue-icon": "~2.23.0",
12
+ "@opentinyvue/vue-renderless": "~3.23.0",
13
+ "@opentinyvue/vue-tooltip": "~2.23.0",
14
+ "@opentinyvue/vue-button": "~2.23.0",
15
+ "@opentinyvue/vue-date-picker": "~2.23.0",
16
+ "@opentinyvue/vue-radio-button": "~2.23.0",
17
+ "@opentinyvue/vue-radio-group": "~2.23.0",
18
+ "@opentinyvue/vue-slider-button": "~2.23.0",
19
+ "@opentinyvue/vue-slider-button-group": "~2.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)[];