@nutui/nutui 4.2.6 → 4.3.0-beta.1

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 (183) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/nutui.es.js +4 -2
  3. package/dist/nutui.js +5569 -5179
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/calendar/Calendar.js +19 -4
  6. package/dist/packages/calendarcard/CalendarCard.js +525 -0
  7. package/dist/packages/calendarcard/index.css +1 -0
  8. package/dist/packages/calendarcard/index.mjs +2 -0
  9. package/dist/packages/calendarcard/index.scss +92 -0
  10. package/dist/packages/calendarcard/style/css.mjs +2 -0
  11. package/dist/packages/calendarcard/style/index.mjs +2 -0
  12. package/dist/packages/calendaritem/CalendarItem.js +817 -7
  13. package/dist/packages/cascader/index.css +1 -1
  14. package/dist/packages/cascader/index.scss +1 -2
  15. package/dist/packages/date-djiVNSnJ.js +145 -0
  16. package/dist/packages/datepicker/DatePicker.js +31 -24
  17. package/dist/packages/datepicker/index.css +1 -1
  18. package/dist/packages/dialog/index.css +1 -1
  19. package/dist/packages/dialog/index.scss +0 -3
  20. package/dist/packages/locale/lang/baseLang.d.ts +8 -0
  21. package/dist/packages/locale/lang/en-US.d.ts +8 -0
  22. package/dist/packages/locale/lang/en-US.js +8 -0
  23. package/dist/packages/locale/lang/id-ID.d.ts +8 -0
  24. package/dist/packages/locale/lang/id-ID.js +8 -0
  25. package/dist/packages/locale/lang/zh-CN.d.ts +8 -0
  26. package/dist/packages/locale/lang/zh-CN.js +8 -0
  27. package/dist/packages/locale/lang/zh-TW.d.ts +8 -0
  28. package/dist/packages/locale/lang/zh-TW.js +8 -0
  29. package/dist/packages/picker/index.css +1 -1
  30. package/dist/packages/picker/index.scss +3 -0
  31. package/dist/packages/swiper/Swiper.js +5 -1
  32. package/dist/packages/tabs/Tabs.js +21 -4
  33. package/dist/packages/tabs/index.css +1 -1
  34. package/dist/packages/tabs/index.scss +6 -0
  35. package/dist/smartips/web-types.json +74 -4
  36. package/dist/style.css +1 -1
  37. package/dist/styles/base-jdb.css +1 -1
  38. package/dist/styles/base-jddkh.css +1 -1
  39. package/dist/styles/base-jdt.css +1 -1
  40. package/dist/styles/themes/default.scss +1 -0
  41. package/dist/styles/themes/jdb.scss +1 -0
  42. package/dist/styles/themes/jddkh.scss +1 -0
  43. package/dist/styles/themes/jdt.scss +1 -0
  44. package/dist/styles/variables-jdb.scss +1 -0
  45. package/dist/styles/variables-jddkh.scss +1 -0
  46. package/dist/styles/variables-jdt.scss +1 -0
  47. package/dist/styles/variables.scss +1 -0
  48. package/dist/types/__VUE/actionsheet/index.vue.d.ts +3 -3
  49. package/dist/types/__VUE/address/index.vue.d.ts +2 -2
  50. package/dist/types/__VUE/addresslist/components/GeneralShell.vue.d.ts +1 -1
  51. package/dist/types/__VUE/addresslist/components/ItemContents.vue.d.ts +1 -1
  52. package/dist/types/__VUE/addresslist/index.vue.d.ts +1 -1
  53. package/dist/types/__VUE/animate/index.vue.d.ts +1 -1
  54. package/dist/types/__VUE/audio/index.vue.d.ts +7 -5
  55. package/dist/types/__VUE/audio/types.d.ts +1 -0
  56. package/dist/types/__VUE/audiooperate/index.vue.d.ts +7 -5
  57. package/dist/types/__VUE/audiooperate/types.d.ts +1 -0
  58. package/dist/types/__VUE/avatar/index.vue.d.ts +2 -2
  59. package/dist/types/__VUE/avatarcropper/index.vue.d.ts +1 -1
  60. package/dist/types/__VUE/avatargroup/index.vue.d.ts +2 -2
  61. package/dist/types/__VUE/backtop/index.vue.d.ts +1 -1
  62. package/dist/types/__VUE/badge/index.vue.d.ts +1 -1
  63. package/dist/types/__VUE/barrage/index.vue.d.ts +1 -1
  64. package/dist/types/__VUE/button/index.vue.d.ts +2 -2
  65. package/dist/types/__VUE/calendar/index.vue.d.ts +4 -2
  66. package/dist/types/__VUE/calendarcard/icon.d.ts +12 -0
  67. package/dist/types/__VUE/calendarcard/icon.taro.d.ts +12 -0
  68. package/dist/types/__VUE/calendarcard/index.vue.d.ts +95 -0
  69. package/dist/types/__VUE/calendarcard/types.d.ts +12 -0
  70. package/dist/types/__VUE/calendarcard/utils.d.ts +19 -0
  71. package/dist/types/__VUE/calendaritem/index.vue.d.ts +1 -1
  72. package/dist/types/__VUE/card/index.vue.d.ts +1 -1
  73. package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +1 -1
  74. package/dist/types/__VUE/cascader/index.vue.d.ts +2 -2
  75. package/dist/types/__VUE/category/index.vue.d.ts +1 -1
  76. package/dist/types/__VUE/categorypane/index.vue.d.ts +1 -1
  77. package/dist/types/__VUE/cell/index.vue.d.ts +3 -3
  78. package/dist/types/__VUE/cellgroup/index.vue.d.ts +1 -1
  79. package/dist/types/__VUE/checkbox/index.vue.d.ts +1 -1
  80. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +1 -1
  81. package/dist/types/__VUE/circleprogress/index.vue.d.ts +1 -1
  82. package/dist/types/__VUE/col/index.vue.d.ts +1 -1
  83. package/dist/types/__VUE/collapse/index.vue.d.ts +1 -1
  84. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  85. package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +1 -1
  86. package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +1 -1
  87. package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +1 -1
  88. package/dist/types/__VUE/comment/index.vue.d.ts +1 -1
  89. package/dist/types/__VUE/configprovider/index.vue.d.ts +1 -1
  90. package/dist/types/__VUE/countdown/index.vue.d.ts +1 -1
  91. package/dist/types/__VUE/countup/index.vue.d.ts +3 -3
  92. package/dist/types/__VUE/datepicker/index.vue.d.ts +3 -3
  93. package/dist/types/__VUE/dialog/index.vue.d.ts +2 -2
  94. package/dist/types/__VUE/divider/index.vue.d.ts +1 -1
  95. package/dist/types/__VUE/drag/index.vue.d.ts +1 -1
  96. package/dist/types/__VUE/ecard/index.vue.d.ts +1 -1
  97. package/dist/types/__VUE/elevator/index.vue.d.ts +1 -1
  98. package/dist/types/__VUE/ellipsis/index.vue.d.ts +2 -2
  99. package/dist/types/__VUE/empty/index.vue.d.ts +1 -1
  100. package/dist/types/__VUE/fixednav/index.vue.d.ts +1 -1
  101. package/dist/types/__VUE/form/index.vue.d.ts +1 -1
  102. package/dist/types/__VUE/formitem/index.vue.d.ts +1 -1
  103. package/dist/types/__VUE/grid/index.vue.d.ts +1 -1
  104. package/dist/types/__VUE/griditem/index.vue.d.ts +1 -1
  105. package/dist/types/__VUE/icon/index.vue.d.ts +1 -1
  106. package/dist/types/__VUE/image/index.vue.d.ts +2 -2
  107. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +1 -1
  108. package/dist/types/__VUE/imagepreview/index.vue.d.ts +1 -1
  109. package/dist/types/__VUE/indicator/index.vue.d.ts +2 -2
  110. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +1 -1
  111. package/dist/types/__VUE/input/index.vue.d.ts +3 -3
  112. package/dist/types/__VUE/inputnumber/index.vue.d.ts +2 -2
  113. package/dist/types/__VUE/invoice/index.vue.d.ts +1 -1
  114. package/dist/types/__VUE/layout/index.vue.d.ts +1 -1
  115. package/dist/types/__VUE/list/index.vue.d.ts +1 -1
  116. package/dist/types/__VUE/menu/index.vue.d.ts +1 -1
  117. package/dist/types/__VUE/menuitem/index.vue.d.ts +1 -1
  118. package/dist/types/__VUE/navbar/index.vue.d.ts +2 -2
  119. package/dist/types/__VUE/noticebar/index.vue.d.ts +1 -1
  120. package/dist/types/__VUE/notify/index.vue.d.ts +1 -1
  121. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +3 -3
  122. package/dist/types/__VUE/overlay/index.vue.d.ts +1 -1
  123. package/dist/types/__VUE/pagination/index.vue.d.ts +1 -1
  124. package/dist/types/__VUE/picker/Column.vue.d.ts +3 -3
  125. package/dist/types/__VUE/picker/index.vue.d.ts +2 -2
  126. package/dist/types/__VUE/popover/index.vue.d.ts +2 -2
  127. package/dist/types/__VUE/popup/index.vue.d.ts +2 -2
  128. package/dist/types/__VUE/price/index.vue.d.ts +1 -1
  129. package/dist/types/__VUE/progress/index.vue.d.ts +1 -1
  130. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +1 -1
  131. package/dist/types/__VUE/radio/index.vue.d.ts +2 -2
  132. package/dist/types/__VUE/radiogroup/index.vue.d.ts +1 -1
  133. package/dist/types/__VUE/range/index.vue.d.ts +1 -1
  134. package/dist/types/__VUE/rate/index.vue.d.ts +1 -1
  135. package/dist/types/__VUE/row/index.vue.d.ts +2 -2
  136. package/dist/types/__VUE/searchbar/index.vue.d.ts +2 -2
  137. package/dist/types/__VUE/shortpassword/index.vue.d.ts +3 -3
  138. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +1 -1
  139. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +1 -1
  140. package/dist/types/__VUE/signature/index.vue.d.ts +1 -1
  141. package/dist/types/__VUE/skeleton/index.vue.d.ts +1 -1
  142. package/dist/types/__VUE/sku/components/SkuHeader.vue.d.ts +1 -1
  143. package/dist/types/__VUE/sku/components/SkuOperate.vue.d.ts +1 -1
  144. package/dist/types/__VUE/sku/components/SkuSelect.vue.d.ts +1 -1
  145. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  146. package/dist/types/__VUE/sku/index.vue.d.ts +2 -2
  147. package/dist/types/__VUE/space/index.vue.d.ts +1 -1
  148. package/dist/types/__VUE/step/index.vue.d.ts +1 -1
  149. package/dist/types/__VUE/steps/index.vue.d.ts +2 -2
  150. package/dist/types/__VUE/sticky/index.vue.d.ts +1 -1
  151. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +1 -1
  152. package/dist/types/__VUE/swipe/index.vue.d.ts +1 -1
  153. package/dist/types/__VUE/swipegroup/index.vue.d.ts +1 -1
  154. package/dist/types/__VUE/swiper/index.vue.d.ts +10 -1
  155. package/dist/types/__VUE/swiperitem/index.vue.d.ts +1 -1
  156. package/dist/types/__VUE/switch/index.vue.d.ts +1 -1
  157. package/dist/types/__VUE/tabbar/index.vue.d.ts +1 -1
  158. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +1 -1
  159. package/dist/types/__VUE/table/index.vue.d.ts +1 -1
  160. package/dist/types/__VUE/table/renderColumn.d.ts +1 -1
  161. package/dist/types/__VUE/tabpane/index.vue.d.ts +1 -1
  162. package/dist/types/__VUE/tabs/index.vue.d.ts +13 -4
  163. package/dist/types/__VUE/tabs/types.d.ts +1 -0
  164. package/dist/types/__VUE/tag/index.vue.d.ts +1 -1
  165. package/dist/types/__VUE/textarea/index.vue.d.ts +2 -2
  166. package/dist/types/__VUE/timedetail/index.vue.d.ts +1 -1
  167. package/dist/types/__VUE/timepannel/index.vue.d.ts +1 -1
  168. package/dist/types/__VUE/timeselect/index.vue.d.ts +2 -2
  169. package/dist/types/__VUE/toast/index.vue.d.ts +2 -2
  170. package/dist/types/__VUE/tour/index.vue.d.ts +2 -2
  171. package/dist/types/__VUE/trendarrow/index.vue.d.ts +1 -1
  172. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -2
  173. package/dist/types/__VUE/video/index.vue.d.ts +1 -1
  174. package/dist/types/__VUE/watermark/index.vue.d.ts +1 -1
  175. package/dist/types/index.d.ts +3 -2
  176. package/dist/types/locale/lang/baseLang.d.ts +8 -0
  177. package/dist/types/locale/lang/en-US.d.ts +8 -0
  178. package/dist/types/locale/lang/id-ID.d.ts +8 -0
  179. package/dist/types/locale/lang/zh-CN.d.ts +8 -0
  180. package/dist/types/locale/lang/zh-TW.d.ts +8 -0
  181. package/dist/types/utils/touchEmulator.d.ts +0 -0
  182. package/package.json +1 -1
  183. package/dist/packages/index-NLe0VBkN.js +0 -959
