ninemoon-ui 0.1.14 → 0.2.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 (40) hide show
  1. package/dist/components/carousel/carousel.vue.d.ts +2 -0
  2. package/dist/components/date/datepicker.vue.d.ts +1 -1
  3. package/dist/components/date/datepickerRange.vue.d.ts +16 -0
  4. package/dist/components/form/formlabel.vue.d.ts +1 -3
  5. package/dist/components/pagination/pagination.vue.d.ts +8 -15
  6. package/dist/components/popover/popover.vue.d.ts +5 -0
  7. package/dist/components/switch/switch.vue.d.ts +10 -0
  8. package/dist/components/upload/upload.vue.d.ts +5 -0
  9. package/dist/index.d.ts +139 -61
  10. package/dist/index.es.js +21 -21
  11. package/dist/js/arrow/arrow.js +2 -2
  12. package/dist/js/badge/badge.js +1 -1
  13. package/dist/js/calendar/calendar.js +4 -4
  14. package/dist/js/carousel/carousel.js +59 -38
  15. package/dist/js/check/checkbox.js +4 -4
  16. package/dist/js/date/datepicker.js +20 -8
  17. package/dist/js/date/datepickerRange.js +104 -69
  18. package/dist/js/dateArrowplus/dateArrowplus.js +2 -2
  19. package/dist/js/delete/delete.js +2 -2
  20. package/dist/js/dialog/dialog.js +41 -29
  21. package/dist/js/form/formlabel.js +21 -89
  22. package/dist/js/image/image.js +17 -18
  23. package/dist/js/index/index.js +274 -253
  24. package/dist/js/input/input.js +8 -8
  25. package/dist/js/menu/menu.js +1 -1
  26. package/dist/js/numberInput/numberinput.js +8 -8
  27. package/dist/js/pagination/pagination.js +17 -14
  28. package/dist/js/popover/popover.js +3 -239
  29. package/dist/js/popover.vue_vue_type_script_setup_true_lang/popover.vue_vue_type_script_setup_true_lang.js +249 -0
  30. package/dist/js/radio/radiobox.js +4 -4
  31. package/dist/js/scrollBar/scrollBar.js +4 -4
  32. package/dist/js/select/select.js +5 -5
  33. package/dist/js/select/selectoption.js +3 -3
  34. package/dist/js/switch/switch.js +33 -7
  35. package/dist/js/table/table.js +107 -77
  36. package/dist/js/table/tableItem.js +2 -2
  37. package/dist/js/tabs/tabs.js +202 -21
  38. package/dist/js/upload/upload.js +57 -12
  39. package/dist/utils/tool.d.ts +5 -0
  40. package/package.json +5 -2
@@ -51,12 +51,12 @@ const _hoisted_1$1 = {
51
51
  xmlns: "http://www.w3.org/2000/svg"
52
52
  };
53
53
  function _sfc_render$1(_ctx, _cache) {
54
- return openBlock(), createElementBlock("svg", _hoisted_1$1, _cache[0] || (_cache[0] = [
54
+ return openBlock(), createElementBlock("svg", _hoisted_1$1, [..._cache[0] || (_cache[0] = [
55
55
  createElementVNode("path", {
56
56
  d: "M320 885.333333c-8.533333 0-17.066667-4.266667-23.466667-10.666666-12.8-12.8-10.666667-34.133333 2.133334-44.8L654.933333 512 298.666667 194.133333c-12.8-10.666667-14.933333-32-2.133334-44.8 10.666667-12.8 32-14.933333 44.8-2.133333l384 341.333333c6.4 6.4 10.666667 14.933333 10.666667 23.466667 0 8.533333-4.266667 17.066667-10.666667 23.466667l-384 341.333333c-6.4 6.4-12.8 8.533333-21.333333 8.533333z",
57
57
  fill: "#666666"
58
58
  }, null, -1)
59
- ]));
59
+ ])]);
60
60
  }
61
61
  const Arrow = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
62
62
  const _sfc_main = {};
@@ -67,7 +67,7 @@ const _hoisted_1 = {
67
67
  xmlns: "http://www.w3.org/2000/svg"
68
68
  };
