@opentinyvue/vue-calendar-view 2.25.0 → 2.27.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.
@@ -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", "showTipTime"]),
78
+ props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "day", "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,
@@ -98,7 +98,10 @@ var render = function render2() {
98
98
  var _h = _vm.$createElement;
99
99
  var _c = _vm._self._c || _h;
100
100
  return _c("div", {
101
- staticClass: "w-full h-auto",
101
+ staticClass: "w-full h-auto overflow-auto",
102
+ style: {
103
+ "height": _vm.height ? parseInt(_vm.height) + "px" : "auto"
104
+ },
102
105
  attrs: {
103
106
  "data-tag": "tiny-calendar-view"
104
107
  }
@@ -137,9 +140,9 @@ var render = function render2() {
137
140
  class: [_vm.showBackToday ? "ml-5" : "", "shrink-0"],
138
141
  attrs: {
139
142
  "shape": "filter",
140
- "type": "month",
143
+ "type": _vm.state.dateType,
141
144
  "clearable": false,
142
- "format": _vm.t("ui.calendarView.dateFormat")
145
+ "format": _vm.day ? _vm.t("ui.calendarView.dateFormat") : _vm.t("ui.calendarView.monthFormat")
143
146
  },
144
147
  on: {
145
148
  "change": _vm.currentDateChange
@@ -403,16 +406,19 @@ var render = function render2() {
403
406
  return _c("li", {
404
407
  key: date.value + item.time,
405
408
  staticClass: "relative h-5 p-0.5 list-none border-b border-color-bg-2",
406
- class: [i % 2 === 0 ? "border-dashed" : "border-solid"]
409
+ class: {
410
+ "border-dashed": i % 2 === 0,
411
+ "border-solid": i % 2 !== 0,
412
+ "overflow-hidden overflow-y-auto scrollbar-size-0": _vm.getEventByTime(date.value, item.time, _vm.state.dayTimes[i + 1] && _vm.state.dayTimes[i + 1].time).length > 1
413
+ }
407
414
  }, _vm._l(_vm.getEventByTime(date.value, item.time, _vm.state.dayTimes[i + 1] && _vm.state.dayTimes[i + 1].time), function(event, idx) {
408
415
  return _c("div", {
409
416
  key: idx,
410
- staticClass: "w-11/12 flex items-center px-1.5 absolute top-0 left-0 z-10 leading-normal rounded-sm",
417
+ staticClass: "w-11/12 flex mb-0.5 items-center px-1.5 top-0 left-0 z-10 leading-normal rounded-sm",
411
418
  class: [_vm.gcls("theme-" + (event.theme || _vm.blue))],
412
419
  style: {
413
420
  "height": event.height + "px",
414
- "left": event.left + "px",
415
- "width": "calc(92% - " + event.left + "px)"
421
+ "width": "92%"
416
422
  }
417
423
  }, [_c("span", [_vm._v(_vm._s(event.title))])]);
418
424
  }), 0);
@@ -492,8 +498,8 @@ function __vue2_injectStyles(context) {
492
498
  this[o] = __cssModules[o];
493
499
  }
494
500
  }
495
- var mobileFirst = /* @__PURE__ */ function() {
501
+ var mobileFirst = /* @__PURE__ */ (function() {
496
502
  return __component__.exports;
497
- }();
503
+ })();
498
504
 
499
505
  export { mobileFirst as default };
package/lib/pc.js CHANGED
@@ -44,7 +44,7 @@ var render = function render2() {
44
44
  return _c("div", {
45
45
  staticClass: "tiny-calendar-view",
46
46
  style: {
47
- "height": typeof _vm.height === "number" ? _vm.height + "px" : _vm.height
47
+ "height": _vm.height ? parseInt(_vm.height) + "px" : "auto"
48
48
  }
49
49
  }, [_c("div", {
50
50
  staticClass: "tiny-calendar-view__header"
@@ -55,9 +55,9 @@ var render = function render2() {
55
55
  }, [_vm._v(_vm._s(_vm.t("ui.calendarView.backToday")))]) : _vm._e()], 1), _c("tiny-date-picker", {
56
56
  staticClass: "tiny-calendar-view__picker",
57
57
  attrs: {
58
- "type": "month",
58
+ "type": _vm.state.dateType,
59
59
  "clearable": false,
60
- "format": _vm.t("ui.calendarView.dateFormat")
60
+ "format": _vm.day ? _vm.t("ui.calendarView.dateFormat") : _vm.t("ui.calendarView.monthFormat")
61
61
  },
62
62
  on: {
63
63
  "change": _vm.currentDateChange
@@ -235,7 +235,10 @@ var render = function render2() {
235
235
  }, _vm._l(_vm.state.dayTimes, function(item, i) {
236
236
  return _c("li", {
237
237
  key: date.value + item.time,
238
- class: i % 2 === 0 && "is-even-num"
238
+ class: {
239
+ "is-even-num": i % 2 === 0,
240
+ "is-scroll-list": _vm.getEventByTime(date.value, item.time, _vm.state.dayTimes[i + 1] && _vm.state.dayTimes[i + 1].time).length > 1
241
+ }
239
242
  }, _vm._l(_vm.getEventByTime(date.value, item.time, _vm.state.dayTimes[i + 1] && _vm.state.dayTimes[i + 1].time), function(event, idx) {
240
243
  return _c("div", {
241
244
  key: idx,
@@ -243,8 +246,7 @@ var render = function render2() {
243
246
  class: ["theme-" + (event.theme || "blue")],
244
247
  style: {
245
248
  "height": event.height + "px",
246
- "left": event.left + "px",
247
- "width": "calc(92% - " + event.left + "px)"
249
+ "width": "92%"
248
250
  }
249
251
  }, [_c("span", [_vm._v(_vm._s(event.title))])]);
250
252
  }), 0);
@@ -327,7 +329,7 @@ var __vue2_script = defineComponent({
327
329
  TinyDatePicker: DatePicker,
328
330
  TinyTooltip: Tooltip
329
331
  },
330
- props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "dayTimes", "events", "height", "markColor", "multiSelect", "showBackToday", "showTipTime"]),
332
+ props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "day", "month", "dayTimes", "events", "height", "markColor", "multiSelect", "showBackToday", "showTipTime"]),
331
333
  setup: function setup$1(props2, context) {
332
334
  return setup({
333
335
  props: props2,
@@ -351,8 +353,8 @@ function __vue2_injectStyles(context) {
351
353
  this[o] = __cssModules[o];
352
354
  }
353
355
  }
354
- var pc = /* @__PURE__ */ function() {
356
+ var pc = /* @__PURE__ */ (function() {
355
357
  return __component__.exports;
356
- }();
358
+ })();
357
359
 
358
360
  export { pc as default };
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-calendar-view",
3
- "version": "2.25.0",
3
+ "type": "module",
4
+ "version": "2.27.0",
4
5
  "description": "",
6
+ "license": "MIT",
7
+ "sideEffects": false,
5
8
  "main": "./lib/index.js",
6
9
  "module": "./lib/index.js",
7
- "sideEffects": false,
8
- "type": "module",
9
10
  "dependencies": {
10
- "@opentinyvue/vue-common": "~2.25.0",
11
- "@opentinyvue/vue-icon": "~2.25.0",
12
- "@opentinyvue/vue-renderless": "~3.25.0",
13
- "@opentinyvue/vue-tooltip": "~2.25.0",
14
- "@opentinyvue/vue-button": "~2.25.0",
15
- "@opentinyvue/vue-date-picker": "~2.25.0",
16
- "@opentinyvue/vue-radio-button": "~2.25.0",
17
- "@opentinyvue/vue-radio-group": "~2.25.0",
18
- "@opentinyvue/vue-slider-button": "~2.25.0",
19
- "@opentinyvue/vue-slider-button-group": "~2.25.0",
20
- "@opentinyvue/vue-theme": "~3.25.0"
11
+ "@opentinyvue/vue-button": "~2.27.0",
12
+ "@opentinyvue/vue-common": "~2.27.0",
13
+ "@opentinyvue/vue-date-picker": "~2.27.0",
14
+ "@opentinyvue/vue-icon": "~2.27.0",
15
+ "@opentinyvue/vue-radio-button": "~2.27.0",
16
+ "@opentinyvue/vue-radio-group": "~2.27.0",
17
+ "@opentinyvue/vue-renderless": "~3.27.0",
18
+ "@opentinyvue/vue-slider-button": "~2.27.0",
19
+ "@opentinyvue/vue-slider-button-group": "~2.27.0",
20
+ "@opentinyvue/vue-theme": "~3.27.0",
21
+ "@opentinyvue/vue-tooltip": "~2.27.0"
21
22
  },
22
- "license": "MIT",
23
23
  "types": "index.d.ts"
24
24
  }