vant 4.0.0-rc.5 → 4.0.0-rc.6

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.
Files changed (54) hide show
  1. package/es/calendar/Calendar.mjs +10 -3
  2. package/es/calendar/CalendarHeader.d.ts +2 -0
  3. package/es/calendar/CalendarHeader.mjs +5 -1
  4. package/es/cell/Cell.d.ts +17 -0
  5. package/es/cell/Cell.mjs +11 -4
  6. package/es/cell/index.d.ts +9 -0
  7. package/es/collapse-item/CollapseItem.d.ts +13 -0
  8. package/es/collapse-item/index.d.ts +9 -0
  9. package/es/coupon/index.css +1 -1
  10. package/es/coupon-list/index.css +1 -1
  11. package/es/field/Field.d.ts +13 -0
  12. package/es/field/index.d.ts +9 -0
  13. package/es/image-preview/ImagePreview.mjs +3 -1
  14. package/es/image-preview/ImagePreviewItem.mjs +7 -2
  15. package/es/image-preview/index.css +1 -1
  16. package/es/index.d.ts +1 -1
  17. package/es/index.mjs +1 -1
  18. package/es/swipe/Swipe.mjs +1 -1
  19. package/es/toast/Toast.d.ts +4 -1
  20. package/es/toast/Toast.mjs +2 -1
  21. package/es/toast/index.css +1 -1
  22. package/es/toast/index.d.ts +3 -1
  23. package/es/toast/types.d.ts +2 -0
  24. package/lib/calendar/Calendar.js +10 -3
  25. package/lib/calendar/CalendarHeader.d.ts +2 -0
  26. package/lib/calendar/CalendarHeader.js +5 -1
  27. package/lib/cell/Cell.d.ts +17 -0
  28. package/lib/cell/Cell.js +10 -3
  29. package/lib/cell/index.d.ts +9 -0
  30. package/lib/collapse-item/CollapseItem.d.ts +13 -0
  31. package/lib/collapse-item/index.d.ts +9 -0
  32. package/lib/coupon/index.css +1 -1
  33. package/lib/coupon-list/index.css +1 -1
  34. package/lib/field/Field.d.ts +13 -0
  35. package/lib/field/index.d.ts +9 -0
  36. package/lib/image-preview/ImagePreview.js +3 -1
  37. package/lib/image-preview/ImagePreviewItem.js +7 -2
  38. package/lib/image-preview/index.css +1 -1
  39. package/lib/index.css +1 -1
  40. package/lib/index.d.ts +1 -1
  41. package/lib/index.js +1 -1
  42. package/lib/swipe/Swipe.js +1 -1
  43. package/lib/toast/Toast.d.ts +4 -1
  44. package/lib/toast/Toast.js +2 -1
  45. package/lib/toast/index.css +1 -1
  46. package/lib/toast/index.d.ts +3 -1
  47. package/lib/toast/types.d.ts +2 -0
  48. package/lib/vant.cjs.js +39 -13
  49. package/lib/vant.es.js +39 -13
  50. package/lib/vant.js +39 -13
  51. package/lib/vant.min.js +1 -1
  52. package/lib/web-types.json +555 -541
  53. package/package.json +1 -1
  54. package/changelog.generated.md +0 -71