69
69
  function _sfc_render(_ctx, _cache) {
70
- return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
70
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
71
71
  createElementVNode("path", {
72
72
  d: "M853.333333 149.333333h-138.666666V106.666667c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v42.666666h-277.333334V106.666667c0-17.066667-14.933333-32-32-32s-32 14.933333-32 32v42.666666H170.666667c-40.533333 0-74.666667 34.133333-74.666667 74.666667v618.666667C96 883.2 130.133333 917.333333 170.666667 917.333333h682.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666v-618.666667C928 183.466667 893.866667 149.333333 853.333333 149.333333zM170.666667 213.333333h138.666666v64c0 17.066667 14.933333 32 32 32s32-14.933333 32-32v-64h277.333334v64c0 17.066667 14.933333 32 32 32s32-14.933333 32-32v-64H853.333333c6.4 0 10.666667 4.266667 10.666667 10.666667v194.133333c-4.266667-2.133333-6.4-2.133333-10.666667-2.133333H170.666667c-4.266667 0-6.4 0-10.666667 2.133333v-194.133333c0-6.4 4.266667-10.666667 10.666667-10.666667z m682.666666 640H170.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V477.866667c4.266667 2.133333 6.4 2.133333 10.666667 2.133333h682.666666c4.266667 0 6.4 0 10.666667-2.133333v364.8c0 6.4-4.266667 10.666667-10.666667 10.666666z",
73
73
  fill: "#666666"
@@ -76,7 +76,7 @@ function _sfc_render(_ctx, _cache) {
76
76
  d: "M384 608h-85.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h85.333333c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM725.333333 608h-192c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h192c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32z",
77
77
  fill: "#666666"
78
78
  }, null, -1)
79
- ]));
79
+ ])]);
80
80
  }
81
81
  const Calendar = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
