@qynpm/ui 1.0.23 → 1.0.25

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 (136) hide show
  1. package/README.md +194 -20
  2. package/dist/index.cjs +16 -6
  3. package/dist/index.mjs +51 -34
  4. package/dist/qy-action-bar/index.cjs +1 -1
  5. package/dist/qy-action-bar/index.mjs +1 -1
  6. package/dist/qy-button/index.cjs +1 -1
  7. package/dist/qy-button/index.mjs +1 -1
  8. package/dist/qy-checkbox/index.cjs +1 -1
  9. package/dist/qy-checkbox/index.mjs +4 -3
  10. package/dist/qy-checkbox-group/index.cjs +1 -0
  11. package/dist/qy-checkbox-group/index.mjs +7 -0
  12. package/dist/qy-date-picker/index.cjs +1 -1
  13. package/dist/qy-date-picker/index.mjs +4 -3
  14. package/dist/qy-dialog/index.cjs +1 -1
  15. package/dist/qy-dialog/index.mjs +2 -2
  16. package/dist/qy-dropdown/index.cjs +1 -1
  17. package/dist/qy-dropdown/index.mjs +1 -1
  18. package/dist/qy-file-picker/index.cjs +1 -0
  19. package/dist/qy-file-picker/index.mjs +7 -0
  20. package/dist/qy-form-section/index.cjs +1 -1
  21. package/dist/qy-form-section/index.mjs +1 -1
  22. package/dist/qy-image/index.cjs +1 -1
  23. package/dist/qy-image/index.mjs +1 -1
  24. package/dist/qy-image-upload/index.cjs +1 -1
  25. package/dist/qy-image-upload/index.mjs +1 -1
  26. package/dist/qy-input/index.cjs +2 -2
  27. package/dist/qy-input/index.mjs +6 -3
  28. package/dist/qy-input-number/index.cjs +1 -1
  29. package/dist/qy-input-number/index.mjs +5 -3
  30. package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
  31. package/dist/qy-legacy-selection-dialog/index.mjs +2 -2
  32. package/dist/qy-menu-actions/index.cjs +1 -1
  33. package/dist/qy-menu-actions/index.mjs +1 -1
  34. package/dist/qy-money-input/index.cjs +1 -1
  35. package/dist/qy-money-input/index.mjs +2 -2
  36. package/dist/qy-popover/index.cjs +2 -0
  37. package/dist/qy-popover/index.mjs +8 -0
  38. package/dist/qy-radio/index.cjs +1 -0
  39. package/dist/qy-radio/index.mjs +7 -0
  40. package/dist/qy-radio-group/index.cjs +1 -1
  41. package/dist/qy-radio-group/index.mjs +5 -2
  42. package/dist/qy-record-quote-search/index.cjs +1 -1
  43. package/dist/qy-record-quote-search/index.mjs +1 -1
  44. package/dist/qy-remark-image/index.cjs +1 -1
  45. package/dist/qy-remark-image/index.mjs +2 -2
  46. package/dist/qy-remote-select/index.cjs +1 -1
  47. package/dist/qy-remote-select/index.mjs +1 -1
  48. package/dist/qy-search-input/index.cjs +1 -1
  49. package/dist/qy-search-input/index.mjs +2 -2
  50. package/dist/qy-select/index.cjs +1 -1
  51. package/dist/qy-select/index.mjs +4 -3
  52. package/dist/qy-selection-dialog/index.cjs +1 -1
  53. package/dist/qy-selection-dialog/index.mjs +1 -1
  54. package/dist/qy-switch/index.cjs +1 -0
  55. package/dist/qy-switch/index.mjs +7 -0
  56. package/dist/qy-table-column-settings/index.cjs +1 -1
  57. package/dist/qy-table-column-settings/index.mjs +1 -1
  58. package/dist/qy-tag/index.cjs +1 -0
  59. package/dist/qy-tag/index.mjs +7 -0
  60. package/dist/qy-tooltip/index.cjs +2 -0
  61. package/dist/qy-tooltip/index.mjs +8 -0
  62. package/dist/qy-upload/index.cjs +1 -1
  63. package/dist/qy-upload/index.mjs +1 -1
  64. package/dist/shared/index-528z_q7d.cjs +1 -0
  65. package/dist/shared/index-9v7CIwzO.cjs +1 -0
  66. package/dist/shared/{index-D7lMppIb.mjs → index-B7uyWUhS.mjs} +63 -63
  67. package/dist/shared/index-BTPk2zzq.cjs +1 -0
  68. package/dist/shared/index-BcCZMWAj.cjs +1 -0
  69. package/dist/shared/index-C1YwUATr.cjs +1 -0
  70. package/dist/shared/index-C6jcSQSF.mjs +129 -0
  71. package/dist/shared/index-CbCpXtYr.mjs +68 -0
  72. package/dist/shared/index-Cl5cuyVG.mjs +54 -0
  73. package/dist/shared/index-CuusBxhR.cjs +1 -0
  74. package/dist/shared/{index-BXlQSIWX.mjs → index-DZroPZ8B.mjs} +8 -8
  75. package/dist/shared/{index-DyK6vf5h.cjs → index-DmhpD4Cp.cjs} +1 -1
  76. package/dist/shared/index-DrJuMzr1.mjs +90 -0
  77. package/dist/shared/index-Du2IqeCI.mjs +149 -0
  78. package/dist/shared/{index-ZLoAI88M.mjs → index-DvQdcj7u.mjs} +1327 -1389
  79. package/dist/shared/index-EGnVOaC9.cjs +1 -0
  80. package/dist/shared/index-QQkDJv3q.cjs +1 -0
  81. package/dist/shared/index-R5B1rjXo.mjs +225 -0
  82. package/dist/shared/index-yf2Ijz_G.mjs +72 -0
  83. package/dist/shared/index-zJN0M-bx.cjs +1 -0
  84. package/dist/shared/index.vue_vue_type_script_setup_true_lang-C3F8M9sD.cjs +1 -0
  85. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKZHI_y-.mjs +106 -0
  86. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CsKjCWIN.cjs +1 -0
  87. package/dist/shared/index.vue_vue_type_script_setup_true_lang-N12Nn2uu.mjs +61 -0
  88. package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +1 -0
  89. package/dist/shared/index.vue_vue_type_style_index_0_lang-BZQLyvw8.cjs +1 -0
  90. package/dist/shared/index.vue_vue_type_style_index_0_lang-BtbAft4t.cjs +1 -0
  91. package/dist/shared/index.vue_vue_type_style_index_0_lang-CJhIFeBC.mjs +166 -0
  92. package/dist/shared/index.vue_vue_type_style_index_0_lang-DSur831A.mjs +68 -0
  93. package/dist/shared/index.vue_vue_type_style_index_0_lang-DVqGYfD9.mjs +132 -0
  94. package/dist/shared/index.vue_vue_type_style_index_0_lang-Dm1r1WBK.cjs +1 -0
  95. package/dist/shared/index.vue_vue_type_style_index_0_lang-Q2gFF0PP.cjs +1 -0
  96. package/dist/shared/index.vue_vue_type_style_index_0_lang-aqtfjdVm.mjs +140 -0
  97. package/dist/shared/index.vue_vue_type_style_index_0_lang-ztD-It-2.mjs +121 -0
  98. package/index.d.ts +145 -7
  99. package/package.json +43 -1
  100. package/qy-autocomplete/index.d.ts +5 -5
  101. package/qy-checkbox/index.d.ts +45 -5
  102. package/qy-checkbox-group/index.d.ts +48 -0
  103. package/qy-date-picker/index.d.ts +137 -2
  104. package/qy-file-picker/index.d.ts +49 -0
  105. package/qy-image/index.d.ts +28 -28
  106. package/qy-image-preview/index.d.ts +20 -20
  107. package/qy-input/index.d.ts +46 -1
  108. package/qy-input-number/index.d.ts +41 -1
  109. package/qy-menu-actions/index.d.ts +29 -29
  110. package/qy-popover/index.d.ts +63 -0
  111. package/qy-radio/index.d.ts +44 -0
  112. package/qy-radio-group/index.d.ts +57 -9
  113. package/qy-select/index.d.ts +64 -2
  114. package/qy-switch/index.d.ts +46 -0
  115. package/qy-table-column-settings/index.d.ts +18 -18
  116. package/qy-tag/index.d.ts +44 -0
  117. package/qy-tooltip/index.d.ts +54 -0
  118. package/qy-tree-select/index.d.ts +5 -5
  119. package/dist/shared/index-B3U7dqMt.cjs +0 -1
  120. package/dist/shared/index-BbpD7hM0.cjs +0 -1
  121. package/dist/shared/index-D3l7tLgw.cjs +0 -1
  122. package/dist/shared/index-NCpeoBUZ.mjs +0 -153
  123. package/dist/shared/index.vue_vue_type_script_setup_true_lang-BJakDlgd.mjs +0 -70
  124. package/dist/shared/index.vue_vue_type_script_setup_true_lang-CelW13DE.cjs +0 -1
  125. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DA1Nh7U1.mjs +0 -130
  126. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DEpXmMj5.mjs +0 -162
  127. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DNEVwqm7.cjs +0 -1
  128. package/dist/shared/index.vue_vue_type_script_setup_true_lang-DfKTEci_.cjs +0 -1
  129. package/dist/shared/index.vue_vue_type_script_setup_true_lang-gTkP1LWg.mjs +0 -61
  130. package/dist/shared/index.vue_vue_type_script_setup_true_lang-svvSFv2K.cjs +0 -1
  131. package/dist/shared/index.vue_vue_type_style_index_0_lang-B_A4Nq6v.cjs +0 -1
  132. package/dist/shared/index.vue_vue_type_style_index_0_lang-DKFiK2fQ.mjs +0 -152
  133. /package/dist/shared/{index-CagHZ25z.mjs → index-BYLXkIxS.mjs} +0 -0
  134. /package/dist/shared/{index-CRZsiNVW.cjs → index-C1p86ezL.cjs} +0 -0
  135. /package/dist/shared/{index-BO5aWk3f.cjs → index-ClUqUsAv.cjs} +0 -0
  136. /package/dist/shared/{index-CSxCewXP.mjs → index-Cy_Glkc-.mjs} +0 -0
