@opentinyvue/vue-calendar-view 3.26.0 → 3.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.
@@ -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", "showTipTime"]),
82
+ props: [].concat(props, ["_constants", "modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "month", "day", "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,
@@ -274,11 +274,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
274
274
  }),
275
275
  class: normalizeClass([_ctx.showBackToday ? "ml-5" : "", "shrink-0"]),
276
276
  shape: "filter",
277
- type: "month",
277
+ type: _ctx.state.dateType,
278
278
  clearable: false,
279
279
  onChange: _ctx.currentDateChange,
280
- format: _ctx.t("ui.calendarView.dateFormat")
281
- }, null, 8, ["modelValue", "class", "onChange", "format"]), createElementVNode("div", _hoisted_6, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_slider_button_group, {
280
+ format: _ctx.day ? _ctx.t("ui.calendarView.dateFormat") : _ctx.t("ui.calendarView.monthFormat")
281
+ }, null, 8, ["modelValue", "class", "type", "onChange", "format"]), createElementVNode("div", _hoisted_6, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_slider_button_group, {
282
282
  key: 1,
283
283
  modelValue: _ctx.state.mode,
284
284
  "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
@@ -552,7 +552,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
552
552
  "li",
553
553
  {
554
554
  key: date.value + item.time,
555
- class: normalizeClass(["relative h-5 p-0.5 list-none border-b border-color-bg-2", [i % 2 === 0 ? "border-dashed" : "border-solid"]])
555
+ class: normalizeClass(["relative h-5 p-0.5 list-none border-b border-color-bg-2", {
556
+ "border-dashed": i % 2 === 0,
557
+ "border-solid": i % 2 !== 0,
558
+ "overflow-hidden overflow-y-auto scrollbar-size-0": _ctx.getEventByTime(date.value, item.time, _ctx.state.dayTimes[i + 1] && _ctx.state.dayTimes[i + 1].time).length > 1
559
+ }])
556
560
  },
557
561
  [(openBlock(true), createElementBlock(
558
562
  Fragment,
@@ -562,11 +566,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
562
566
  "div",
563
567
  {
564
568
  key: idx,
565
- class: normalizeClass(["w-11/12 flex items-center px-1.5 absolute top-0 left-0 z-10 leading-normal rounded-sm", [_ctx.gcls("theme-" + (event.theme || _ctx.blue))]]),
569
+ class: normalizeClass(["w-11/12 flex mb-0.5 items-center px-1.5 top-0 left-0 z-10 leading-normal rounded-sm", [_ctx.gcls("theme-" + (event.theme || _ctx.blue))]]),
566
570
  style: normalizeStyle({
567
571
  "height": event.height + "px",
568
- "left": event.left + "px",
569
- "width": "calc(92% - " + event.left + "px)"
572
+ "width": "92%"
570
573
  })
571
574
  },
572
575
  [createElementVNode(
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", "showBackToday", "showTipTime"]),
57
+ props: [].concat(props, ["modelValue", "showMark", "showNewSchedule", "setDayBgColor", "disabled", "mode", "modes", "year", "day", "month", "dayTimes", "events", "height", "markColor", "multiSelect", "showBackToday", "showTipTime"]),
58
58
  setup: function setup$1(props2, context) {
59
59
  return setup({
60
60
  props: props2,
@@ -194,11 +194,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
194
194
  return _ctx.state.currentDate = $event;
195
195
  }),
196
196
  class: "tiny-calendar-view__picker",
197
- type: "month",
197
+ type: _ctx.state.dateType,
198
198
  clearable: false,
199
199
  onChange: _ctx.currentDateChange,
200
- format: _ctx.t("ui.calendarView.dateFormat")
201
- }, null, 8, ["modelValue", "onChange", "format"]), createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_radio_group, {
200
+ format: _ctx.day ? _ctx.t("ui.calendarView.dateFormat") : _ctx.t("ui.calendarView.monthFormat")
201
+ }, null, 8, ["modelValue", "type", "onChange", "format"]), createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "tool")]), _ctx.modes.length ? (openBlock(), createBlock(_component_tiny_radio_group, {
202
202
  key: 0,
203
203
  modelValue: _ctx.state.mode,
204
204
  "onUpdate:modelValue": _cache[1] || (_cache[1] = function($event) {
@@ -450,7 +450,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
450
450
  "li",
451
451
  {
452
452
  key: date.value + item.time,
453
- class: normalizeClass(i % 2 === 0 && "is-even-num")
453
+ class: normalizeClass({
454
+ "is-even-num": i % 2 === 0,
455
+ "is-scroll-list": _ctx.getEventByTime(date.value, item.time, _ctx.state.dayTimes[i + 1] && _ctx.state.dayTimes[i + 1].time).length > 1
456
+ })
454
457
  },
455
458
  [(openBlock(true), createElementBlock(
456
459
  Fragment,
@@ -463,8 +466,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
463
466
  class: normalizeClass(["events-item", ["theme-" + (event.theme || "blue")]]),
464
467
  style: normalizeStyle({
465
468
  "height": event.height + "px",
466
- "left": event.left + "px",
467
- "width": "calc(92% - " + event.left + "px)"
469
+ "width": "92%"
468
470
  })
469
471
  },
470
472
  [createElementVNode(
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@opentinyvue/vue-calendar-view",
3
3
  "type": "module",
4
- "version": "3.26.0",
4
+ "version": "3.27.0",
5
5
  "description": "",
6
6
  "license": "MIT",
7
7
  "sideEffects": false,
8
8
  "main": "./lib/index.js",
9
9
  "module": "./lib/index.js",
10
10
  "dependencies": {
11
- "@opentinyvue/vue-button": "~3.26.0",
12
- "@opentinyvue/vue-common": "~3.26.0",
13
- "@opentinyvue/vue-date-picker": "~3.26.0",
14
- "@opentinyvue/vue-icon": "~3.26.0",
15
- "@opentinyvue/vue-radio-button": "~3.26.0",
16
- "@opentinyvue/vue-radio-group": "~3.26.0",
17
- "@opentinyvue/vue-renderless": "~3.26.0",
18
- "@opentinyvue/vue-slider-button": "~3.26.0",
19
- "@opentinyvue/vue-slider-button-group": "~3.26.0",
20
- "@opentinyvue/vue-theme": "~3.26.0",
21
- "@opentinyvue/vue-tooltip": "~3.26.0"
11
+ "@opentinyvue/vue-button": "~3.27.0",
12
+ "@opentinyvue/vue-common": "~3.27.0",
13
+ "@opentinyvue/vue-date-picker": "~3.27.0",
14
+ "@opentinyvue/vue-icon": "~3.27.0",
15
+ "@opentinyvue/vue-radio-button": "~3.27.0",
16
+ "@opentinyvue/vue-radio-group": "~3.27.0",
17
+ "@opentinyvue/vue-renderless": "~3.27.0",
18
+ "@opentinyvue/vue-slider-button": "~3.27.0",
19
+ "@opentinyvue/vue-slider-button-group": "~3.27.0",
20
+ "@opentinyvue/vue-theme": "~3.27.0",
21
+ "@opentinyvue/vue-tooltip": "~3.27.0"
22
22
  },
23
23
  "types": "index.d.ts"
24
24
  }
@@ -3,6 +3,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  height?: any;
4
4
  year?: any;
5
5
  month?: any;
6
+ day?: any;
6
7
  mode?: any;
7
8
  tiny_mode?: any;
8
9
  tiny_mode_root?: any;
@@ -37,6 +38,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
37
38
  height?: any;
38
39
  year?: any;
39
40
  month?: any;
41
+ day?: any;
40
42
  mode?: any;
41
43
  tiny_mode?: any;
42
44
  tiny_mode_root?: any;
@@ -73,6 +75,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
73
75
  readonly height?: any;
74
76
  readonly year?: any;
75
77
  readonly month?: any;
78
+ readonly day?: any;
76
79
  readonly mode?: any;
77
80
  readonly tiny_mode?: any;
78
81
  readonly tiny_mode_root?: any;
package/src/pc.vue.d.ts CHANGED
@@ -3,6 +3,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
3
3
  height?: any;
4
4
  year?: any;
5
5
  month?: any;
6
+ day?: any;
6
7
  mode?: any;
7
8
  tiny_mode?: any;
8
9
  tiny_mode_root?: any;
@@ -37,6 +38,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
37
38
  height?: any;
38
39
  year?: any;
39
40
  month?: any;
41
+ day?: any;
40
42
  mode?: any;
41
43
  tiny_mode?: any;
42
44
  tiny_mode_root?: any;
@@ -73,6 +75,7 @@ declare const _default: import("@vue/runtime-core").DefineComponent<Readonly<{
73
75
  readonly height?: any;
74
76
  readonly year?: any;
75
77
  readonly month?: any;
78
+ readonly day?: any;
76
79
  readonly mode?: any;
77
80
  readonly tiny_mode?: any;
78
81
  readonly tiny_mode_root?: any;