82
82
  export {
@@ -1,4 +1,4 @@
1
- import { defineComponent, readonly, openBlock, createElementBlock, normalizeClass, unref, createVNode, useSlots, ref, onMounted, computed, watch, onUnmounted, normalizeStyle, h } from "vue";
1
+ import { defineComponent, readonly, openBlock, createElementBlock, normalizeClass, unref, createVNode, useSlots, ref, onMounted, computed, h, watch, onUnmounted, normalizeStyle, createBlock, resolveDynamicComponent, Comment, Text, Fragment } from "vue";
2
2
  import { A as ArrowIcon } from "../arrow/arrow.js";
3
3
  import { S as ShapeFlags } from "../shapeFlag/shapeFlag.js";
4
4
  import "../index/index.js";
@@ -26,6 +26,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
26
26
  const _sfc_main = /* @__PURE__ */ defineComponent({
27
27
  __name: "carousel",
28
28
  props: {
29
+ width: {},
29
30
  height: {},
30
31
  holdstop: { type: Boolean, default: true },
31
32
  startindex: { default: 0 }
@@ -39,53 +40,73 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
39
40
  translatexNum.value = body.value.offsetWidth;
40
41
  });
41
42
  const activeIndex = ref(props.startindex);
42
- const validSlots = computed(() => {
43
- return slots.default().reduce((pre, cur) => {
44
- if (cur.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
45
- pre = pre.concat(cur.children);
46
- } else if (cur.shapeFlag & ShapeFlags.SLOTS_CHILDREN) {
47
- pre.push(cur);
43
+ const flattenSlots = (nodes) => {
44
+ const result = [];
45
+ for (const node of nodes) {
46
+ if (!node)
47
+ continue;
48
+ if (node.type === Comment || node.type === Text)
49
+ continue;
50
+ if (node.type === Fragment) {
51
+ if (node.children) {
52
+ result.push(...flattenSlots(
53
+ Array.isArray(node.children) ? node.children : [node.children]
54
+ ));
55
+ }
56
+ continue;
57
+ }
58
+ if (node.shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
59
+ if (node.children) {
60
+ result.push(...flattenSlots(node.children));
61
+ }
62
+ continue;
63
+ }
64
+ if (node.shapeFlag & (ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT | ShapeFlags.SLOTS_CHILDREN)) {
65
+ result.push(node);
48
66
  }
49
- return pre;
50
- }, []);
67
+ }
68
+ return result;
69
+ };
70
+ const validSlots = computed(() => {
71
+ var _a;
72
+ const defaultSlots = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || [];
73
+ return flattenSlots(defaultSlots);
51
74
  });
52
75
  const totalLen = computed(() => {
53
76
  return validSlots.value.length;
54
77
  });
55
78
  const calculateCarouselTransform = (currentIndex, activeIndex2, totalItems, itemWidth) => {
56
79
  if (totalItems <= 2) {
57
- return Math.abs((currentIndex - activeIndex2) * itemWidth);
80
+ return (currentIndex - activeIndex2) * itemWidth;
58
81
  }
59
82
  const circularIndexDiff = (currentIndex - activeIndex2 + totalItems) % totalItems;
60
83
  const effectiveIndex = circularIndexDiff > totalItems / 2 ? circularIndexDiff - totalItems : circularIndexDiff;
61
84
  return effectiveIndex * itemWidth;
62
85
  };
63
- const bodyHandle = (MySlot, currentIndex) => {
64
- return h(
65
- "div",
66
- {
67
- key: currentIndex,
68
- class: normalizeClass([
69
- "inline-block transition-all duration-700 w-full h-full absolute top-0 left-0 overflow-hidden",
70
- [activeIndex.value === currentIndex ? "" : "opacity-0"]
71
- ]),
72
- style: {
73
- transform: `translateX(${calculateCarouselTransform(
74
- currentIndex,
75
- activeIndex.value,
76
- totalLen.value,
77
- translatexNum.value
78
- )}px)`
79
- }
80
- },
81
- MySlot
82
- );
83
- };
84
- const renderCarouselItem = () => {
85
- return validSlots.value.map((MySlot, _) => {
86
- return bodyHandle(MySlot, _);
87
- });
88
- };
86
+ const renderCarouselItem = computed(() => {
87
+ return () => {
88
+ return validSlots.value.map((node, idx) => {
89
+ return h(
90
+ "div",
91
+ {
92
+ key: idx,
93
+ class: "absolute top-0 w-full h-full",
94
+ style: {
95
+ transform: `translateX(${calculateCarouselTransform(
96
+ idx,
97
+ activeIndex.value,
98
+ validSlots.value.length,
99
+ translatexNum.value
100
+ )}px)`,
101
+ transition: "transform 0.5s ease-in-out",
102
+ zIndex: Math.abs(idx - activeIndex.value) <= 1 ? 2 : 1
103
+ }
104
+ },
105
+ [node]
106
+ );
107
+ });
108
+ };
109
+ });
89
110
  const preHandle = () => {
90
111
  activeIndex.value = (totalLen.value + activeIndex.value - 1) % totalLen.value;
91
112
  animationFrame.value && cancelAnimationFrame(animationFrame.value);
@@ -97,7 +118,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
118
  const flagTime = ref(null);
98
119
  const animationFrame = ref(null);
99
120
  const startAutoplay = () => {
100
- if (totalLen.value === 1 || totalLen.value === 0) {
121
+ if (totalLen.value <= 1) {
101
122
  animationFrame.value && cancelAnimationFrame(animationFrame.value);
102
123
  return;
103
124
  }
@@ -145,7 +166,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
145
166
  onClick: nextHandle,
146
167
  position: "right"
147
168
  }),
148
- createVNode(renderCarouselItem)
169
+ (openBlock(), createBlock(resolveDynamicComponent(renderCarouselItem.value)))
149
170
  ], 36);
150
171
  };
151
172
  }
@@ -29,18 +29,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
29
  const emit = __emit;
30
30
  return (_ctx, _cache) => {
31
31
  return openBlock(), createElementBlock("label", {
32
- class: normalizeClass(["select-none text-sm inline-flex items-center rounded-md mr-1 mb-1 cursor-pointer border overflow-hidden", { "cursor-not-allowed": _ctx.disabled }])
32
+ class: normalizeClass(["select-none text-sm inline-flex items-center rounded-md mr-1 mb-1 cursor-pointer border overflow-hidden", { "cursor-not-allowed": __props.disabled }])
33
33
  }, [
34
34
  withDirectives(createElementVNode("input", {
35
35
  type: "checkbox",
36
- value: _ctx.value,
36
+ value: __props.value,
37
37
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkedState.value = $event),
38
- disabled: _ctx.disabled,
38
+ disabled: __props.disabled,
39
39
  class: "peer hidden disabled:cursor-not-allowed form-tick appearance-none h-4 w-4 border border-gray-300 rounded checked:border-transparent checked:bg-blue-600 focus:outline-none"
40
40
  }, null, 8, _hoisted_1), [
41
41
  [vModelCheckbox, checkedState.value]
42
42
  ]),
43
- createElementVNode("div", _hoisted_2, toDisplayString(_ctx.label), 1)
43
+ createElementVNode("div", _hoisted_2, toDisplayString(__props.label), 1)
44
44
  ], 2);
45
45
  };
46
46
  }
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, defineAsyncComponent, computed, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, normalizeClass, withKeys, createElementBlock, createCommentVNode, toDisplayString, withDirectives, vShow, TransitionGroup, Fragment, renderList, nextTick } from "vue";
2
- import { g as getNewArray, e as checkinputDate, f as formatDate } from "../index/index.js";
2
+ import { f as formatDate, g as getNewArray, e as checkinputDate } from "../index/index.js";
3
3
  import { g as getMonthDays, C as Calendar, A as Arrow, a as addZero } from "../calendar/calendar.js";
