@opentinyvue/vue-calendar-view 2.22.1 → 2.24.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({
@@ -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,
@@ -116,9 +116,9 @@ var render = function render2() {
116
116
  staticClass: "p-2 max-h-[80vh] overflow-auto"
117
117
  }, [_c("div", {
118
118
  staticClass: "px-1.5 mb-1.5 border-l-2 border-color-brand"
119
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _c("div", {
119
+ }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _vm.showTipTime ? _c("div", {
120
120
  staticClass: "mb-1.5 px-2 text-color-text-placeholder"
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) + " ")]), _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", {
122
122
  staticClass: "px-2 text-color-icon-primary"
123
123
  }, [_vm._v(_vm._s(_vm.state.eventTipContent.content || ""))])])];
124
124
  },
@@ -322,20 +322,25 @@ var render = function render2() {
322
322
  }, _vm._l(_vm.state.weekDates, function(date, index) {
323
323
  return _c("li", {
324
324
  key: date.value,
325
- staticClass: "leading-10",
325
+ staticClass: "leading-10 cursor-pointer",
326
326
  attrs: {
327
327
  "data-tag": "tiny-calendar-view-weekitem"
328
+ },
329
+ on: {
330
+ "click": function click($event) {
331
+ return _vm.selectDay(date);
332
+ }
328
333
  }
329
334
  }, [_vm._t("header", function() {
330
335
  return [_c("span", {
331
336
  staticClass: "relative mr-2.5 text-base",
332
- 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"]
333
338
  }, [_c("span", [_vm._v(_vm._s(date.value.split("-")[2]))]), _vm.isShowMark(date.value) ? _c("span", {
334
339
  staticClass: "w-1.5 h-1.5 absolute -bottom-2 rounded-full",
335
340
  class: [date.value.split("-")[2] > 9 ? "left-2" : "left-0.5", _vm.gcls("mark-" + _vm.markColor)]
336
341
  }) : _vm._e()]), _c("span", {
337
342
  staticClass: "text-sm",
338
- 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"]
339
344
  }, [_vm._v(_vm._s(_vm.dateIsToday(date.value) ? _vm.t("ui.datepicker.today") : _vm.t("ui.calendarView.weekDays." + index)))])];
340
345
  }, {
341
346
  "slotScope": {
@@ -451,9 +456,9 @@ var render = function render2() {
451
456
  }
452
457
  }, [_c("div", {
453
458
  staticClass: "px-1.5 mb-1.5 border-l-2 border-color-brand break-all"
454
- }, [_vm._v(_vm._s(event.title))]), _c("div", {
459
+ }, [_vm._v(_vm._s(event.title))]), _vm.showTipTime ? _c("div", {
455
460
  staticClass: "mb-1.5 px-2 text-color-text-placeholder"
456
- }, [_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", {
457
462
  staticClass: "px-2 text-xs text-color-icon-primary line-clamp-2"
458
463
  }, [_vm._v(_vm._s(event.content || ""))])]);
459
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
  });
@@ -294,9 +303,9 @@ var render = function render2() {
294
303
  staticClass: "tooltip-main"
295
304
  }, [_c("div", {
296
305
  staticClass: "title"
297
- }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _c("div", {
306
+ }, [_vm._v(_vm._s(_vm.state.eventTipContent.title))]), _vm.showTipTime ? _c("div", {
298
307
  staticClass: "date"
299
- }, [_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", {
300
309
  staticClass: "content"
301
310
  }, [_vm._v(_vm._s(_vm.state.eventTipContent.content || ""))])])];
302
311
  },
@@ -318,7 +327,7 @@ var __vue2_script = defineComponent({
318
327
  TinyDatePicker: DatePicker,
319
328
  TinyTooltip: Tooltip
320
329
  },
321
- 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"]),
322
331
  setup: function setup$1(props2, context) {
323
332
  return setup({
324
333
  props: props2,
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-calendar-view",
3
- "version": "2.22.1",
3
+ "version": "2.24.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.24.0",
11
+ "@opentinyvue/vue-icon": "~2.24.0",
12
+ "@opentinyvue/vue-renderless": "~3.24.0",
13
+ "@opentinyvue/vue-tooltip": "~2.24.0",
14
+ "@opentinyvue/vue-button": "~2.24.0",
15
+ "@opentinyvue/vue-date-picker": "~2.24.0",
16
+ "@opentinyvue/vue-radio-button": "~2.24.0",
17
+ "@opentinyvue/vue-radio-group": "~2.24.0",
18
+ "@opentinyvue/vue-slider-button": "~2.24.0",
19
+ "@opentinyvue/vue-slider-button-group": "~2.24.0",
20
+ "@opentinyvue/vue-theme": "~3.24.0"
21
21
  },
22
22
  "license": "MIT",
23
23
  "types": "index.d.ts"
package/src/index.d.ts CHANGED
@@ -65,11 +65,16 @@ 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)[];
71
75
  tiny_renderless: FunctionConstructor;
72
76
  tiny_theme: StringConstructor;
77
+ tiny_mcp_config: ObjectConstructor;
73
78
  tiny_chart_theme: ObjectConstructor;
74
79
  };
75
80
  declare const _default: any;