@@ -1,11 +1,821 @@
1
- import { N } from "../index-NLe0VBkN.js";
2
- import "vue";
3
- import "../_plugin-vue_export-helper-yVxbj29m.js";
4
- import "../component-TCzwHGVq.js";
5
- import "../raf-MQjoO-Ag.js";
6
- import "../index-s3RgMhc7.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { ref, computed, reactive, onMounted, watch, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, renderSlot, Fragment, renderList, normalizeStyle, createTextVNode } from "vue";
21
+ import { c as createComponent } from "../component-TCzwHGVq.js";
22
+ import { U as Utils } from "../date-djiVNSnJ.js";
23
+ import { r as requestAniFrame } from "../raf-MQjoO-Ag.js";
24
+ import { u as useLocale } from "../index-s3RgMhc7.js";
25
+ import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
26
  import "@nutui/nutui/dist/packages/locale/lang";
8
27
  import "../util-4Jkyw4BJ.js";
28
+ const { create } = createComponent("calendar-item");
29
+ const cN = "NutCalendarItem";
30
+ const _sfc_main = create({
31
+ props: {
32
+ type: {
33
+ type: String,
34
+ default: "one"
35
+ },
36
+ isAutoBackFill: {
37
+ type: Boolean,
38
+ default: false
39
+ },
40
+ toDateAnimation: {
41
+ type: Boolean,
42
+ default: true
43
+ },
44
+ poppable: {
45
+ type: Boolean,
46
+ default: true
47
+ },
48
+ showTitle: {
49
+ type: Boolean,
50
+ default: true
51
+ },
52
+ showSubTitle: {
53
+ type: Boolean,
54
+ default: true
55
+ },
56
+ showToday: {
57
+ type: Boolean,
58
+ default: true
59
+ },
60
+ title: {
61
+ type: String,
62
+ default: ""
63
+ },
64
+ confirmText: {
65
+ type: String,
66
+ default: ""
67
+ },
68
+ startText: {
69
+ type: String,
70
+ default: ""
71
+ },
72
+ endText: {
73
+ type: String,
74
+ default: ""
75
+ },
76
+ defaultValue: {
77
+ type: [String, Array],
78
+ default: ""
79
+ },
80
+ startDate: {
81
+ type: String,
82
+ default: Utils.getDay(0)
83
+ },
84
+ endDate: {
85
+ type: String,
86
+ default: Utils.getDay(365)
87
+ },
88
+ firstDayOfWeek: {
89
+ type: Number,
90
+ default: 0
91
+ },
92
+ disabledDate: Function
93
+ },
94
+ emits: ["choose", "update", "close", "select"],
95
+ setup(props, { emit, slots, expose }) {
96
+ const translate = useLocale(cN);
97
+ const weekdays = translate("weekdays").map((day, index) => ({
98
+ day,
99
+ weekend: index === 0 || index === 6
100
+ }));
101
+ const weeks = ref([...weekdays.slice(props.firstDayOfWeek, 7), ...weekdays.slice(0, props.firstDayOfWeek)]);
102
+ const months = ref(null);
103
+ const monthsPanel = ref(null);
104
+ const weeksPanel = ref(null);
105
+ const viewArea = ref(null);
106
+ const viewHeight = ref(0);
107
+ const compConthsData = computed(() => {
108
+ return state.monthsData.slice(state.defaultRange[0], state.defaultRange[1]);
109
+ });
110
+ const showTopBtn = computed(() => {
111
+ return slots.btn;
112
+ });
113
+ const topInfo = computed(() => {
114
+ return slots["top-info"];
115
+ });
116
+ const bottomInfo = computed(() => {
117
+ return slots["bottom-info"];
118
+ });
119
+ const state = reactive({
120
+ yearMonthTitle: "",
121
+ defaultRange: [],
122
+ currDate: "",
123
+ propStartDate: "",
124
+ propEndDate: "",
125
+ unLoadPrev: false,
126
+ touchParams: {
127
+ startY: 0,
128
+ endY: 0,
129
+ startTime: 0,
130
+ endTime: 0,
131
+ lastY: 0,
132
+ lastTime: 0
133
+ },
134
+ transformY: 0,
135
+ translateY: 0,
136
+ scrollDistance: 0,
137
+ defaultData: [],
138
+ chooseData: [],
139
+ monthsData: [],
140
+ dayPrefix: "nut-calendar__day",
141
+ startData: "",
142
+ endData: "",
143
+ isRange: props.type === "range",
144
+ timer: 0,
145
+ currentIndex: 0,
146
+ avgHeight: 0,
147
+ monthsNum: 0
148
+ });
149
+ const splitDate = (date) => {
150
+ return date.split("-");
151
+ };
152
+ const isStart = (currDate) => {
153
+ return Utils.isEqual(state.currDate[0], currDate);
154
+ };
155
+ const isEnd = (currDate) => {
156
+ return Utils.isEqual(state.currDate[1], currDate);
157
+ };
158
+ const isMultiple = (currDate) => {
159
+ var _a, _b;
160
+ if (((_a = state.currDate) == null ? void 0 : _a.length) > 0) {
161
+ return (_b = state.currDate) == null ? void 0 : _b.some((item) => {
162
+ return Utils.isEqual(item, currDate);
163
+ });
164
+ } else {
165
+ return false;
166
+ }
167
+ };
168
+ const getCurrDate = (day, month) => {
169
+ return month.curData[0] + "-" + month.curData[1] + "-" + Utils.getNumTwoBit(+day.day);
170
+ };
171
+ const getClass = (day, month, index) => {
172
+ const res = [];
173
+ if (typeof index === "number" && ((index + 1 + props.firstDayOfWeek) % 7 === 0 || (index + props.firstDayOfWeek) % 7 === 0)) {
174
+ res.push("weekend");
175
+ }
176
+ const currDate = getCurrDate(day, month);
177
+ const { type } = props;
178
+ if (day.type == "curr") {
179
+ if (Utils.isEqual(state.currDate, currDate) || (type == "range" || type == "week") && (isStart(currDate) || isEnd(currDate)) || type == "multiple" && isMultiple(currDate)) {
180
+ res.push(`${state.dayPrefix}--active`);
181
+ } else if (state.propStartDate && Utils.compareDate(currDate, state.propStartDate) || state.propEndDate && Utils.compareDate(state.propEndDate, currDate) || props.disabledDate && props.disabledDate(currDate)) {
182
+ res.push(`${state.dayPrefix}--disabled`);
183
+ } else if ((type == "range" || type == "week") && Array.isArray(state.currDate) && Object.values(state.currDate).length == 2 && Utils.compareDate(state.currDate[0], currDate) && Utils.compareDate(currDate, state.currDate[1])) {
184
+ res.push(`${state.dayPrefix}--choose`);
185
+ }
186
+ } else {
187
+ res.push(`${state.dayPrefix}--disabled`);
188
+ }
189
+ return res;
190
+ };
191
+ const confirm = () => {
192
+ const { type } = props;
193
+ if (type == "range" && state.chooseData.length == 2 || type != "range") {
194
+ let selectData = state.chooseData.slice(0);
195
+ if (type == "week") {
196
+ if (state.chooseData.length !== 2) {
197
+ return;
198
+ }
199
+ selectData = {
200
+ weekDate: [handleWeekDate(state.chooseData[0]), handleWeekDate(state.chooseData[1])]
201
+ };
202
+ }
203
+ emit("choose", selectData);
204
+ if (props.poppable) {
205
+ emit("update");
206
+ }
207
+ }
208
+ };
209
+ const chooseDay = (day, month, isFirst = false) => {
210
+ var _a, _b;
211
+ if (!getClass(day, month).includes(`${state.dayPrefix}--disabled`)) {
212
+ const { type } = props;
213
+ let [y, m] = month.curData;
214
+ let days = [...month.curData];
215
+ days[2] = Utils.getNumTwoBit(Number(day.day));
216
+ days[3] = `${days[0]}-${days[1]}-${days[2]}`;
217
+ days[4] = Utils.getWhatDay(+days[0], +days[1], +days[2]);
218
+ if (type == "multiple") {
219
+ if (((_a = state.currDate) == null ? void 0 : _a.length) > 0) {
220
+ let hasIndex = void 0;
221
+ (_b = state.currDate) == null ? void 0 : _b.forEach((item, index) => {
222
+ if (item == days[3]) {
223
+ hasIndex = index;
224
+ }
225
+ });
226
+ if (isFirst) {
227
+ state.chooseData.push([...days]);
228
+ } else {
229
+ if (hasIndex !== void 0) {
230
+ state.currDate.splice(hasIndex, 1);
231
+ state.chooseData.splice(hasIndex, 1);
232
+ } else {
233
+ state.currDate.push(days[3]);
234
+ state.chooseData.push([...days]);
235
+ }
236
+ }
237
+ } else {
238
+ state.currDate = [days[3]];
239
+ state.chooseData = [[...days]];
240
+ }
241
+ } else if (type == "range") {
242
+ let curDataLength = Object.values(state.currDate).length;
243
+ if (curDataLength == 2 || curDataLength == 0) {
244
+ state.currDate = [days[3]];
245
+ } else {
246
+ if (Utils.compareDate(state.currDate[0], days[3])) {
247
+ Array.isArray(state.currDate) && state.currDate.push(days[3]);
248
+ } else {
249
+ Array.isArray(state.currDate) && state.currDate.unshift(days[3]);
250
+ }
251
+ }
252
+ if (state.chooseData.length == 2 || !state.chooseData.length) {
253
+ state.chooseData = [[...days]];
254
+ } else {
255
+ if (Utils.compareDate(state.chooseData[0][3], days[3])) {
256
+ state.chooseData = [...state.chooseData, [...days]];
257
+ } else {
258
+ state.chooseData = [[...days], ...state.chooseData];
259
+ }
260
+ }
261
+ } else if (type == "week") {
262
+ let weekArr = Utils.getWeekDate(y, m, day.day, props.firstDayOfWeek);
263
+ if (state.propStartDate && Utils.compareDate(weekArr[0], state.propStartDate)) {
264
+ weekArr.splice(0, 1, state.propStartDate);
265
+ }
266
+ if (state.propEndDate && Utils.compareDate(state.propEndDate, weekArr[1])) {
267
+ weekArr.splice(1, 1, state.propEndDate);
268
+ }
269
+ state.currDate = weekArr;
270
+ state.chooseData = [Utils.formatResultDate(weekArr[0]), Utils.formatResultDate(weekArr[1])];
271
+ } else {
272
+ state.currDate = days[3];
273
+ state.chooseData = [...days];
274
+ }
275
+ if (!isFirst) {
276
+ let selectData = state.chooseData;
277
+ if (type == "week") {
278
+ selectData = {
279
+ weekDate: [
280
+ handleWeekDate(state.chooseData[0]),
281
+ handleWeekDate(state.chooseData[1])
282
+ ]
283
+ };
284
+ }
285
+ emit("select", selectData);
286
+ if (props.isAutoBackFill || !props.poppable) {
287
+ confirm();
288
+ }
289
+ }
290
+ }
291
+ };
292
+ const handleWeekDate = (weekDate) => {
293
+ let [y, m, d] = weekDate;
294
+ let obj = {
295
+ date: weekDate,
296
+ monthWeekNum: Utils.getMonthWeek(y, m, d, props.firstDayOfWeek),
297
+ yearWeekNum: Utils.getYearWeek(y, m, d, props.firstDayOfWeek)
298
+ };
299
+ return obj;
300
+ };
301
+ const getCurrData = (type) => {
302
+ const monthData = type == "prev" ? state.monthsData[0] : state.monthsData[state.monthsData.length - 1];
303
+ let year = parseInt(monthData.curData[0]);
304
+ let month = parseInt(monthData.curData[1].toString().replace(/^0/, ""));
305
+ switch (type) {
306
+ case "prev":
307
+ month == 1 && (year -= 1);
308
+ month = month == 1 ? 12 : --month;
309
+ break;
310
+ case "next":
311
+ month == 12 && (year += 1);
312
+ month = month == 12 ? 1 : ++month;
313
+ break;
314
+ }
315
+ return [year + "", Utils.getNumTwoBit(month), Utils.getMonthDays(String(year), String(month)) + ""];
316
+ };
317
+ const getDaysStatus = (days, type, dateInfo) => {
318
+ let { year, month } = dateInfo;
319
+ if (type == "prev" && days >= 7) {
320
+ days -= 7;
321
+ }
322
+ return Array.from(Array(days), (v, k) => {
323
+ return {
324
+ day: String(k + 1),
325
+ type,
326
+ year,
327
+ month
328
+ };
329
+ });
330
+ };
331
+ const getPreDaysStatus = (days, type, dateInfo, preCurrMonthDays) => {
332
+ days = days - props.firstDayOfWeek;
333
+ let { year, month } = dateInfo;
334
+ if (type == "prev" && days >= 7) {
335
+ days -= 7;
336
+ }
337
+ let months2 = Array.from(Array(preCurrMonthDays), (v, k) => {
338
+ return {
339
+ day: String(k + 1),
340
+ type,
341
+ year,
342
+ month
343
+ };
344
+ });
345
+ return months2.slice(preCurrMonthDays - days);
346
+ };
347
+ const getMonth = (curData, type) => {
348
+ const preMonthDays = Utils.getMonthPreDay(+curData[0], +curData[1]);
349
+ let preMonth = Number(curData[1]) - 1;
350
+ let preYear = Number(curData[0]);
351
+ if (preMonth <= 0) {
352
+ preMonth = 12;
353
+ preYear += 1;
354
+ }
355
+ const currMonthDays = Utils.getMonthDays(String(curData[0]), String(curData[1]));
356
+ const preCurrMonthDays = Utils.getMonthDays(preYear + "", preMonth + "");
357
+ const title = {
358
+ year: curData[0],
359
+ month: curData[1]
360
+ };
361
+ const monthInfo = {
362
+ curData,
363
+ title: translate("monthTitle", title.year, title.month),
364
+ monthData: [
365
+ ...getPreDaysStatus(
366
+ preMonthDays,
367
+ "prev",
368
+ { month: String(preMonth), year: String(preYear) },
369
+ preCurrMonthDays
370
+ ),
371
+ ...getDaysStatus(currMonthDays, "curr", title)
372
+ ],
373
+ cssHeight: 0,
374
+ cssScrollHeight: 0
375
+ };
376
+ monthInfo.cssHeight = 39 + (monthInfo.monthData.length > 35 ? 384 : 320);
377
+ let cssScrollHeight = 0;
378
+ if (state.monthsData.length > 0) {
379
+ cssScrollHeight = state.monthsData[state.monthsData.length - 1].cssScrollHeight + state.monthsData[state.monthsData.length - 1].cssHeight;
380
+ }
381
+ monthInfo.cssScrollHeight = cssScrollHeight;
382
+ if (type == "next") {
383
+ if (!state.endData || !Utils.compareDate(
384
+ `${state.endData[0]}-${state.endData[1]}-${Utils.getMonthDays(state.endData[0], state.endData[1])}`,
385
+ `${curData[0]}-${curData[1]}-${curData[2]}`
386
+ )) {
387
+ state.monthsData.push(monthInfo);
388
+ }
389
+ } else {
390
+ if (!state.startData || !Utils.compareDate(
391
+ `${curData[0]}-${curData[1]}-${curData[2]}`,
392
+ `${state.startData[0]}-${state.startData[1]}-01`
393
+ )) {
394
+ state.monthsData.unshift(monthInfo);
395
+ } else {
396
+ state.unLoadPrev = true;
397
+ }
398
+ }
399
+ };
400
+ const initData = () => {
401
+ let propStartDate = props.startDate ? props.startDate : Utils.getDay(0);
402
+ let propEndDate = props.endDate ? props.endDate : Utils.getDay(365);
403
+ state.propStartDate = propStartDate;
404
+ state.propEndDate = propEndDate;
405
+ state.startData = splitDate(propStartDate);
406
+ state.endData = splitDate(propEndDate);
407
+ if (props.defaultValue || Array.isArray(props.defaultValue) && props.defaultValue.length > 0) {
408
+ state.currDate = props.type !== "one" ? [...props.defaultValue] : props.defaultValue;
409
+ }
410
+ const startDate = {
411
+ year: Number(state.startData[0]),
412
+ month: Number(state.startData[1])
413
+ };
414
+ const endDate = {
415
+ year: Number(state.endData[0]),
416
+ month: Number(state.endData[1])
417
+ };
418
+ let monthsNum = endDate.month - startDate.month;
419
+ if (endDate.year - startDate.year > 0) {
420
+ monthsNum = monthsNum + 12 * (endDate.year - startDate.year);
421
+ }
422
+ if (monthsNum <= 0) {
423
+ monthsNum = 1;
424
+ }
425
+ getMonth(state.startData, "next");
426
+ let i = 1;
427
+ do {
428
+ getMonth(getCurrData("next"), "next");
429
+ } while (i++ < monthsNum);
430
+ state.monthsNum = monthsNum;
431
+ if (props.type == "range" && Array.isArray(state.currDate)) {
432
+ if (state.currDate.length > 0) {
433
+ if (propStartDate && Utils.compareDate(state.currDate[0], propStartDate)) {
434
+ state.currDate.splice(0, 1, propStartDate);
435
+ }
436
+ if (propEndDate && Utils.compareDate(propEndDate, state.currDate[1])) {
437
+ state.currDate.splice(1, 1, propEndDate);
438
+ }
439
+ state.defaultData = [...splitDate(state.currDate[0]), ...splitDate(state.currDate[1])];
440
+ }
441
+ } else if (props.type == "multiple" && Array.isArray(state.currDate)) {
442
+ if (state.currDate.length > 0) {
443
+ let defaultArr = [];
444
+ let obj = {};
445
+ state.currDate.forEach((item) => {
446
+ if (propStartDate && !Utils.compareDate(item, propStartDate) && propEndDate && !Utils.compareDate(propEndDate, item)) {
447
+ if (!Object.hasOwnProperty.call(obj, item)) {
448
+ defaultArr.push(item);
449
+ obj[item] = item;
450
+ }
451
+ }
452
+ });
453
+ state.currDate = [...defaultArr];
454
+ state.defaultData = [...splitDate(defaultArr[0])];
455
+ }
456
+ } else if (props.type == "week" && Array.isArray(state.currDate)) {
457
+ if (state.currDate.length > 0) {
458
+ let [y, m, d] = splitDate(state.currDate[0]);
459
+ let weekArr = Utils.getWeekDate(y, m, d, props.firstDayOfWeek);
460
+ state.currDate = weekArr;
461
+ if (propStartDate && Utils.compareDate(state.currDate[0], propStartDate)) {
462
+ state.currDate.splice(0, 1, propStartDate);
463
+ }
464
+ if (propEndDate && Utils.compareDate(propEndDate, state.currDate[1])) {
465
+ state.currDate.splice(1, 1, propEndDate);
466
+ }
467
+ state.defaultData = [...splitDate(state.currDate[0]), ...splitDate(state.currDate[1])];
468
+ }
469
+ } else {
470
+ if (state.currDate) {
471
+ if (propStartDate && Utils.compareDate(state.currDate, propStartDate)) {
472
+ state.currDate = propStartDate;
473
+ } else if (propEndDate && !Utils.compareDate(state.currDate, propEndDate)) {
474
+ state.currDate = propEndDate;
475
+ }
476
+ state.defaultData = [...splitDate(state.currDate)];
477
+ }
478
+ }
479
+ let current = 0;
480
+ let lastCurrent = 0;
481
+ if (state.defaultData.length > 0) {
482
+ state.monthsData.forEach((item, index) => {
483
+ if (item.title == translate("monthTitle", state.defaultData[0], state.defaultData[1])) {
484
+ current = index;
485
+ }
486
+ if (props.type == "range" || props.type == "week") {
487
+ if (item.title == translate("monthTitle", state.defaultData[3], state.defaultData[4])) {
488
+ lastCurrent = index;
489
+ }
490
+ }
491
+ });
492
+ }
493
+ setDefaultRange(monthsNum, current);
494
+ state.currentIndex = current;
495
+ state.yearMonthTitle = state.monthsData[state.currentIndex].title;
496
+ if (state.defaultData.length > 0) {
497
+ if (state.isRange) {
498
+ chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
499
+ chooseDay({ day: state.defaultData[5], type: "curr" }, state.monthsData[lastCurrent], true);
500
+ } else if (props.type == "week") {
501
+ chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
502
+ } else if (props.type == "multiple") {
503
+ [...state.currDate].forEach((item) => {
504
+ let dateArr = splitDate(item);
505
+ let current2 = state.currentIndex;
506
+ state.monthsData.forEach((item2, index) => {
507
+ if (item2.title == translate("monthTitle", dateArr[0], dateArr[1])) {
508
+ current2 = index;
509
+ }
510
+ });
511
+ chooseDay({ day: dateArr[2], type: "curr" }, state.monthsData[current2], true);
512
+ });
513
+ } else {
514
+ chooseDay({ day: state.defaultData[2], type: "curr" }, state.monthsData[state.currentIndex], true);
515
+ }
516
+ }
517
+ let lastItem = state.monthsData[state.monthsData.length - 1];
518
+ let containerHeight = lastItem.cssHeight + lastItem.cssScrollHeight;
519
+ requestAniFrame(() => {
520
+ if ((months == null ? void 0 : months.value) && (monthsPanel == null ? void 0 : monthsPanel.value) && (viewArea == null ? void 0 : viewArea.value)) {
521
+ viewHeight.value = months.value.clientHeight;
522
+ monthsPanel.value.style.height = `${containerHeight}px`;
523
+ months.value.scrollTop = state.monthsData[state.currentIndex].cssScrollHeight;
524
+ }
525
+ });
526
+ state.avgHeight = Math.floor(containerHeight / (monthsNum + 1));
527
+ };
528
+ const scrollToDate = (date) => {
529
+ if (Utils.compareDate(date, state.propStartDate)) {
530
+ date = state.propStartDate;
531
+ } else if (!Utils.compareDate(date, state.propEndDate)) {
532
+ date = state.propEndDate;
533
+ }
534
+ let dateArr = splitDate(date);
535
+ state.monthsData.forEach((item, index) => {
536
+ if (item.title == translate("monthTitle", dateArr[0], dateArr[1])) {
537
+ if (months.value) {
538
+ let distance = state.monthsData[index].cssScrollHeight - months.value.scrollTop;
539
+ if (props.toDateAnimation) {
540
+ let flag = 0;
541
+ let interval = setInterval(() => {
542
+ flag++;
543
+ if (months.value) {
544
+ let offset = distance / 10;
545
+ months.value.scrollTop = months.value.scrollTop + offset;
546
+ }
547
+ if (flag >= 10) {
548
+ clearInterval(interval);
549
+ if (months.value) {
550
+ months.value.scrollTop = state.monthsData[index].cssScrollHeight;
551
+ }
552
+ }
553
+ }, 40);
554
+ } else {
555
+ months.value.scrollTop = state.monthsData[index].cssScrollHeight;
556
+ }
557
+ }
558
+ }
559
+ });
560
+ };
561
+ const initPosition = () => {
562
+ if (months == null ? void 0 : months.value) {
563
+ months.value.scrollTop = state.monthsData[state.currentIndex].cssScrollHeight;
564
+ }
565
+ };
566
+ expose({
567
+ scrollToDate,
568
+ initPosition
569
+ });
570
+ const setDefaultRange = (monthsNum, current) => {
571
+ if (monthsNum >= 3) {
572
+ if (current > 0 && current < monthsNum) {
573
+ state.defaultRange = [current - 1, current + 3];
574
+ } else if (current == 0) {
575
+ state.defaultRange = [current, current + 4];
576
+ } else if (current == monthsNum) {
577
+ state.defaultRange = [current - 2, current + 2];
578
+ }
579
+ } else {
580
+ state.defaultRange = [0, monthsNum + 2];
581
+ }
582
+ let defaultScrollTop = state.monthsData[state.defaultRange[0]].cssScrollHeight;
583
+ state.translateY = defaultScrollTop;
584
+ };
585
+ const isActive = (day, month) => {
586
+ return (props.type == "range" || props.type == "week") && day.type == "curr" && getClass(day, month).includes("nut-calendar__day--active");
587
+ };
588
+ const isStartTip = (day, month) => {
589
+ return isActive(day, month) && isStart(getCurrDate(day, month));
590
+ };
591
+ const isEndTip = (day, month) => {
592
+ if (state.currDate.length >= 2 && isEnd(getCurrDate(day, month))) {
593
+ return isActive(day, month);
594
+ }
595
+ return false;
596
+ };
597
+ const rangeTip = () => {
598
+ if (state.currDate.length >= 2) {
599
+ return Utils.isEqual(state.currDate[0], state.currDate[1]);
600
+ }
601
+ };
602
+ const isCurrDay = (dateInfo) => {
603
+ const date = `${dateInfo.year}-${dateInfo.month}-${Number(dateInfo.day) < 10 ? "0" + dateInfo.day : dateInfo.day}`;
604
+ return Utils.isEqual(date, Utils.date2Str(/* @__PURE__ */ new Date()));
605
+ };
606
+ const mothsViewScroll = (e) => {
607
+ if (state.monthsData.length <= 1) {
608
+ return;
609
+ }
610
+ const currentScrollTop = e.target.scrollTop;
611
+ let current = Math.floor(currentScrollTop / state.avgHeight);
612
+ if (current == 0) {
613
+ if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
614
+ current += 1;
615
+ }
616
+ } else if (current > 0 && current < state.monthsNum - 1) {
617
+ if (currentScrollTop >= state.monthsData[current + 1].cssScrollHeight) {
618
+ current += 1;
619
+ }
620
+ if (currentScrollTop < state.monthsData[current].cssScrollHeight) {
621
+ current -= 1;
622
+ }
623
+ } else {
624
+ const viewPosition = Math.round(currentScrollTop + viewHeight.value);
625
+ if (viewPosition < state.monthsData[current].cssScrollHeight + state.monthsData[current].cssHeight && currentScrollTop > state.monthsData[current - 1].cssScrollHeight) {
626
+ current -= 1;
627
+ }
628
+ if (current + 1 <= state.monthsNum && viewPosition >= state.monthsData[current + 1].cssScrollHeight + state.monthsData[current + 1].cssHeight) {
629
+ current += 1;
630
+ }
631
+ if (current >= 1 && currentScrollTop < state.monthsData[current - 1].cssScrollHeight) {
632
+ current -= 1;
633
+ }
634
+ }
635
+ if (state.currentIndex !== current) {
636
+ state.currentIndex = current;
637
+ setDefaultRange(state.monthsNum, current);
638
+ }
639
+ state.yearMonthTitle = state.monthsData[current].title;
640
+ };
641
+ const resetRender = () => {
642
+ state.chooseData.splice(0);
643
+ state.monthsData.splice(0);
644
+ initData();
645
+ };
646
+ onMounted(() => {
647
+ initData();
648
+ });
649
+ watch(
650
+ () => props.defaultValue,
651
+ (val) => {
652
+ if (val) {
653
+ if (props.poppable) {
654
+ resetRender();
655
+ }
656
+ }
657
+ }
658
+ );
659
+ return __spreadProps(__spreadValues(__spreadValues({
660
+ weeks,
661
+ compConthsData,
662
+ showTopBtn,
663
+ topInfo,
664
+ bottomInfo,
665
+ rangeTip,
666
+ mothsViewScroll,
667
+ getClass,
668
+ isStartTip,
669
+ isEndTip,
670
+ chooseDay,
671
+ isCurrDay,
672
+ confirm,
673
+ months
674
+ }, toRefs(state)), toRefs(props)), {
675
+ translate,
676
+ monthsPanel,
677
+ weeksPanel,
678
+ viewArea
679
+ });
680
+ }
681
+ });
682
+ const _hoisted_1 = { class: "nut-calendar__header" };
683
+ const _hoisted_2 = {
684
+ key: 0,
685
+ class: "nut-calendar__header-title"
686
+ };
687
+ const _hoisted_3 = {
688
+ key: 1,
689
+ class: "nut-calendar__header-slot"
690
+ };
691
+ const _hoisted_4 = {
692
+ key: 2,
693
+ class: "nut-calendar__header-subtitle"
694
+ };
695
+ const _hoisted_5 = {
696
+ ref: "weeksPanel",
697
+ class: "nut-calendar__weekdays"
698
+ };
699
+ const _hoisted_6 = {
700
+ ref: "monthsPanel",
701
+ class: "nut-calendar__panel"
702
+ };
703
+ const _hoisted_7 = { class: "nut-calendar__month-title" };
704
+ const _hoisted_8 = { class: "nut-calendar__days" };
705
+ const _hoisted_9 = ["onClick"];
706
+ const _hoisted_10 = { class: "nut-calendar__day-value" };
707
+ const _hoisted_11 = {
708
+ key: 0,
709
+ class: "nut-calendar__day-tips nut-calendar__day-tips--top"
710
+ };
711
+ const _hoisted_12 = {
712
+ key: 1,
713
+ class: "nut-calendar__day-tips nut-calendar__day-tips--bottom"
714
+ };
715
+ const _hoisted_13 = {
716
+ key: 2,
717
+ class: "nut-calendar__day-tips--curr"
718
+ };
719
+ const _hoisted_14 = {
720
+ key: 4,
721
+ class: "nut-calendar__day-tip"
722
+ };
723
+ const _hoisted_15 = {
724
+ key: 0,
725
+ class: "nut-calendar__footer"
726
+ };
727
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
728
+ return openBlock(), createElementBlock("view", {
729
+ class: normalizeClass(["nut-calendar", {
730
+ "nut-calendar--nopop": !_ctx.poppable,
731
+ "nut-calendar--nofooter": _ctx.isAutoBackFill
732
+ }])
733
+ }, [
734
+ createElementVNode("view", _hoisted_1, [
735
+ _ctx.showTitle ? (openBlock(), createElementBlock("view", _hoisted_2, toDisplayString(_ctx.title || _ctx.translate("title")), 1)) : createCommentVNode("", true),
736
+ _ctx.showTopBtn ? (openBlock(), createElementBlock("view", _hoisted_3, [
737
+ renderSlot(_ctx.$slots, "btn")
738
+ ])) : createCommentVNode("", true),
739
+ _ctx.showSubTitle ? (openBlock(), createElementBlock("view", _hoisted_4, toDisplayString(_ctx.yearMonthTitle), 1)) : createCommentVNode("", true),
740
+ createElementVNode("view", _hoisted_5, [
741
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weeks, (item, index) => {
742
+ return openBlock(), createElementBlock("view", {
743
+ key: index,
744
+ class: normalizeClass(["nut-calendar__weekday", { weekend: item.weekend }])
745
+ }, toDisplayString(item.day), 3);
746
+ }), 128))
747
+ ], 512)
748
+ ]),
749
+ createElementVNode("view", {
750
+ ref: "months",
751
+ class: "nut-calendar__content",
752
+ onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.mothsViewScroll && _ctx.mothsViewScroll(...args))
753
+ }, [
754
+ createElementVNode("view", _hoisted_6, [
755
+ createElementVNode("view", {
756
+ ref: "viewArea",
757
+ class: "nut-calendar__body",
758
+ style: normalizeStyle({ transform: `translateY(${_ctx.translateY}px)` })
759
+ }, [
760
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.compConthsData, (month, index) => {
761
+ return openBlock(), createElementBlock("view", {
762
+ key: index,
763
+ class: "nut-calendar__month"
764
+ }, [
765
+ createElementVNode("view", _hoisted_7, toDisplayString(month.title), 1),
766
+ createElementVNode("view", _hoisted_8, [
767
+ createElementVNode("view", {
768
+ class: normalizeClass(["nut-calendar__days-item", _ctx.type === "range" ? "nut-calendar__days-item--range" : ""])
769
+ }, [
770
+ (openBlock(true), createElementBlock(Fragment, null, renderList(month.monthData, (day, i) => {
771
+ return openBlock(), createElementBlock("view", {
772
+ key: i,
773
+ class: normalizeClass(["nut-calendar__day", _ctx.getClass(day, month, i)]),
774
+ onClick: ($event) => _ctx.chooseDay(day, month)
775
+ }, [
776
+ createElementVNode("view", _hoisted_10, [
777
+ renderSlot(_ctx.$slots, "day", {
778
+ date: day.type == "curr" ? day : ""
779
+ }, () => [
780
+ createTextVNode(toDisplayString(day.type == "curr" ? day.day : ""), 1)
781
+ ])
782
+ ]),
783
+ _ctx.topInfo ? (openBlock(), createElementBlock("view", _hoisted_11, [
784
+ renderSlot(_ctx.$slots, "top-info", {
785
+ date: day.type == "curr" ? day : ""
786
+ })
787
+ ])) : createCommentVNode("", true),
788
+ _ctx.bottomInfo ? (openBlock(), createElementBlock("view", _hoisted_12, [
789
+ renderSlot(_ctx.$slots, "bottom-info", {
790
+ date: day.type == "curr" ? day : ""
791
+ })
792
+ ])) : createCommentVNode("", true),
793
+ !_ctx.bottomInfo && _ctx.showToday && _ctx.isCurrDay(day) ? (openBlock(), createElementBlock("view", _hoisted_13, toDisplayString(_ctx.translate("today")), 1)) : createCommentVNode("", true),
794
+ _ctx.isStartTip(day, month) ? (openBlock(), createElementBlock("view", {
795
+ key: 3,
796
+ class: normalizeClass(["nut-calendar__day-tip", { "nut-calendar__day-tips--top": _ctx.rangeTip() }])
797
+ }, toDisplayString(_ctx.startText || _ctx.translate("start")), 3)) : createCommentVNode("", true),
798
+ _ctx.isEndTip(day, month) ? (openBlock(), createElementBlock("view", _hoisted_14, toDisplayString(_ctx.endText || _ctx.translate("end")), 1)) : createCommentVNode("", true)
799
+ ], 10, _hoisted_9);
800
+ }), 128))
801
+ ], 2)
802
+ ])
803
+ ]);
804
+ }), 128))
805
+ ], 4)
806
+ ], 512)
807
+ ], 544),
808
+ _ctx.poppable && !_ctx.isAutoBackFill ? (openBlock(), createElementBlock("view", _hoisted_15, [
809
+ renderSlot(_ctx.$slots, "footer-info", { date: _ctx.chooseData }, () => [
810
+ createElementVNode("view", {
811
+ class: "nut-calendar__confirm",
812
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.confirm && _ctx.confirm(...args))
813
+ }, toDisplayString(_ctx.confirmText || _ctx.translate("confirm")), 1)
814
+ ])
815
+ ])) : createCommentVNode("", true)
816
+ ], 2);
817
+ }
818
+ const NutCalendarItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
9
819
  export {
10
- N as default
820
+ NutCalendarItem as default
11
821
  };