4
4
  import { A as ArrowPlug } from "../dateArrowplus/dateArrowplus.js";
5
5
  const _hoisted_1 = { class: "flex items-center justify-between p-3" };
@@ -37,11 +37,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
37
  "h-8": props.size === "small",
38
38
  "h-7": props.size === "mini"
39
39
  }));
40
+ const inputDisplayValue = computed(() => {
41
+ if (!props.modelValue)
42
+ return "";
43
+ return formatDate(props.modelValue);
44
+ });
40
45
  const emit = __emit;
41
46
  const dateChangeHandle = (e) => {
42
47
  const input = e.target.value;
43
- if (input === props.modelValue || input === "")
48
+ if (input === formatDate(props.modelValue)) {
49
+ return;
50
+ }
51
+ if (input === "") {
52
+ emit("update:modelValue", null);
53
+ emit("change", null);
44
54
  return;
55
+ }
45
56
  const lastValidValue = props.modelValue;
46
57
  checkinputDate(
47
58
  input,
@@ -212,6 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
212
223
  }
213
224
  let choosetime = `${Year.value}-${addZero(Month.value)}-${addZero(d.d)}`;
214
225
  emit("update:modelValue", choosetime);
226
+ emit("change", choosetime);
215
227
  hideDatePick();
216
228
  };