@@ -106,7 +106,10 @@ var stdin_default = defineComponent({
106
106
  };
107
107
  let bodyHeight;
108
108
  const bodyRef = ref();
109
- const subtitle = ref("");
109
+ const subtitle = ref({
110
+ text: "",
111
+ date: void 0
112
+ });
110
113
  const currentDate = ref(getInitialDate());
111
114
  const [monthRefs, setMonthRefs] = useRefs();
112
115
  const dayOffset = computed(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
@@ -167,7 +170,10 @@ var stdin_default = defineComponent({
167
170
  monthRefs.value[index].setVisible(visible);
168
171
  });
169
172
  if (currentMonth) {
170
- subtitle.value = currentMonth.getTitle();
173
+ subtitle.value = {
174
+ text: currentMonth.getTitle(),
175
+ date: currentMonth.date
176
+ };
171
177
  }
172
178
  };
173
179
  const scrollToDate = (targetDate) => {
@@ -357,8 +363,9 @@ var stdin_default = defineComponent({
357
363
  const renderCalendar = () => _createVNode("div", {
358
364
  "class": bem()
359
365
  }, [_createVNode(CalendarHeader, {
366
+ "date": subtitle.value.date,
360
367
  "title": props.title,
361
- "subtitle": subtitle.value,
368
+ "subtitle": subtitle.value.text,
362
369
  "showTitle": props.showTitle,
363
370
  "showSubtitle": props.showSubtitle,
364
371
  "firstDayOfWeek": dayOffset.value,
@@ -1,10 +1,12 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
+ date: DateConstructor;
2
3
  title: StringConstructor;
3
4
  subtitle: StringConstructor;
4
5
  showTitle: BooleanConstructor;
5
6
  showSubtitle: BooleanConstructor;
6
7
  firstDayOfWeek: NumberConstructor;
7
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickSubtitle"[], "clickSubtitle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ date: DateConstructor;
8
10
  title: StringConstructor;
9
11
  subtitle: StringConstructor;
10
12
  showTitle: BooleanConstructor;
@@ -6,6 +6,7 @@ const [name] = createNamespace("calendar-header");
6
6
  var stdin_default = defineComponent({
7
7
  name,
8
8
  props: {
9
+ date: Date,
9
10
  title: String,
10
11
  subtitle: String,
11
12
  showTitle: Boolean,
@@ -29,7 +30,10 @@ var stdin_default = defineComponent({
29
30
  const onClickSubtitle = (event) => emit("clickSubtitle", event);
30
31
  const renderSubtitle = () => {
31
32
  if (props.showSubtitle) {
32
- const title = slots.subtitle ? slots.subtitle() : props.subtitle;
33
+ const title = slots.subtitle ? slots.subtitle({
34
+ date: props.date,
35
+ text: props.subtitle
36
+ }) : props.subtitle;
33
37
  return _createVNode("div", {
34
38
  "class": bem("header-subtitle"),
35
39
  "onClick": onClickSubtitle
package/es/cell/Cell.d.ts CHANGED
@@ -2,6 +2,10 @@ import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
2
2
  export declare type CellSize = 'normal' | 'large';
3
3
  export declare type CellArrowDirection = 'up' | 'down' | 'left' | 'right';
4
4
  export declare const cellSharedProps: {
5
+ tag: {
6
+ type: PropType<keyof HTMLElementTagNameMap>;
7
+ default: keyof HTMLElementTagNameMap;
8
+ };
5
9
  icon: StringConstructor;
6
10
  size: PropType<CellSize>;
7
11
  title: (NumberConstructor | StringConstructor)[];
@@ -26,6 +30,10 @@ export declare const cellSharedProps: {
26
30
  };
27
31
  };
28
32
  export declare const cellProps: {
33
+ tag: {
34
+ type: PropType<keyof HTMLElementTagNameMap>;
35
+ default: keyof HTMLElementTagNameMap;
36
+ };
29
37
  icon: StringConstructor;
30
38
  size: PropType<CellSize>;
31
39
  title: (NumberConstructor | StringConstructor)[];
@@ -55,6 +63,10 @@ export declare const cellProps: {
55
63
  };
56
64
  export declare type CellProps = ExtractPropTypes<typeof cellProps>;
57
65
  declare const _default: import("vue").DefineComponent<{
66
+ tag: {
67
+ type: PropType<keyof HTMLElementTagNameMap>;
68
+ default: keyof HTMLElementTagNameMap;
69
+ };
58
70
  icon: StringConstructor;
59
71
  size: PropType<CellSize>;
60
72
  title: (NumberConstructor | StringConstructor)[];
@@ -82,6 +94,10 @@ declare const _default: import("vue").DefineComponent<{
82
94
  url: StringConstructor;
83
95
  replace: BooleanConstructor;
84
96
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
97
+ tag: {
98
+ type: PropType<keyof HTMLElementTagNameMap>;
99
+ default: keyof HTMLElementTagNameMap;
100
+ };
85
101
  icon: StringConstructor;
86
102
  size: PropType<CellSize>;
87
103
  title: (NumberConstructor | StringConstructor)[];
@@ -111,6 +127,7 @@ declare const _default: import("vue").DefineComponent<{
111
127
  }>>, {
112
128
  replace: boolean;
113
129
  required: boolean;
130
+ tag: keyof HTMLElementTagNameMap;
114
131
  center: boolean;
115
132
  isLink: boolean;
116
133
  border: boolean;
package/es/cell/Cell.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  import { createVNode as _createVNode } from "vue";
2
2
  import { defineComponent } from "vue";
3
- import { isDef, extend, truthProp, unknownProp, numericProp, createNamespace } from "../utils/index.mjs";
3
+ import { isDef, extend, truthProp, unknownProp, numericProp, makeStringProp, createNamespace } from "../utils/index.mjs";
4
4
  import { useRoute, routeProps } from "../composables/use-route.mjs";
5
5
  import { Icon } from "../icon/index.mjs";
6
6
  const [name, bem] = createNamespace("cell");
7
7
  const cellSharedProps = {
8
+ tag: makeStringProp("div"),
8
9
  icon: String,
9
10
  size: String,
10
11
  title: numericProp,
@@ -83,8 +84,9 @@ var stdin_default = defineComponent({
83
84
  }
84
85
  };
85
86
  return () => {
86
- var _a, _b;
87
+ var _a;
87
88
  const {
89
+ tag,
88
90
  size,
89
91
  center,
90
92
  border,
@@ -101,12 +103,17 @@ var stdin_default = defineComponent({
101
103
  if (size) {
102
104
  classes[size] = !!size;
103
105
  }
104
- return _createVNode("div", {
106
+ return _createVNode(tag, {
105
107
  "class": bem(classes),
106
108
  "role": clickable ? "button" : void 0,
107
109
  "tabindex": clickable ? 0 : void 0,
108
110
  "onClick": route
109
- }, [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_b = slots.extra) == null ? void 0 : _b.call(slots)]);
111
+ }, {
112
+ default: () => {
113
+ var _a2;
114
+ return [renderLeftIcon(), renderTitle(), renderValue(), renderRightIcon(), (_a2 = slots.extra) == null ? void 0 : _a2.call(slots)];
115
+ }
116
+ });
110
117
  };
111
118
  }
112
119
  });
@@ -1,4 +1,8 @@
1
1
  export declare const Cell: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ tag: {
3
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
4
+ default: keyof HTMLElementTagNameMap;
5
+ };
2
6
  icon: StringConstructor;
3
7
  size: import("vue").PropType<import("./Cell").CellSize>;
4
8
  title: (NumberConstructor | StringConstructor)[];
@@ -26,6 +30,10 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
26
30
  url: StringConstructor;
27
31
  replace: BooleanConstructor;
28
32
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
33
+ tag: {
34
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
35
+ default: keyof HTMLElementTagNameMap;
36
+ };
29
37
  icon: StringConstructor;
30
38
  size: import("vue").PropType<import("./Cell").CellSize>;
31
39
  title: (NumberConstructor | StringConstructor)[];
@@ -55,6 +63,7 @@ export declare const Cell: import("../utils").WithInstall<import("vue").DefineCo
55
63
  }>>, {
56
64
  replace: boolean;
57
65
  required: boolean;
66
+ tag: keyof HTMLElementTagNameMap;
58
67
  center: boolean;
59
68
  isLink: boolean;
60
69
  border: boolean;
@@ -1,5 +1,9 @@
1
1
  import { type ExtractPropTypes } from 'vue';
2
2
  export declare const collapseItemProps: {
3
+ tag: {
4
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
5
+ default: keyof HTMLElementTagNameMap;
6
+ };
3
7
  icon: StringConstructor;
4
8
  size: import("vue").PropType<import("../cell").CellSize>;
5
9
  title: (NumberConstructor | StringConstructor)[];
@@ -37,6 +41,10 @@ export declare const collapseItemProps: {
37
41
  };
38
42
  export declare type CollapseItemProps = ExtractPropTypes<typeof collapseItemProps>;
39
43
  declare const _default: import("vue").DefineComponent<{
44
+ tag: {
45
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
46
+ default: keyof HTMLElementTagNameMap;
47
+ };
40
48
  icon: StringConstructor;
41
49
  size: import("vue").PropType<import("../cell").CellSize>;
42
50
  title: (NumberConstructor | StringConstructor)[];
@@ -72,6 +80,10 @@ declare const _default: import("vue").DefineComponent<{
72
80
  default: true;
73
81
  };
74
82
  }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
83
+ tag: {
84
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
85
+ default: keyof HTMLElementTagNameMap;
86
+ };
75
87
  icon: StringConstructor;
76
88
  size: import("vue").PropType<import("../cell").CellSize>;
77
89
  title: (NumberConstructor | StringConstructor)[];
@@ -108,6 +120,7 @@ declare const _default: import("vue").DefineComponent<{
108
120
  };
109
121
  }>>, {
110
122
  required: boolean;
123
+ tag: keyof HTMLElementTagNameMap;
111
124
  center: boolean;
112
125
  disabled: boolean;
113
126
  isLink: boolean;
@@ -1,4 +1,8 @@
1
1
  export declare const CollapseItem: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ tag: {
3
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
4
+ default: keyof HTMLElementTagNameMap;
5
+ };
2
6
  icon: StringConstructor;
3
7
  size: import("vue").PropType<import("..").CellSize>;
4
8
  title: (NumberConstructor | StringConstructor)[];
@@ -34,6 +38,10 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
34
38
  default: true;
35
39
  };
36
40
  }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
41
+ tag: {
42
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
43
+ default: keyof HTMLElementTagNameMap;
44
+ };
37
45
  icon: StringConstructor;
38
46
  size: import("vue").PropType<import("..").CellSize>;
39
47
  title: (NumberConstructor | StringConstructor)[];
@@ -70,6 +78,7 @@ export declare const CollapseItem: import("../utils").WithInstall<import("vue").
70
78
  };
71
79
  }>>, {
72
80
  required: boolean;
81
+ tag: keyof HTMLElementTagNameMap;
73
82
  center: boolean;
74
83
  disabled: boolean;
75
84
  isLink: boolean;
@@ -1 +1 @@
1
- :root{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__:root{position:relative;flex:1;border-radius:0 var(--van-coupon-radius) var(--van-coupon-radius) 0}.van-coupon__name{margin-bottom:10px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
1
+ :root{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1}.van-coupon__name{margin-bottom:10px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}
@@ -1 +1 @@
1
- :root{--van-coupon-list-background: var(--van-background);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__:root{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-background);border-radius:var(--van-radius-max)}.van-coupon-list__field .van-field__:root::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__:root::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-2)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-bold);background-color:var(--van-background-2)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
1
+ :root{--van-coupon-list-background: var(--van-background);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-background);border-radius:var(--van-radius-max)}.van-coupon-list__field .van-field__body::-webkit-input-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-2)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-bold);background-color:var(--van-background-2)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}
@@ -44,6 +44,10 @@ export declare const fieldSharedProps: {
44
44
  };
45
45
  };
46
46
  export declare const fieldProps: {
47
+ tag: {
48
+ type: PropType<keyof HTMLElementTagNameMap>;
49
+ default: keyof HTMLElementTagNameMap;
50
+ };
47
51
  icon: StringConstructor;
48
52
  size: PropType<import("../cell").CellSize>;
49
53
  title: (NumberConstructor | StringConstructor)[];
@@ -128,6 +132,10 @@ export declare const fieldProps: {
128
132
  };
129
133
  export declare type FieldProps = ExtractPropTypes<typeof fieldProps>;
130
134
  declare const _default: import("vue").DefineComponent<{
135
+ tag: {
136
+ type: PropType<keyof HTMLElementTagNameMap>;
137
+ default: keyof HTMLElementTagNameMap;
138
+ };
131
139
  icon: StringConstructor;
132
140
  size: PropType<import("../cell").CellSize>;
133
141
  title: (NumberConstructor | StringConstructor)[];
@@ -210,6 +218,10 @@ declare const _default: import("vue").DefineComponent<{
210
218
  default: null;
211
219
  };
212
220
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
221
+ tag: {
222
+ type: PropType<keyof HTMLElementTagNameMap>;
223
+ default: keyof HTMLElementTagNameMap;
224
+ };
213
225
  icon: StringConstructor;
214
226
  size: PropType<import("../cell").CellSize>;
215
227
  title: (NumberConstructor | StringConstructor)[];
@@ -305,6 +317,7 @@ declare const _default: import("vue").DefineComponent<{
305
317
  }, {
306
318
  type: FieldType;
307
319
  required: boolean;
320
+ tag: keyof HTMLElementTagNameMap;
308
321
  center: boolean;
309
322
  autofocus: boolean;
310
323
  disabled: boolean;
@@ -1,5 +1,9 @@
1
1
  import { FieldProps } from './Field';
2
2
  export declare const Field: import("../utils").WithInstall<import("vue").DefineComponent<{
3
+ tag: {
4
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
5
+ default: keyof HTMLElementTagNameMap;
6
+ };
3
7
  icon: StringConstructor;
4
8
  size: import("vue").PropType<import("..").CellSize>;
5
9
  title: (NumberConstructor | StringConstructor)[];
@@ -82,6 +86,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
82
86
  default: null;
83
87
  };
84
88
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
89
+ tag: {
90
+ type: import("vue").PropType<keyof HTMLElementTagNameMap>;
91
+ default: keyof HTMLElementTagNameMap;
92
+ };
85
93
  icon: StringConstructor;
86
94
  size: import("vue").PropType<import("..").CellSize>;
87
95
  title: (NumberConstructor | StringConstructor)[];
@@ -177,6 +185,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
177
185
  }, {
178
186
  type: import("./types").FieldType;
179
187
  required: boolean;
188
+ tag: keyof HTMLElementTagNameMap;
180
189
  center: boolean;
181
190
  autofocus: boolean;
182
191
  disabled: boolean;
@@ -103,7 +103,9 @@ var stdin_default = defineComponent({
103
103
  "rootHeight": state.rootHeight,
104
104
  "onScale": emitScale,
105
105
  "onClose": emitClose
106
- }, null))]
106
+ }, {
107
+ image: slots.image
108
+ }))]
107
109
  });
108
110
  const renderClose = () => {
109
111
  if (props.closeable) {
@@ -20,7 +20,8 @@ var stdin_default = defineComponent({
20
20
  },
21
21
  emits: ["scale", "close"],
22
22
  setup(props, {
23
- emit
23
+ emit,
24
+ slots
24
25
  }) {
25
26
  const state = reactive({
26
27
  scale: 1,
@@ -238,7 +239,11 @@ var stdin_default = defineComponent({
238
239
  "onTouchend": onTouchEnd,
239
240
  "onTouchcancel": onTouchEnd
240
241
  }, {
241
- default: () => [_createVNode(Image, {
242
+ default: () => [slots.image ? _createVNode("div", {
243
+ "class": bem("image-wrap")
244
+ }, [slots.image({
245
+ src: props.src
246
+ })]) : _createVNode(Image, {
242
247
  "src": props.src,
243
248
  "fit": "contain",
244
249
  "class": bem("image", {
@@ -1 +1 @@
1
- :root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image{width:100%;transition-property:transform}.van-image-preview__image--vertical{width:auto;height:100%}.van-image-preview__image img{-webkit-user-drag:none}.van-image-preview__image .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
1
+ :root{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image,.van-image-preview__image-wrap{width:100%;transition-property:transform}.van-image-preview__image--vertical,.van-image-preview__image-wrap--vertical{width:auto;height:100%}.van-image-preview__image img,.van-image-preview__image-wrap img,.van-image-preview__image video,.van-image-preview__image-wrap video{-webkit-user-drag:none}.van-image-preview__image .van-image__error,.van-image-preview__image-wrap .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon,.van-image-preview__image-wrap .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading,.van-image-preview__image-wrap .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}
package/es/index.d.ts CHANGED
@@ -93,4 +93,4 @@ declare namespace _default {
93
93
  }
94
94
  export default _default;
95
95
  export function install(app: any): void;
96
- export const version: "4.0.0-rc.5";
96
+ export const version: "4.0.0-rc.6";
package/es/index.mjs CHANGED
@@ -86,7 +86,7 @@ import { TimePicker } from "./time-picker/index.mjs";
86
86
  import { Toast } from "./toast/index.mjs";
87
87
  import { TreeSelect } from "./tree-select/index.mjs";
88
88
  import { Uploader } from "./uploader/index.mjs";
89
- const version = "4.0.0-rc.5";
89
+ const version = "4.0.0-rc.6";
90
90
  function install(app) {
91
91
  const components = [
92
92
  ActionBar,
@@ -54,7 +54,7 @@ var stdin_default = defineComponent({
54
54
  }
55
55
  return 0;
56
56
  });
57
- const maxCount = computed(() => Math.ceil(Math.abs(minOffset.value) / size.value));
57
+ const maxCount = computed(() => size.value ? Math.ceil(Math.abs(minOffset.value) / size.value) : count.value);
58
58
  const trackSize = computed(() => count.value * size.value);
59
59
  const activeIndicator = computed(() => (state.active + count.value) % count.value);
60
60
  const isCorrectDirection = computed(() => {
@@ -1,6 +1,6 @@
1
1
  import { type PropType, type CSSProperties, type ExtractPropTypes } from 'vue';
2
2
  import { LoadingType } from '../loading';
3
- import type { ToastType, ToastPosition } from './types';
3
+ import type { ToastType, ToastPosition, ToastWordBreak } from './types';
4
4
  export declare const toastProps: {
5
5
  icon: StringConstructor;
6
6
  show: BooleanConstructor;
@@ -20,6 +20,7 @@ export declare const toastProps: {
20
20
  default: ToastPosition;
21
21
  };
22
22
  teleport: PropType<string | import("vue").RendererElement | null | undefined>;
23
+ wordBreak: PropType<ToastWordBreak>;
23
24
  className: PropType<unknown>;
24
25
  iconPrefix: StringConstructor;
25
26
  transition: {
@@ -53,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
53
54
  default: ToastPosition;
54
55
  };
55
56
  teleport: PropType<string | import("vue").RendererElement | null | undefined>;
57
+ wordBreak: PropType<ToastWordBreak>;
56
58
  className: PropType<unknown>;
57
59
  iconPrefix: StringConstructor;
58
60
  transition: {
@@ -84,6 +86,7 @@ declare const _default: import("vue").DefineComponent<{
84
86
  default: ToastPosition;
85
87
  };
86
88
  teleport: PropType<string | import("vue").RendererElement | null | undefined>;
89
+ wordBreak: PropType<ToastWordBreak>;
87
90
  className: PropType<unknown>;
88
91
  iconPrefix: StringConstructor;
89
92
  transition: {
@@ -17,6 +17,7 @@ const toastProps = {
17
17
  duration: makeNumberProp(2e3),
18
18
  position: makeStringProp("middle"),
19
19
  teleport: [String, Object],
20
+ wordBreak: String,
20
21
  className: unknownProp,
21
22
  iconPrefix: String,
22
23
  transition: makeStringProp("van-fade"),
@@ -108,7 +109,7 @@ var stdin_default = defineComponent({
108
109
  onMounted(toggleClickable);
109
110
  onUnmounted(toggleClickable);
110
111
  return () => _createVNode(Popup, _mergeProps({
111
- "class": [bem([props.position, {
112
+ "class": [bem([props.position, props.wordBreak === "normal" ? "break-normal" : props.wordBreak, {
112
113
  [props.type]: !props.icon
113
114
  }]), props.className],
114
115
  "lockScroll": false,
@@ -1 +1 @@
1
- :root{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;text-align:center;word-break:break-all;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}
1
+ :root{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-webkit-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}
@@ -17,6 +17,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
17
17
  default: import("./types").ToastPosition;
18
18
  };
19
19
  teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
20
+ wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
20
21
  className: import("vue").PropType<unknown>;
21
22
  iconPrefix: StringConstructor;
22
23
  transition: {
@@ -48,6 +49,7 @@ export declare const Toast: import("../utils").WithInstall<import("vue").DefineC
48
49
  default: import("./types").ToastPosition;
49
50
  };
50
51
  teleport: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
52
+ wordBreak: import("vue").PropType<import("./types").ToastWordBreak>;
51
53
  className: import("vue").PropType<unknown>;
52
54
  iconPrefix: StringConstructor;
53
55
  transition: {
@@ -77,7 +79,7 @@ export default Toast;
77
79
  export { toastProps } from './Toast';
78
80
  export { showToast, closeToast, showFailToast, showLoadingToast, showSuccessToast, allowMultipleToast, setToastDefaultOptions, resetToastDefaultOptions, } from './function-call';
79
81
  export type { ToastProps } from './Toast';
80
- export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, } from './types';
82
+ export type { ToastType, ToastOptions, ToastPosition, ToastThemeVars, ToastWordBreak, } from './types';
81
83
  declare module 'vue' {
82
84
  interface GlobalComponents {
83
85
  VanToast: typeof Toast;
@@ -3,6 +3,7 @@ import type { LoadingType } from '../loading';
3
3
  import type { Numeric } from '../utils';
4
4
  export declare type ToastType = 'text' | 'loading' | 'success' | 'fail' | 'html';
5
5
  export declare type ToastPosition = 'top' | 'middle' | 'bottom';
6
+ export declare type ToastWordBreak = 'break-all' | 'break-word' | 'normal';
6
7
  export declare type ToastOptions = {
7
8
  icon?: string;
8
9
  type?: ToastType;
@@ -18,6 +19,7 @@ export declare type ToastOptions = {
18
19
  className?: unknown;
19
20
  transition?: string;
20
21
  iconPrefix?: string;
22
+ wordBreak?: ToastWordBreak;
21
23
  loadingType?: LoadingType;
22
24
  forbidClick?: boolean;
23
25
  closeOnClick?: boolean;
@@ -135,7 +135,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
135
135
  };
136
136
  let bodyHeight;
137
137
  const bodyRef = (0, import_vue2.ref)();
138
- const subtitle = (0, import_vue2.ref)("");
138
+ const subtitle = (0, import_vue2.ref)({
139
+ text: "",
140
+ date: void 0
141
+ });
139
142
  const currentDate = (0, import_vue2.ref)(getInitialDate());
140
143
  const [monthRefs, setMonthRefs] = (0, import_use_refs.useRefs)();
141
144
  const dayOffset = (0, import_vue2.computed)(() => props.firstDayOfWeek ? +props.firstDayOfWeek % 7 : 0);
@@ -196,7 +199,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
196
199
  monthRefs.value[index].setVisible(visible);
197
200
  });
198
201
  if (currentMonth) {
199
- subtitle.value = currentMonth.getTitle();
202
+ subtitle.value = {
203
+ text: currentMonth.getTitle(),
204
+ date: currentMonth.date
205
+ };
200
206
  }
201
207
  };
202
208
  const scrollToDate = (targetDate) => {
@@ -386,8 +392,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
386
392
  const renderCalendar = () => (0, import_vue.createVNode)("div", {
387
393
  "class": (0, import_utils2.bem)()
388
394
  }, [(0, import_vue.createVNode)(import_CalendarHeader.default, {
395
+ "date": subtitle.value.date,
389
396
  "title": props.title,
390
- "subtitle": subtitle.value,
397
+ "subtitle": subtitle.value.text,
391
398
  "showTitle": props.showTitle,
392
399
  "showSubtitle": props.showSubtitle,
393
400
  "firstDayOfWeek": dayOffset.value,
@@ -1,10 +1,12 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
+ date: DateConstructor;
2
3
  title: StringConstructor;
3
4
  subtitle: StringConstructor;
4
5
  showTitle: BooleanConstructor;
5
6
  showSubtitle: BooleanConstructor;
6
7
  firstDayOfWeek: NumberConstructor;
7
8
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "clickSubtitle"[], "clickSubtitle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ date: DateConstructor;
8
10
  title: StringConstructor;
9
11
  subtitle: StringConstructor;
10
12
  showTitle: BooleanConstructor;
@@ -28,6 +28,7 @@ const [name] = (0, import_utils.createNamespace)("calendar-header");
28
28
  var stdin_default = (0, import_vue2.defineComponent)({
29
29
  name,
30
30
  props: {
31
+ date: Date,
31
32
  title: String,
32
33
  subtitle: String,
33
34
  showTitle: Boolean,
@@ -51,7 +52,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
51
52
  const onClickSubtitle = (event) => emit("clickSubtitle", event);
52
53
  const renderSubtitle = () => {
53
54
  if (props.showSubtitle) {
54
- const title = slots.subtitle ? slots.subtitle() : props.subtitle;
55
+ const title = slots.subtitle ? slots.subtitle({
56
+ date: props.date,
57
+ text: props.subtitle
58
+ }) : props.subtitle;
55
59
  return (0, import_vue.createVNode)("div", {
56
60
  "class": (0, import_utils2.bem)("header-subtitle"),
57
61
  "onClick": onClickSubtitle