@@ -0,0 +1,166 @@
1
+ import { defineComponent as S, useAttrs as A, ref as M, computed as q, openBlock as H, createBlock as U, unref as h, mergeProps as j, withCtx as o, renderSlot as r, normalizeProps as d, guardReactiveProps as i } from "vue";
2
+ import { ElDatePicker as w } from "element-plus";
3
+ const Z = /* @__PURE__ */ S({
4
+ name: "QyDatePicker",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ modelValue: { default: void 0 },
9
+ type: { default: "date" },
10
+ placeholder: { default: "请选择日期" },
11
+ startPlaceholder: { default: "开始时间" },
12
+ endPlaceholder: { default: "结束时间" },
13
+ rangeSeparator: { default: "-" },
14
+ format: { default: void 0 },
15
+ valueFormat: { default: void 0 },
16
+ defaultTime: { default: void 0 },
17
+ disabledDate: { type: Function, default: void 0 },
18
+ shortcuts: { default: void 0 },
19
+ clearable: { type: Boolean, default: !0 },
20
+ disabled: { type: Boolean, default: !1 },
21
+ readonly: { type: Boolean },
22
+ size: { default: void 0 },
23
+ teleported: { type: Boolean, default: !0 },
24
+ appendTo: { default: "body" },
25
+ popperClass: { default: "" },
26
+ normalizeRangeEndTime: { type: Boolean, default: !1 }
27
+ },
28
+ emits: ["update:modelValue", "change", "clear", "calendar-change", "panel-change", "visible-change", "focus", "blur"],
29
+ setup(n, { expose: p, emit: m }) {
30
+ const s = n, l = m, g = A(), u = M(null), y = q(
31
+ () => ["qy-date-picker__popper", s.popperClass].filter(Boolean).join(" ")
32
+ );
33
+ function b(e) {
34
+ return Array.isArray(e);
35
+ }
36
+ function C(e) {
37
+ if (e.getHours() !== 0 || e.getMinutes() !== 0 || e.getSeconds() !== 0 || e.getMilliseconds() !== 0)
38
+ return e;
39
+ const a = new Date(e);
40
+ return a.setHours(23, 59, 59, 0), a;
41
+ }
42
+ function P(e) {
43
+ const a = e.match(
44
+ /(T| )00:00:00(\.000)?(Z|[+-]\d{2}:?\d{2})?$/
45
+ );
46
+ return a ? e.replace(
47
+ a[0],
48
+ `${a[1]}23:59:59${a[2] ?? ""}${a[3] ?? ""}`
49
+ ) : e;
50
+ }
51
+ function c(e) {
52
+ if (!s.normalizeRangeEndTime || !b(e) || e.length < 2)
53
+ return e;
54
+ const a = e[1];
55
+ let t = a;
56
+ if (a instanceof Date ? t = C(a) : typeof a == "string" && (t = P(a)), t === a)
57
+ return e;
58
+ const f = [...e];
59
+ return f[1] = t, f;
60
+ }
61
+ function v(e) {
62
+ l("update:modelValue", c(e));
63
+ }
64
+ function V(e) {
65
+ l("change", c(e));
66
+ }
67
+ function z() {
68
+ l("clear");
69
+ }
70
+ function B(e) {
71
+ l("calendar-change", e);
72
+ }
73
+ function $(e, a, t) {
74
+ if (t === void 0) {
75
+ l("panel-change", e, a);
76
+ return;
77
+ }
78
+ l("panel-change", e, a, t);
79
+ }
80
+ function k(e) {
81
+ l("visible-change", e);
82
+ }
83
+ function D(e) {
84
+ l("focus", e);
85
+ }
86
+ function R(e) {
87
+ l("blur", e);
88
+ }
89
+ function T() {
90
+ var e, a;
91
+ (a = (e = u.value) == null ? void 0 : e.focus) == null || a.call(e);
92
+ }
93
+ function E() {
94
+ var e, a;
95
+ (a = (e = u.value) == null ? void 0 : e.blur) == null || a.call(e);
96
+ }
97
+ function x() {
98
+ var e, a;
99
+ (a = (e = u.value) == null ? void 0 : e.handleOpen) == null || a.call(e);
100
+ }
101
+ function F() {
102
+ var e, a;
103
+ (a = (e = u.value) == null ? void 0 : e.handleClose) == null || a.call(e);
104
+ }
105
+ return p({
106
+ focus: T,
107
+ blur: E,
108
+ open: x,
109
+ close: F
110
+ }), (e, a) => (H(), U(h(w), j({
111
+ ref_key: "datePickerRef",
112
+ ref: u,
113
+ class: "qy-date-picker"
114
+ }, h(g), {
115
+ "model-value": n.modelValue,
116
+ type: n.type,
117
+ placeholder: n.placeholder,
118
+ "start-placeholder": n.startPlaceholder,
119
+ "end-placeholder": n.endPlaceholder,
120
+ "range-separator": n.rangeSeparator,
121
+ format: n.format,
122
+ "value-format": n.valueFormat,
123
+ "default-time": n.defaultTime,
124
+ "disabled-date": n.disabledDate,
125
+ shortcuts: n.shortcuts,
126
+ clearable: n.clearable,
127
+ disabled: n.disabled,
128
+ readonly: n.readonly,
129
+ size: n.size,
130
+ teleported: n.teleported,
131
+ "append-to": n.appendTo,
132
+ "popper-class": y.value,
133
+ "onUpdate:modelValue": v,
134
+ onChange: V,
135
+ onClear: z,
136
+ onCalendarChange: B,
137
+ onPanelChange: $,
138
+ onVisibleChange: k,
139
+ onFocus: D,
140
+ onBlur: R
141
+ }), {
142
+ default: o((t) => [
143
+ r(e.$slots, "default", d(i(t)))
144
+ ]),
145
+ "range-separator": o((t) => [
146
+ r(e.$slots, "range-separator", d(i(t)))
147
+ ]),
148
+ "prev-month": o((t) => [
149
+ r(e.$slots, "prev-month", d(i(t)))
150
+ ]),
151
+ "next-month": o((t) => [
152
+ r(e.$slots, "next-month", d(i(t)))
153
+ ]),
154
+ "prev-year": o((t) => [
155
+ r(e.$slots, "prev-year", d(i(t)))
156
+ ]),
157
+ "next-year": o((t) => [
158
+ r(e.$slots, "next-year", d(i(t)))
159
+ ]),
160
+ _: 3
161
+ }, 16, ["model-value", "type", "placeholder", "start-placeholder", "end-placeholder", "range-separator", "format", "value-format", "default-time", "disabled-date", "shortcuts", "clearable", "disabled", "readonly", "size", "teleported", "append-to", "popper-class"]));
162
+ }
163
+ });
164
+ export {
165
+ Z as _
166
+ };
@@ -0,0 +1,68 @@
1
+ import { defineComponent as m, computed as n, ref as h, onBeforeUnmount as p, watch as y, openBlock as b, createBlock as w, unref as x, withCtx as f, renderSlot as i, createTextVNode as v, toDisplayString as D } from "vue";
2
+ import { ElTooltip as W } from "element-plus";
3
+ const C = /* @__PURE__ */ m({
4
+ name: "QyTooltip",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ content: { default: "" },
9
+ placement: { default: "top" },
10
+ effect: { default: "dark" },
11
+ disabled: { type: Boolean, default: !1 },
12
+ showDelay: { default: 0 },
13
+ hideDelay: { default: 200 },
14
+ offset: { default: 12 },
15
+ maxWidth: { default: 320 }
16
+ },
17
+ emits: ["open", "close"],
18
+ setup(e, { emit: d }) {
19
+ const s = d, c = n(
20
+ () => typeof e.maxWidth == "number" ? `${e.maxWidth}px` : e.maxWidth
21
+ ), r = n(() => ({
22
+ "--qy-tooltip-max-width": c.value
23
+ })), a = h(!1);
24
+ let l = !1;
25
+ p(() => {
26
+ l = !0;
27
+ });
28
+ function o(t) {
29
+ l || t === a.value || (a.value = t, s(t ? "open" : "close"));
30
+ }
31
+ function u(t) {
32
+ o(t);
33
+ }
34
+ return y(
35
+ () => e.disabled,
36
+ (t) => {
37
+ t && o(!1);
38
+ }
39
+ ), (t, g) => (b(), w(x(W), {
40
+ content: e.content,
41
+ placement: e.placement,
42
+ effect: e.effect,
43
+ disabled: e.disabled,
44
+ "show-after": e.showDelay,
45
+ "hide-after": e.hideDelay,
46
+ offset: e.offset,
47
+ trigger: ["hover", "focus"],
48
+ enterable: !1,
49
+ "raw-content": !1,
50
+ "popper-class": "qy-tooltip-popper",
51
+ "popper-style": r.value,
52
+ "onUpdate:visible": u
53
+ }, {
54
+ content: f(() => [
55
+ i(t.$slots, "content", {}, () => [
56
+ v(D(e.content), 1)
57
+ ])
58
+ ]),
59
+ default: f(() => [
60
+ i(t.$slots, "default")
61
+ ]),
62
+ _: 3
63
+ }, 8, ["content", "placement", "effect", "disabled", "show-after", "hide-after", "offset", "popper-style"]));
64
+ }
65
+ });
66
+ export {
67
+ C as _
68
+ };
@@ -0,0 +1,132 @@
1
+ import { defineComponent as p, useAttrs as x, computed as B, ref as g, openBlock as $, createBlock as k, unref as C, mergeProps as S, createSlots as V, withCtx as l, renderSlot as i } from "vue";
2
+ import { ElInputNumber as z } from "element-plus";
3
+ const N = /* @__PURE__ */ p({
4
+ name: "QyInputNumber",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ id: {},
9
+ step: { default: 1 },
10
+ stepStrictly: { type: Boolean, default: !1 },
11
+ max: { default: void 0 },
12
+ min: { default: void 0 },
13
+ readonly: { type: Boolean, default: !1 },
14
+ disabled: { type: Boolean, default: !1 },
15
+ controls: { type: Boolean, default: !0 },
16
+ name: {},
17
+ placeholder: { default: "请输入数字" },
18
+ precision: { default: void 0 },
19
+ validateEvent: { type: Boolean },
20
+ ariaLabel: {},
21
+ inputmode: {},
22
+ align: {},
23
+ disabledScientific: { type: Boolean },
24
+ formatter: {},
25
+ parser: {},
26
+ tabindex: {},
27
+ modelValue: { default: void 0 },
28
+ valueOnClear: { default: null },
29
+ controlsPosition: { default: "" },
30
+ size: { default: void 0 }
31
+ },
32
+ emits: ["update:modelValue", "input", "change", "focus", "blur"],
33
+ setup(a, { expose: d, emit: s }) {
34
+ const n = s, u = x(), r = B(
35
+ () => Object.fromEntries(
36
+ Object.entries(u).filter(([e]) => !e.startsWith("on"))
37
+ )
38
+ ), o = g(null);
39
+ function c(e) {
40
+ n("update:modelValue", e);
41
+ }
42
+ function f(e) {
43
+ n("input", e);
44
+ }
45
+ function m(e, t) {
46
+ n("change", e, t);
47
+ }
48
+ function b(e) {
49
+ n("focus", e);
50
+ }
51
+ function v(e) {
52
+ n("blur", e);
53
+ }
54
+ function y() {
55
+ var e, t;
56
+ (t = (e = o.value) == null ? void 0 : e.focus) == null || t.call(e);
57
+ }
58
+ function h() {
59
+ var e, t;
60
+ (t = (e = o.value) == null ? void 0 : e.blur) == null || t.call(e);
61
+ }
62
+ return d({
63
+ focus: y,
64
+ blur: h
65
+ }), (e, t) => ($(), k(C(z), S({
66
+ ref_key: "inputNumberRef",
67
+ ref: o
68
+ }, r.value, {
69
+ class: "qy-input-number",
70
+ "model-value": a.modelValue,
71
+ min: a.min,
72
+ max: a.max,
73
+ step: a.step,
74
+ "step-strictly": a.stepStrictly,
75
+ precision: a.precision,
76
+ controls: a.controls,
77
+ "controls-position": a.controlsPosition,
78
+ placeholder: a.placeholder,
79
+ disabled: a.disabled,
80
+ readonly: a.readonly,
81
+ size: a.size,
82
+ "value-on-clear": a.valueOnClear,
83
+ formatter: a.formatter,
84
+ parser: a.parser,
85
+ inputmode: a.inputmode,
86
+ align: a.align,
87
+ "disabled-scientific": a.disabledScientific,
88
+ "validate-event": a.validateEvent,
89
+ id: a.id,
90
+ name: a.name,
91
+ "aria-label": a.ariaLabel,
92
+ tabindex: a.tabindex,
93
+ "onUpdate:modelValue": c,
94
+ onInput: f,
95
+ onChange: m,
96
+ onFocus: b,
97
+ onBlur: v
98
+ }), V({ _: 2 }, [
99
+ e.$slots.prefix ? {
100
+ name: "prefix",
101
+ fn: l(() => [
102
+ i(e.$slots, "prefix")
103
+ ]),
104
+ key: "0"
105
+ } : void 0,
106
+ e.$slots.suffix ? {
107
+ name: "suffix",
108
+ fn: l(() => [
109
+ i(e.$slots, "suffix")
110
+ ]),
111
+ key: "1"
112
+ } : void 0,
113
+ e.$slots["increase-icon"] ? {
114
+ name: "increase-icon",
115
+ fn: l(() => [
116
+ i(e.$slots, "increase-icon")
117
+ ]),
118
+ key: "2"
119
+ } : void 0,
120
+ e.$slots["decrease-icon"] ? {
121
+ name: "decrease-icon",
122
+ fn: l(() => [
123
+ i(e.$slots, "decrease-icon")
124
+ ]),
125
+ key: "3"
126
+ } : void 0
127
+ ]), 1040, ["model-value", "min", "max", "step", "step-strictly", "precision", "controls", "controls-position", "placeholder", "disabled", "readonly", "size", "value-on-clear", "formatter", "parser", "inputmode", "align", "disabled-scientific", "validate-event", "id", "name", "aria-label", "tabindex"]));
128
+ }
129
+ });
130
+ export {
131
+ N as _
132
+ };
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),M=require("element-plus"),T=t.defineComponent({name:"QyInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},removeSpace:{type:Boolean,default:!1},trimMode:{default:"none"}},emits:["update:modelValue","input","change","focus","blur","clear","enter"],setup(p,{expose:m,emit:v}){const l=p,u=v,h=t.useAttrs(),o=t.ref(null),r=t.ref(i(l.modelValue)),s=t.ref(i(l.modelValue)),a=t.ref("none"),V=t.computed(()=>i(l.modelValue));t.watch(()=>l.modelValue,e=>{const n=i(e);r.value=n,s.value=n,a.value="none"});function i(e){return e==null?"":String(e)}function g(e){return l.removeSpace?e.replace(/\s+/g,""):e}function d(e,n){return l.trimMode!==n?e:e.trim()}function f(e){return g(i(e))}function c(e){r.value=e,s.value=e,u("update:modelValue",e)}function x(e){const n=f(e);c(n),a.value=n===""?"updated":"none"}function y(e){const n=f(e);r.value=n,u("input",n)}function S(e){const n=d(f(e),"change");if(r.value=n,n===""&&a.value==="updated"){a.value="changed",u("change",n);return}n!==s.value&&c(n),a.value=n===""?"changed":"none",u("change",n)}function C(e){u("focus",e)}function $(e){const n=d(r.value,"blur");r.value=n,n!==s.value&&c(n),u("blur",e)}function k(){a.value==="none"?(c(""),u("change","")):a.value==="updated"&&(a.value="changed",u("change","")),a.value="cleared",u("clear")}function w(e){u("enter",e)}function b(){var e,n;(n=(e=o.value)==null?void 0:e.focus)==null||n.call(e)}function z(){var e,n;(n=(e=o.value)==null?void 0:e.blur)==null||n.call(e)}function B(){var e,n;(n=(e=o.value)==null?void 0:e.select)==null||n.call(e)}function I(){var e,n;(n=(e=o.value)==null?void 0:e.clear)==null||n.call(e)}function q(){var e,n;(n=(e=o.value)==null?void 0:e.resizeTextarea)==null||n.call(e)}return m({focus:b,blur:z,select:B,clear:I,resizeTextarea:q}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(M.ElInput),t.mergeProps({ref_key:"inputRef",ref:o,class:"qy-input"},t.unref(h),{"model-value":V.value,"onUpdate:modelValue":x,onInput:y,onChange:S,onFocus:C,onBlur:$,onClear:k,onKeydown:t.withKeys(w,["enter"])}),t.createSlots({_:2},[e.$slots.prefix?{name:"prefix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prefix")]),key:"0"}:void 0,e.$slots.suffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"suffix")]),key:"1"}:void 0,e.$slots.prepend?{name:"prepend",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"prepend")]),key:"2"}:void 0,e.$slots.append?{name:"append",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"append")]),key:"3"}:void 0]),1040,["model-value"]))}});exports._sfc_main=T;
@@ -0,0 +1 @@
1
+ "use strict";const a=require("vue"),x=require("element-plus"),D=a.defineComponent({name:"QyDatePicker",inheritAttrs:!1,__name:"index",props:{modelValue:{default:void 0},type:{default:"date"},placeholder:{default:"请选择日期"},startPlaceholder:{default:"开始时间"},endPlaceholder:{default:"结束时间"},rangeSeparator:{default:"-"},format:{default:void 0},valueFormat:{default:void 0},defaultTime:{default:void 0},disabledDate:{type:Function,default:void 0},shortcuts:{default:void 0},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},normalizeRangeEndTime:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","calendar-change","panel-change","visible-change","focus","blur"],setup(l,{expose:s,emit:c}){const d=l,r=c,f=a.useAttrs(),o=a.ref(null),h=a.computed(()=>["qy-date-picker__popper",d.popperClass].filter(Boolean).join(" "));function p(e){return Array.isArray(e)}function m(e){if(e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0)return e;const t=new Date(e);return t.setHours(23,59,59,0),t}function g(e){const t=e.match(/(T| )00:00:00(\.000)?(Z|[+-]\d{2}:?\d{2})?$/);return t?e.replace(t[0],`${t[1]}23:59:59${t[2]??""}${t[3]??""}`):e}function i(e){if(!d.normalizeRangeEndTime||!p(e)||e.length<2)return e;const t=e[1];let n=t;if(t instanceof Date?n=m(t):typeof t=="string"&&(n=g(t)),n===t)return e;const u=[...e];return u[1]=n,u}function y(e){r("update:modelValue",i(e))}function P(e){r("change",i(e))}function C(){r("clear")}function b(e){r("calendar-change",e)}function v(e,t,n){if(n===void 0){r("panel-change",e,t);return}r("panel-change",e,t,n)}function z(e){r("visible-change",e)}function V(e){r("focus",e)}function R(e){r("blur",e)}function B(){var e,t;(t=(e=o.value)==null?void 0:e.focus)==null||t.call(e)}function S(){var e,t;(t=(e=o.value)==null?void 0:e.blur)==null||t.call(e)}function $(){var e,t;(t=(e=o.value)==null?void 0:e.handleOpen)==null||t.call(e)}function k(){var e,t;(t=(e=o.value)==null?void 0:e.handleClose)==null||t.call(e)}return s({focus:B,blur:S,open:$,close:k}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(x.ElDatePicker),a.mergeProps({ref_key:"datePickerRef",ref:o,class:"qy-date-picker"},a.unref(f),{"model-value":l.modelValue,type:l.type,placeholder:l.placeholder,"start-placeholder":l.startPlaceholder,"end-placeholder":l.endPlaceholder,"range-separator":l.rangeSeparator,format:l.format,"value-format":l.valueFormat,"default-time":l.defaultTime,"disabled-date":l.disabledDate,shortcuts:l.shortcuts,clearable:l.clearable,disabled:l.disabled,readonly:l.readonly,size:l.size,teleported:l.teleported,"append-to":l.appendTo,"popper-class":h.value,"onUpdate:modelValue":y,onChange:P,onClear:C,onCalendarChange:b,onPanelChange:v,onVisibleChange:z,onFocus:V,onBlur:R}),{default:a.withCtx(n=>[a.renderSlot(e.$slots,"default",a.normalizeProps(a.guardReactiveProps(n)))]),"range-separator":a.withCtx(n=>[a.renderSlot(e.$slots,"range-separator",a.normalizeProps(a.guardReactiveProps(n)))]),"prev-month":a.withCtx(n=>[a.renderSlot(e.$slots,"prev-month",a.normalizeProps(a.guardReactiveProps(n)))]),"next-month":a.withCtx(n=>[a.renderSlot(e.$slots,"next-month",a.normalizeProps(a.guardReactiveProps(n)))]),"prev-year":a.withCtx(n=>[a.renderSlot(e.$slots,"prev-year",a.normalizeProps(a.guardReactiveProps(n)))]),"next-year":a.withCtx(n=>[a.renderSlot(e.$slots,"next-year",a.normalizeProps(a.guardReactiveProps(n)))]),_:3},16,["model-value","type","placeholder","start-placeholder","end-placeholder","range-separator","format","value-format","default-time","disabled-date","shortcuts","clearable","disabled","readonly","size","teleported","append-to","popper-class"]))}});exports._sfc_main=D;
@@ -0,0 +1,140 @@
1
+ import { defineComponent as E, useAttrs as F, ref as c, computed as K, watch as R, openBlock as U, createBlock as P, unref as v, mergeProps as Q, withKeys as _, createSlots as j, withCtx as f, renderSlot as d } from "vue";
2
+ import { ElInput as D } from "element-plus";
3
+ const J = /* @__PURE__ */ E({
4
+ name: "QyInput",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ modelValue: { default: "" },
9
+ removeSpace: { type: Boolean, default: !1 },
10
+ trimMode: { default: "none" }
11
+ },
12
+ emits: ["update:modelValue", "input", "change", "focus", "blur", "clear", "enter"],
13
+ setup(h, { expose: V, emit: g }) {
14
+ const u = h, t = g, y = F(), l = c(null), o = c(r(u.modelValue)), i = c(r(u.modelValue)), a = c("none"), x = K(() => r(u.modelValue));
15
+ R(
16
+ () => u.modelValue,
17
+ (e) => {
18
+ const n = r(e);
19
+ o.value = n, i.value = n, a.value = "none";
20
+ }
21
+ );
22
+ function r(e) {
23
+ return e == null ? "" : String(e);
24
+ }
25
+ function $(e) {
26
+ return u.removeSpace ? e.replace(/\s+/g, "") : e;
27
+ }
28
+ function m(e, n) {
29
+ return u.trimMode !== n ? e : e.trim();
30
+ }
31
+ function p(e) {
32
+ return $(r(e));
33
+ }
34
+ function s(e) {
35
+ o.value = e, i.value = e, t("update:modelValue", e);
36
+ }
37
+ function k(e) {
38
+ const n = p(e);
39
+ s(n), a.value = n === "" ? "updated" : "none";
40
+ }
41
+ function S(e) {
42
+ const n = p(e);
43
+ o.value = n, t("input", n);
44
+ }
45
+ function C(e) {
46
+ const n = m(p(e), "change");
47
+ if (o.value = n, n === "" && a.value === "updated") {
48
+ a.value = "changed", t("change", n);
49
+ return;
50
+ }
51
+ n !== i.value && s(n), a.value = n === "" ? "changed" : "none", t("change", n);
52
+ }
53
+ function b(e) {
54
+ t("focus", e);
55
+ }
56
+ function z(e) {
57
+ const n = m(o.value, "blur");
58
+ o.value = n, n !== i.value && s(n), t("blur", e);
59
+ }
60
+ function B() {
61
+ a.value === "none" ? (s(""), t("change", "")) : a.value === "updated" && (a.value = "changed", t("change", "")), a.value = "cleared", t("clear");
62
+ }
63
+ function I(e) {
64
+ t("enter", e);
65
+ }
66
+ function w() {
67
+ var e, n;
68
+ (n = (e = l.value) == null ? void 0 : e.focus) == null || n.call(e);
69
+ }
70
+ function M() {
71
+ var e, n;
72
+ (n = (e = l.value) == null ? void 0 : e.blur) == null || n.call(e);
73
+ }
74
+ function T() {
75
+ var e, n;
76
+ (n = (e = l.value) == null ? void 0 : e.select) == null || n.call(e);
77
+ }
78
+ function q() {
79
+ var e, n;
80
+ (n = (e = l.value) == null ? void 0 : e.clear) == null || n.call(e);
81
+ }
82
+ function A() {
83
+ var e, n;
84
+ (n = (e = l.value) == null ? void 0 : e.resizeTextarea) == null || n.call(e);
85
+ }
86
+ return V({
87
+ // 暴露 Element Plus 常用输入框方法,方便业务弹窗做聚焦、选中和 textarea 重算高度。
88
+ focus: w,
89
+ blur: M,
90
+ select: T,
91
+ clear: q,
92
+ resizeTextarea: A
93
+ }), (e, n) => (U(), P(v(D), Q({
94
+ ref_key: "inputRef",
95
+ ref: l,
96
+ class: "qy-input"
97
+ }, v(y), {
98
+ "model-value": x.value,
99
+ "onUpdate:modelValue": k,
100
+ onInput: S,
101
+ onChange: C,
102
+ onFocus: b,
103
+ onBlur: z,
104
+ onClear: B,
105
+ onKeydown: _(I, ["enter"])
106
+ }), j({ _: 2 }, [
107
+ e.$slots.prefix ? {
108
+ name: "prefix",
109
+ fn: f(() => [
110
+ d(e.$slots, "prefix")
111
+ ]),
112
+ key: "0"
113
+ } : void 0,
114
+ e.$slots.suffix ? {
115
+ name: "suffix",
116
+ fn: f(() => [
117
+ d(e.$slots, "suffix")
118
+ ]),
119
+ key: "1"
120
+ } : void 0,
121
+ e.$slots.prepend ? {
122
+ name: "prepend",
123
+ fn: f(() => [
124
+ d(e.$slots, "prepend")
125
+ ]),
126
+ key: "2"
127
+ } : void 0,
128
+ e.$slots.append ? {
129
+ name: "append",
130
+ fn: f(() => [
131
+ d(e.$slots, "append")
132
+ ]),
133
+ key: "3"
134
+ } : void 0
135
+ ]), 1040, ["model-value"]));
136
+ }
137
+ });
138
+ export {
139
+ J as _
140
+ };
@@ -0,0 +1,121 @@
1
+ import { defineComponent as z, computed as d, ref as p, useSlots as F, watch as v, onBeforeUnmount as K, openBlock as g, createBlock as N, unref as Q, withCtx as S, renderSlot as R, createElementBlock as j, Fragment as G, renderList as H, resolveDynamicComponent as J } from "vue";
2
+ import { ElPopover as M } from "element-plus";
3
+ const X = 1e3, x = /* @__PURE__ */ z({
4
+ name: "QyPopover",
5
+ inheritAttrs: !1,
6
+ __name: "index",
7
+ props: {
8
+ trigger: { type: String, default: "click" },
9
+ placement: { type: String, default: "bottom" },
10
+ effect: { type: String, default: "light" },
11
+ width: { type: [Number, String], default: 240 },
12
+ offset: { type: Number, default: 12 },
13
+ showDelay: { type: Number, default: 0 },
14
+ hideDelay: { type: Number, default: 200 },
15
+ showArrow: { type: Boolean, default: !0 },
16
+ disabled: { type: Boolean, default: !1 },
17
+ open: { type: Boolean, default: void 0 }
18
+ },
19
+ emits: ["update:open", "open-change", "open", "close"],
20
+ setup(n, { expose: T, emit: C }) {
21
+ const t = n, c = C, a = d(() => t.open !== void 0), m = a.value && t.open === !0 && !t.disabled, u = p(m), i = p(m), A = p(m), r = p(null), D = d(() => t.disabled ? !1 : a.value ? t.open === !0 : u.value);
22
+ let o, f = !1, s;
23
+ const E = d(
24
+ () => typeof t.width == "number" ? `${t.width}px` : t.width
25
+ ), q = d(() => ({
26
+ "--qy-popover-width": E.value,
27
+ "--qy-popover-mobile-gutter": "24px"
28
+ })), h = F(), L = d(
29
+ () => {
30
+ var e;
31
+ return ((e = h.reference) == null ? void 0 : e.call(h)) ?? [];
32
+ }
33
+ );
34
+ function w() {
35
+ o && (clearTimeout(o), o = void 0), r.value = null;
36
+ }
37
+ function W(e) {
38
+ o && clearTimeout(o), o = setTimeout(() => {
39
+ o = void 0, r.value === e && (r.value = null);
40
+ }, X);
41
+ }
42
+ function l() {
43
+ if (f) return;
44
+ const e = D.value;
45
+ i.value !== e && (f = !0, s = e, i.value = e);
46
+ }
47
+ function y(e) {
48
+ if (!(e && t.disabled)) {
49
+ if (!a.value) {
50
+ if (u.value === e) return;
51
+ u.value = e, c("update:open", e), l();
52
+ return;
53
+ }
54
+ r.value !== e && (r.value === null && t.open === e || (r.value = e, W(e), c("update:open", e), l()));
55
+ }
56
+ }
57
+ function b(e) {
58
+ e === i.value && (!f || s !== e || (f = !1, s = void 0, e !== A.value && (A.value = e, r.value === e && w(), c("open-change", e), c(e ? "open" : "close"), l())));
59
+ }
60
+ function I(e) {
61
+ y(e), l();
62
+ }
63
+ function O() {
64
+ b(!0);
65
+ }
66
+ function P() {
67
+ b(!1);
68
+ }
69
+ function U() {
70
+ y(!1);
71
+ }
72
+ return v(
73
+ D,
74
+ () => l()
75
+ ), v(a, (e) => {
76
+ w(), e ? u.value = t.open === !0 : u.value = i.value, l();
77
+ }), v(
78
+ () => t.open,
79
+ (e, k) => {
80
+ !a.value || r.value === null || (e === r.value || e !== k) && w();
81
+ }
82
+ ), v(
83
+ () => t.disabled,
84
+ (e) => {
85
+ e ? y(!1) : l();
86
+ }
87
+ ), K(() => {
88
+ f = !1, s = void 0, o && clearTimeout(o);
89
+ }), T({ close: U }), (e, k) => (g(), N(Q(M), {
90
+ visible: i.value,
91
+ trigger: n.trigger,
92
+ placement: n.placement,
93
+ effect: n.effect,
94
+ width: n.width,
95
+ offset: n.offset,
96
+ "show-after": n.showDelay,
97
+ "hide-after": n.hideDelay,
98
+ "show-arrow": n.showArrow,
99
+ disabled: n.disabled,
100
+ enterable: !0,
101
+ "popper-style": q.value,
102
+ "popper-class": "qy-popover-popper",
103
+ "onUpdate:visible": I,
104
+ onAfterEnter: O,
105
+ onAfterLeave: P
106
+ }, {
107
+ reference: S(() => [
108
+ (g(!0), j(G, null, H(L.value, (B, $) => (g(), N(J(B), {
109
+ key: B.key ?? $
110
+ }))), 128))
111
+ ]),
112
+ default: S(() => [
113
+ R(e.$slots, "default")
114
+ ]),
115
+ _: 3
116
+ }, 8, ["visible", "trigger", "placement", "effect", "width", "offset", "show-after", "hide-after", "show-arrow", "disabled", "popper-style"]));
117
+ }
118
+ });
119
+ export {
120
+ x as _
121
+ };