217
229
  return (_ctx, _cache) => {
@@ -226,14 +238,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
226
238
  reference: withCtx(() => [
227
239
  createElementVNode("div", {
228
240
  onClick: showHandle,
229
- class: "relative inline-flex h-full w-full items-center overflow-hidden rounded border border-solid"
241
+ class: "relative inline-flex h-full w-full space-x-1 items-center overflow-hidden rounded border border-solid px-1"
230
242
  }, [
231
- createVNode(Calendar, { class: "ml-1 flex-shrink-0" }),
243
+ createVNode(Calendar),
232
244
  createElementVNode("input", {
233
245
  type: "text",
234
- value: _ctx.modelValue,
235
- class: normalizeClass(["w-full px-2 outline-none text-sm text-word3", heightClass.value]),
236
- placeholder: _ctx.placeholder,
246
+ value: inputDisplayValue.value,
247
+ class: normalizeClass(["flex-1 outline-none text-sm text-word3 w-full placeholder:text-sm", heightClass.value]),
248
+ placeholder: __props.placeholder,
237
249
  onFocus: showDatePick,
238
250
  onBlur: dateChangeHandle,
239
251
  onKeydown: withKeys(dateChangeHandle, ["enter"])
@@ -337,7 +349,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
337
349
  class: "py-1.5"
338
350
  }, [
339
351
  createElementVNode("div", {
340
- class: "cursor-pointer text-word3 text-sm w-6 h-6 leading-6 hover:bg-gray-200 inline-block",
352
+ class: "cursor-pointer text-word3 text-sm w-full h-6 leading-6 hover:bg-gray-200 inline-block",
341
353
  onClick: ($event) => getMonthHandle(j)
342
354
  }, toDisplayString(j), 9, _hoisted_7)
343
355
  ]);
@@ -4,22 +4,18 @@ import { g as getMonthDays, C as Calendar, A as Arrow, a as addZero } from "../c
4
4
  import { A as ArrowPlug } from "../dateArrowplus/dateArrowplus.js";
5
5
  const _hoisted_1 = { class: "flex justify-between items-center p-3" };
6
6
  const _hoisted_2 = { class: "w-1/2 flex items-center" };
7
- const _hoisted_3 = { class: "flex-1 text-center font-medium text-sm" };
8
- const _hoisted_4 = { class: "w-10 inline-block" };
9
- const _hoisted_5 = { class: "font-medium" };
10
- const _hoisted_6 = { class: "w-1/2 flex items-center" };
11
- const _hoisted_7 = { class: "flex-1 text-center font-medium text-sm" };
12
- const _hoisted_8 = { class: "w-10 inline-block" };
13
- const _hoisted_9 = { class: "font-medium" };
14
- const _hoisted_10 = { class: "flex justify-center" };
15
- const _hoisted_11 = { class: "w-[252px] box-content pt-3 pb-1 relative overflow-hidden" };
16
- const _hoisted_12 = {
17
- class: "w-full text-center table-fixed cursor-pointer text-word3 select-none",
18
- cellpadding: "0",
19
- key: "daymode"
20
- };
21
- const _hoisted_13 = ["onMouseenter"];
22
- const _hoisted_14 = ["onClick"];
7
+ const _hoisted_3 = ["aria-label"];
8
+ const _hoisted_4 = ["aria-label"];
9
+ const _hoisted_5 = { class: "flex-1 text-center font-medium text-sm" };
10
+ const _hoisted_6 = { class: "w-10 inline-block" };
11
+ const _hoisted_7 = { class: "font-medium" };
12
+ const _hoisted_8 = { class: "w-1/2 flex items-center" };
13
+ const _hoisted_9 = { class: "flex-1 text-center font-medium text-sm" };
14
+ const _hoisted_10 = { class: "w-10 inline-block" };
15
+ const _hoisted_11 = { class: "font-medium" };
16
+ const _hoisted_12 = ["aria-label"];
17
+ const _hoisted_13 = ["aria-label"];
18
+ const _hoisted_14 = { class: "flex justify-center" };
23
19
  const _hoisted_15 = { class: "w-[252px] box-content pt-3 pb-1 relative overflow-hidden" };
24
20
  const _hoisted_16 = {
25
21
  class: "w-full text-center table-fixed cursor-pointer text-word3 select-none",
@@ -28,18 +24,29 @@ const _hoisted_16 = {
28
24
  };
29
25
  const _hoisted_17 = ["onMouseenter"];
30
26
  const _hoisted_18 = ["onClick"];
31
- const _hoisted_19 = ["value", "placeholder"];
32
- const _hoisted_20 = ["value", "placeholder"];
27
+ const _hoisted_19 = { class: "w-[252px] box-content pt-3 pb-1 relative overflow-hidden" };
28
+ const _hoisted_20 = {
29
+ class: "w-full text-center table-fixed cursor-pointer text-word3 select-none",
30
+ cellpadding: "0",
31
+ key: "daymode"
32
+ };
33
+ const _hoisted_21 = ["onMouseenter"];
34
+ const _hoisted_22 = ["onClick"];
35
+ const _hoisted_23 = ["value", "placeholder"];
36
+ const _hoisted_24 = { class: "text-sm text-word3" };
37
+ const _hoisted_25 = ["value", "placeholder"];
33
38
  const _sfc_main = /* @__PURE__ */ defineComponent({
34
39
  __name: "datepickerRange",
35
40
  props: {
36
41
  modelValue: {},
37
- startPlaceholder: {},
38
- endPlaceholder: {},
42
+ startPlaceholder: { default: "开始日期" },
43
+ endPlaceholder: { default: "结束日期" },
39
44
  disabledDate: {},
40
- size: { default: "default" }
45
+ size: { default: "default" },
46
+ separetor: { default: "-" },
47
+ width: { default: "512" }
41
48
  },
42
- emits: ["update:modelValue"],
49
+ emits: ["update:modelValue", "change"],
43
50
  setup(__props, { emit: __emit }) {
44
51
  const Pop = defineAsyncComponent(() => import("../popover/popover.js"));
45
52
  const emit = __emit;
@@ -50,17 +57,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
57
  "h-8": props.size === "small",
51
58
  "h-7": props.size === "mini"
52
59
  }));
60
+ const inputOneDisplayValue = computed(() => {
61
+ if (!props.modelValue[0])
62
+ return "";
63
+ return formatDate(props.modelValue[0]);
64
+ });
65
+ const inputTwoDisplayValue = computed(() => {
66
+ if (!props.modelValue[1])
67
+ return "";
68
+ return formatDate(props.modelValue[1]);
69
+ });
53
70
  const deleteDateHandle = () => {
54
71
  emit("update:modelValue", [null, null]);
72
+ emit("change", [null, null]);
55
73
  };
56
74
  const date1ChangeHandle = (e) => {
57
75
  const input = e.target.value;
58
- if (input === props.modelValue[0] || input === "")
76
+ if (input === formatDate(props.modelValue[0])) {
59
77
  return;
78
+ }
79
+ if (input === "") {
80
+ emit("update:modelValue", [null, props.modelValue[1]]);
81
+ emit("change", [null, props.modelValue[1]]);
82
+ return;
83
+ }
60
84
  checkinputDate(
61
85
  input,
62
86
  (res) => {
63
- emit("update:modelValue", [res, date2.value]);
87
+ emit("update:modelValue", [res, props.modelValue[1]]);
88
+ emit("change", [res, props.modelValue[1]]);
64
89
  },
65
90
  () => {
66
91
  nextTick(() => {
@@ -73,17 +98,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
73
98
  };
74
99
  const date2ChangeHandle = (e) => {
75
100
  const input = e.target.value;
76
- if (input === props.modelValue[1] || input === "")
101
+ if (input === formatDate(props.modelValue[1])) {
102
+ return;
103
+ }
104
+ if (input === "") {
105
+ emit("update:modelValue", [props.modelValue[0], null]);
106
+ emit("change", [props.modelValue[0], null]);
77
107
  return;
108
+ }
78
109
  checkinputDate(
79
110
  input,
80
111
  (res) => {
81
- emit("update:modelValue", [date1.value, res]);
112
+ emit("update:modelValue", [props.modelValue[0], res]);
113
+ emit("change", [props.modelValue[0], res]);
82
114
  },
83
115
  () => {
84
116
  nextTick(() => {
85
117
  if (e.target) {
86
- e.target.value = props.modelValue[0] ? formatDate(props.modelValue[1]) : "";
118
+ e.target.value = props.modelValue[1] ? formatDate(props.modelValue[1]) : "";
87
119
  }
88
120
  });
89
121
  }
@@ -100,7 +132,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
100
132
  return formatDate(props.modelValue[0]);
101
133
  }
102
134
  });
103
- const inputOneShowValue = computed(() => props.modelValue[0]);
104
135
  const date2 = computed(() => {
105
136
  if (secondDayisHover.value) {
106
137
  if (temDateArr.value[0] && temDateArr.value[1] && new Date(temDateArr.value[0]).getTime() > new Date(temDateArr.value[1]).getTime()) {
@@ -112,7 +143,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
112
143
  return formatDate(props.modelValue[1]);
113
144
  }
114
145
  });
115
- const inputTwoShowValue = computed(() => props.modelValue[1]);
116
146
  const showD = ref(false);
117
147
  const hideDatePick = () => {
118
148
  showD.value = false;
@@ -263,6 +293,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
263
293
  }
264
294
  secondDayisHover.value = false;
265
295
  emit("update:modelValue", temDateArr.value);
296
+ emit("change", temDateArr.value);
266
297
  hideDatePick();
267
298
  }
268
299
  };
@@ -319,24 +350,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
319
350
  reference: withCtx(() => [
320
351
  createElementVNode("div", {
321
352
  onClick: showPopHandle,
322
- class: "inline-flex relative h-full w-full items-center overflow-hidden rounded border border-solid text-word3"
353
+ class: "inline-flex relative space-x-1 px-1 h-full w-full items-center overflow-hidden rounded border border-solid text-word3"
323
354
  }, [
324
- createVNode(Calendar, { class: "ml-1 flex-shrink-0" }),
355
+ createVNode(Calendar),
325
356
  createElementVNode("input", {
326
357
  type: "text",
327
- value: inputOneShowValue.value,
328
- placeholder: _ctx.startPlaceholder,
329
- class: normalizeClass(["text-sm outline-none flex-auto px-2 w-1/2 text-center", heightClass.value]),
358
+ value: inputOneDisplayValue.value,
359
+ placeholder: __props.startPlaceholder,
360
+ class: normalizeClass(["text-sm outline-none flex-1 w-full text-center appearance-none placeholder:text-sm", heightClass.value]),
330
361
  onBlur: date1ChangeHandle
331
- }, null, 42, _hoisted_19),
332
- _cache[3] || (_cache[3] = createElementVNode("span", { class: "mx-2 text-sm" }, "至", -1)),
362
+ }, null, 42, _hoisted_23),
363
+ createElementVNode("span", _hoisted_24, toDisplayString(__props.separetor), 1),
333
364
  createElementVNode("input", {
334
365
  type: "text",
335
- value: inputTwoShowValue.value,
336
- placeholder: _ctx.endPlaceholder,
337
- class: normalizeClass(["text-sm outline-none flex-auto px-2 w-1/2 text-center", heightClass.value]),
366
+ value: inputTwoDisplayValue.value,
367
+ placeholder: __props.endPlaceholder,
368
+ class: normalizeClass(["text-sm outline-none flex-1 w-full text-center appearance-none placeholder:text-sm", heightClass.value]),
338
369
  onBlur: date2ChangeHandle
339
- }, null, 42, _hoisted_20)
370
+ }, null, 42, _hoisted_25)
340
371
  ])
341
372
  ]),
342
373
  default: withCtx(() => [
@@ -345,52 +376,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
345
376
  createElementVNode("button", {
346
377
  type: "button",
347
378
  class: "w-4 h-4 appearance-none",
348
- onClick: YearPreHandle
379
+ onClick: YearPreHandle,
380
+ "aria-label": `上一年,当前: ${YearOne.value}年`
349
381
  }, [
350
382
  createVNode(ArrowPlug, { class: "h-4 w-4" })
351
- ]),
383
+ ], 8, _hoisted_3),
352
384
  createElementVNode("button", {
353
385
  type: "button",
354
386
  class: "w-4 h-4 ml-1 appearance-none",
355
- onClick: MonthPreHandle
387
+ onClick: MonthPreHandle,
388
+ "aria-label": `上一月,当前: ${YearOne.value}年${MonthOne.value}月`
356
389
  }, [
357
390
  createVNode(Arrow, { class: "h-4 w-4 rotate-180 transform" })
358
- ]),
359
- createElementVNode("div", _hoisted_3, [
391
+ ], 8, _hoisted_4),
392
+ createElementVNode("div", _hoisted_5, [
360
393
  createElementVNode("span", null, toDisplayString(YearOne.value) + "年", 1),
361
- createElementVNode("div", _hoisted_4, [
362
- createElementVNode("span", _hoisted_5, toDisplayString(MonthOne.value), 1),
363
- _cache[1] || (_cache[1] = createTextVNode(" 月 "))
394
+ createElementVNode("div", _hoisted_6, [
395
+ createElementVNode("span", _hoisted_7, toDisplayString(MonthOne.value), 1),
396
+ _cache[1] || (_cache[1] = createTextVNode(" 月 ", -1))
364
397
  ])
365
398
  ])
366
399
  ]),
367
- createElementVNode("div", _hoisted_6, [
368
- createElementVNode("div", _hoisted_7, [
400
+ createElementVNode("div", _hoisted_8, [
401
+ createElementVNode("div", _hoisted_9, [
369
402
  createElementVNode("span", null, toDisplayString(YearTwo.value) + "年", 1),
370
- createElementVNode("div", _hoisted_8, [
371
- createElementVNode("span", _hoisted_9, toDisplayString(MonthTwo.value), 1),
372
- _cache[2] || (_cache[2] = createTextVNode(" 月 "))
403
+ createElementVNode("div", _hoisted_10, [
404
+ createElementVNode("span", _hoisted_11, toDisplayString(MonthTwo.value), 1),
405
+ _cache[2] || (_cache[2] = createTextVNode(" 月 ", -1))
373
406
  ])
374
407
  ]),
375
408
  createElementVNode("button", {
376
409
  type: "button",
377
410
  class: "w-4 h-4 mr-1 appearance-none",
378
- onClick: MonthNextHandle
411
+ onClick: MonthNextHandle,
412
+ "aria-label": `下一月,当前: ${YearTwo.value}年${MonthTwo.value}月`
379
413
  }, [
380
414
  createVNode(Arrow, { class: "h-4 w-4" })
381
- ]),
415
+ ], 8, _hoisted_12),
382
416
  createElementVNode("button", {
383
417
  type: "button",
384
418
  class: "w-4 h-4 appearance-none",
385
- onClick: YearNextHandle
419
+ onClick: YearNextHandle,
420
+ "aria-label": `下一年,当前: ${YearTwo.value}年`
386
421
  }, [
387
422
  createVNode(ArrowPlug, { class: "h-4 w-4 rotate-180 transform" })
388
- ])
423
+ ], 8, _hoisted_13)
389
424
  ])
390
425
  ]),
391
- createElementVNode("div", _hoisted_10, [
392
- createElementVNode("div", _hoisted_11, [
393
- createElementVNode("table", _hoisted_12, [
426
+ createElementVNode("div", _hoisted_14, [
427
+ createElementVNode("div", _hoisted_15, [
428
+ createElementVNode("table", _hoisted_16, [
394
429
  createElementVNode("thead", null, [
395
430
  createElementVNode("tr", null, [
396
431
  (openBlock(), createElementBlock(Fragment, null, renderList(WeekList, (i) => {
@@ -427,16 +462,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
427
462
  "ml-0.5": j.isChoosed2Day && !j.isChoosed1Day
428
463
  }])
429
464
  }, toDisplayString(j.d), 3)
430
- ], 10, _hoisted_14)
431
- ], 40, _hoisted_13);
465
+ ], 10, _hoisted_18)
466
+ ], 40, _hoisted_17);
432
467
  }), 128))
433
468
  ]);
434
469
  }), 128))
435
470
  ])
436
471
  ])
437
472
  ]),
438
- createElementVNode("div", _hoisted_15, [
439
- createElementVNode("table", _hoisted_16, [
473
+ createElementVNode("div", _hoisted_19, [
474
+ createElementVNode("table", _hoisted_20, [
440
475
  createElementVNode("thead", null, [
441
476
  createElementVNode("tr", null, [
442
477
  (openBlock(), createElementBlock(Fragment, null, renderList(WeekList, (i) => {
@@ -473,8 +508,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
473
508
  "ml-0.5": j.isChoosed2Day && !j.isChoosed1Day
474
509
  }])
475
510
  }, toDisplayString(j.d), 3)
476
- ], 10, _hoisted_18)
477
- ], 40, _hoisted_17);
511
+ ], 10, _hoisted_22)
512
+ ], 40, _hoisted_21);
478
513
  }), 128))
479
514
  ]);
480
515
  }), 128))
@@ -482,15 +517,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
482
517
  ])
483
518
  ])
484
519
  ]),
485
- createElementVNode("div", { class: "flex justify-end space-x-2 text-sm px-3 py-1" }, [
520
+ createElementVNode("div", { class: "flex justify-end space-x-2 text-sm px-3 py-1 border-t border-gray-100" }, [
486
521
  createElementVNode("button", {
487
522
  type: "button",
488
- class: "text-word3 hover:text-blue-500 active:to-blue-700",
523
+ class: "text-word3 hover:text-blue-500 active:text-blue-700 px-2 py-1 rounded",
489
524
  onClick: deleteDateHandle
490
525
  }, " 清空 "),
491
526
  createElementVNode("button", {
492
527
  type: "button",
493
- class: "text-word3 hover:text-blue-500 active:to-blue-700",
528
+ class: "text-word3 hover:text-blue-500 active:text-blue-700 px-2 py-1 rounded",
494
529
  onClick: hideDatePick
495
530
  }, " 确定 ")
496
531
  ])
@@ -8,7 +8,7 @@ const _hoisted_1 = {
8
8
  "p-id": "669"
9
9
  };
10
10
  function _sfc_render(_ctx, _cache) {
11
- return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
11
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
12
12
  createElementVNode("path", {
13
13
  d: "M842.666667 864c-8.533333 0-14.933333-2.133333-21.333334-8.533333l-341.333333-309.333334c-6.4-6.4-10.666667-14.933333-10.666667-23.466666 0-8.533333 4.266667-17.066667 10.666667-23.466667l341.333333-309.333333c12.8-12.8 34.133333-10.666667 44.8 2.133333 12.8 12.8 10.666667 34.133333-2.133333 44.8L548.266667 522.666667l315.733333 285.866666c12.8 10.666667 14.933333 32 2.133333 44.8-6.4 6.4-14.933333 10.666667-23.466666 10.666667z",
14
14
  fill: "#666666"
@@ -17,7 +17,7 @@ function _sfc_render(_ctx, _cache) {
17
17
  d: "M512 864c-8.533333 0-14.933333-2.133333-21.333333-8.533333L149.333333 546.133333c-6.4-6.4-10.666667-14.933333-10.666666-23.466666 0-8.533333 4.266667-17.066667 10.666666-23.466667L490.666667 189.866667c12.8-12.8 34.133333-10.666667 44.8 2.133333 12.8 12.8 10.666667 34.133333-2.133334 44.8L217.6 522.666667 533.333333 808.533333c12.8 12.8 14.933333 32 2.133334 44.8-6.4 6.4-14.933333 10.666667-23.466667 10.666667z",
18
18
  fill: "#666666"
19
19
  }, null, -1)
20
- ]));
20
+ ])]);
21
21
  }
22
22
  const ArrowPlug = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
23
23
  export {
@@ -9,9 +9,9 @@ const _hoisted_1 = {
9
9
  "aria-hidden": "true"
10
10
  };
11
11
  function _sfc_render(_ctx, _cache) {
12
- return openBlock(), createElementBlock("svg", _hoisted_1, _cache[0] || (_cache[0] = [
12
+ return openBlock(), createElementBlock("svg", _hoisted_1, [..._cache[0] || (_cache[0] = [
13
13
  createElementVNode("path", { d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" }, null, -1)
14
- ]));
14
+ ])]);
15
15
  }
16
16
  const delIcon = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
17
17
  export {