@qynpm/ui 1.0.44 → 1.0.45
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.
- package/README.md +2 -0
- package/dist/index.cjs +12 -12
- package/dist/index.mjs +13 -13
- package/dist/qy-action-bar/index.cjs +1 -1
- package/dist/qy-action-bar/index.mjs +1 -1
- package/dist/qy-autocomplete/index.cjs +1 -1
- package/dist/qy-autocomplete/index.mjs +1 -1
- package/dist/qy-checkbox/index.cjs +1 -1
- package/dist/qy-checkbox/index.mjs +1 -1
- package/dist/qy-checkbox-group/index.cjs +1 -1
- package/dist/qy-checkbox-group/index.mjs +1 -1
- package/dist/qy-color-picker/index.cjs +1 -1
- package/dist/qy-color-picker/index.mjs +1 -1
- package/dist/qy-date-picker/index.cjs +1 -1
- package/dist/qy-date-picker/index.mjs +1 -1
- package/dist/qy-dialog/index.cjs +1 -1
- package/dist/qy-dialog/index.mjs +1 -1
- package/dist/qy-dropdown/index.cjs +2 -2
- package/dist/qy-dropdown/index.mjs +2 -2
- package/dist/qy-file-picker/index.cjs +1 -1
- package/dist/qy-file-picker/index.mjs +1 -1
- package/dist/qy-form-section/index.cjs +1 -1
- package/dist/qy-form-section/index.mjs +1 -1
- package/dist/qy-image/index.cjs +1 -1
- package/dist/qy-image/index.mjs +1 -1
- package/dist/qy-image-preview/index.cjs +1 -1
- package/dist/qy-image-preview/index.mjs +2 -2
- package/dist/qy-image-upload/index.cjs +1 -1
- package/dist/qy-image-upload/index.mjs +1 -1
- package/dist/qy-input-tag/index.cjs +1 -1
- package/dist/qy-input-tag/index.mjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.cjs +1 -1
- package/dist/qy-legacy-selection-dialog/index.mjs +1 -1
- package/dist/qy-menu-actions/index.cjs +1 -1
- package/dist/qy-menu-actions/index.mjs +1 -1
- package/dist/qy-money-input/index.cjs +1 -1
- package/dist/qy-money-input/index.mjs +1 -1
- package/dist/qy-pagination/index.cjs +1 -1
- package/dist/qy-pagination/index.mjs +1 -1
- package/dist/qy-popconfirm/index.cjs +1 -1
- package/dist/qy-popconfirm/index.mjs +1 -1
- package/dist/qy-popover/index.cjs +1 -1
- package/dist/qy-popover/index.mjs +1 -1
- package/dist/qy-radio/index.cjs +1 -1
- package/dist/qy-radio/index.mjs +1 -1
- package/dist/qy-radio-group/index.cjs +1 -1
- package/dist/qy-radio-group/index.mjs +1 -1
- package/dist/qy-record-quote-search/index.cjs +1 -1
- package/dist/qy-record-quote-search/index.mjs +1 -1
- package/dist/qy-remark-image/index.cjs +1 -1
- package/dist/qy-remark-image/index.mjs +1 -1
- package/dist/qy-remote-select/index.cjs +1 -1
- package/dist/qy-remote-select/index.mjs +1 -1
- package/dist/qy-search-input/index.cjs +1 -1
- package/dist/qy-search-input/index.mjs +1 -1
- package/dist/qy-select/index.cjs +1 -1
- package/dist/qy-select/index.mjs +1 -1
- package/dist/qy-selection-dialog/index.cjs +1 -1
- package/dist/qy-selection-dialog/index.mjs +1 -1
- package/dist/qy-switch/index.cjs +1 -1
- package/dist/qy-switch/index.mjs +1 -1
- package/dist/qy-table-column-settings/index.cjs +1 -1
- package/dist/qy-table-column-settings/index.mjs +1 -1
- package/dist/qy-tooltip/index.cjs +1 -1
- package/dist/qy-tooltip/index.mjs +1 -1
- package/dist/qy-tree-select/index.cjs +1 -1
- package/dist/qy-tree-select/index.mjs +1 -1
- package/dist/qy-upload/index.cjs +1 -1
- package/dist/qy-upload/index.mjs +1 -1
- package/dist/shared/{index-BNssRW4d.mjs → index-9G8dxxVx.mjs} +13 -13
- package/dist/shared/{index-DRIoLeFE.mjs → index-B1gnVI8Y.mjs} +44 -45
- package/dist/shared/{index-CiE6qJCJ.mjs → index-BcDt1tKY.mjs} +151 -143
- package/dist/shared/index-BfA7ZJnJ.cjs +1 -0
- package/dist/shared/index-BfXhDFFn.cjs +1 -0
- package/dist/shared/index-Bfmf0msc.mjs +71 -0
- package/dist/shared/index-BhpomD_C.cjs +1 -0
- package/dist/shared/index-BvXyRAhX.cjs +1 -0
- package/dist/shared/index-Bz9WjKdL.cjs +1 -0
- package/dist/shared/{index-Co84fsS5.mjs → index-C5hzCMaD.mjs} +88 -80
- package/dist/shared/index-CPW3gKgP.mjs +2429 -0
- package/dist/shared/index-CUwUz-Le.cjs +1 -0
- package/dist/shared/index-CjImIyvI.mjs +124 -0
- package/dist/shared/{index-gMrQlV5n.cjs → index-CsfcDlq4.cjs} +1 -1
- package/dist/shared/{index-BweLwi2_.cjs → index-D359jZg_.cjs} +1 -1
- package/dist/shared/{index-DvFMgAcu.mjs → index-DEoy2IfN.mjs} +1 -1
- package/dist/shared/{index-BjqJCq-6.mjs → index-DM0zanTb.mjs} +3 -3
- package/dist/shared/index-DOpfxPDq.cjs +1 -0
- package/dist/shared/index-DPqFEuPp.mjs +798 -0
- package/dist/shared/index-DWBkjY5O.cjs +1 -0
- package/dist/shared/index-DaUdmOjn.cjs +1 -0
- package/dist/shared/index-MEzLM_rM.cjs +1 -0
- package/dist/shared/index-MyPNS-OR.cjs +1 -0
- package/dist/shared/{index-C4F8hXzQ.mjs → index-XSV-GmR2.mjs} +90 -81
- package/dist/shared/index-_e-HwHF0.mjs +79 -0
- package/dist/shared/{index-DNnWRAFl.mjs → index-uMEKxoXj.mjs} +1 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-B38X3tvf.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BNKC9382.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DIWWHODS.mjs → index.vue_vue_type_script_setup_true_lang-BtMkNw_I.mjs} +49 -47
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Byp7e--Y.mjs +63 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-Dn29lZTs.mjs → index.vue_vue_type_script_setup_true_lang-Bypkl4Ty.mjs} +20 -18
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CPm8gzId.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CYaK3oDY.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CeVvm5Ph.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-Cn0JqB5r.cjs +1 -0
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DMHhx9lY.mjs +133 -0
- package/dist/shared/{index.vue_vue_type_script_setup_true_lang-DwFGEW4B.mjs → index.vue_vue_type_script_setup_true_lang-DkMm40Ac.mjs} +50 -42
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-qXBKqHCs.mjs +40 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BI4abIsm.mjs +219 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BNBJu1Mq.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BZZ8vhEf.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-DSur831A.mjs → index.vue_vue_type_style_index_0_lang-Bpe6LkvL.mjs} +24 -18
- package/dist/shared/index.vue_vue_type_style_index_0_lang-CYIUfOy9.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D2iiEHqM.mjs +413 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Dt19xolk.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DzvboHR2.mjs +176 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-E92uiH6Q.cjs +1 -0
- package/dist/shared/index.vue_vue_type_style_index_0_lang-W44zpeKW.cjs +1 -0
- package/dist/shared/{index.vue_vue_type_style_index_0_lang-CcVf5MXE.mjs → index.vue_vue_type_style_index_0_lang-shJS7iXC.mjs} +59 -57
- package/dist/shared/index.vue_vue_type_style_index_0_lang-z2Unl0WQ.mjs +142 -0
- package/dist/shared/overlay-stack-CFFRngnU.mjs +34 -0
- package/dist/shared/overlay-stack-DeKq7jZu.cjs +1 -0
- package/dist/shared/{utils-DoyI5oM8.mjs → utils-CUXINmHY.mjs} +63 -49
- package/dist/shared/utils-DpkN3Zat.cjs +1 -0
- package/index.d.ts +44 -12
- package/package.json +1 -1
- package/qy-action-bar/index.d.ts +16 -4
- package/qy-autocomplete/index.d.ts +43 -2
- package/qy-checkbox/index.d.ts +1 -0
- package/qy-checkbox-group/index.d.ts +1 -0
- package/qy-date-picker/index.d.ts +1 -0
- package/qy-dialog/index.d.ts +4 -0
- package/qy-form-section/index.d.ts +22 -4
- package/qy-image/index.d.ts +1 -0
- package/qy-image-preview/index.d.ts +8 -4
- package/qy-menu-actions/index.d.ts +21 -2
- package/qy-money-input/index.d.ts +1 -0
- package/qy-pagination/index.d.ts +4 -0
- package/qy-popover/index.d.ts +4 -0
- package/qy-radio-group/index.d.ts +1 -0
- package/qy-record-quote-search/index.d.ts +53 -4
- package/qy-remark-image/index.d.ts +44 -4
- package/qy-remote-select/index.d.ts +53 -2
- package/qy-search-input/index.d.ts +66 -4
- package/qy-select/index.d.ts +4 -0
- package/qy-selection-dialog/index.d.ts +63 -2
- package/qy-switch/index.d.ts +1 -0
- package/qy-table-column-settings/index.d.ts +19 -2
- package/qy-tooltip/index.d.ts +5 -0
- package/qy-tree-select/index.d.ts +1 -0
- package/dist/shared/index-5dxbpQb_.cjs +0 -1
- package/dist/shared/index-BEcS8y8g.mjs +0 -68
- package/dist/shared/index-BSTMCPDj.mjs +0 -72
- package/dist/shared/index-Bh9hxVFh.mjs +0 -766
- package/dist/shared/index-CGq7Q_hV.mjs +0 -119
- package/dist/shared/index-CVYNG8Fc.cjs +0 -1
- package/dist/shared/index-CmgTSaFS.cjs +0 -1
- package/dist/shared/index-CnVhquq5.cjs +0 -1
- package/dist/shared/index-D27mwR57.cjs +0 -1
- package/dist/shared/index-DKw-seoh.cjs +0 -1
- package/dist/shared/index-DRugp8x0.cjs +0 -1
- package/dist/shared/index-DTbGlDqr.cjs +0 -1
- package/dist/shared/index-MyDDX-zj.cjs +0 -1
- package/dist/shared/index-afOuq3YX.cjs +0 -1
- package/dist/shared/index-rSrDnOpu.cjs +0 -1
- package/dist/shared/index-rjciSHaR.mjs +0 -2362
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-BiIgNax-.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CKp87br2.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-CqSJ_8hG.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-DbLp1kvW.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-EiHoQBXt.mjs +0 -94
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-IyZesuKm.mjs +0 -48
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-UBQQ6Z03.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-ccFLNRry.cjs +0 -1
- package/dist/shared/index.vue_vue_type_script_setup_true_lang-r7iyZzDS.mjs +0 -61
- package/dist/shared/index.vue_vue_type_style_index_0_lang-1cTut9Ql.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-B2thgQml.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BMZqMPZb.mjs +0 -215
- package/dist/shared/index.vue_vue_type_style_index_0_lang-Bb3L64L8.mjs +0 -406
- package/dist/shared/index.vue_vue_type_style_index_0_lang-BoaO6MKl.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-C4Yk-UdJ.mjs +0 -172
- package/dist/shared/index.vue_vue_type_style_index_0_lang-D9-2GN18.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DHK86rdP.cjs +0 -1
- package/dist/shared/index.vue_vue_type_style_index_0_lang-DsOg_Rum.mjs +0 -128
- package/dist/shared/index.vue_vue_type_style_index_0_lang-RiwA2WPO.cjs +0 -1
- package/dist/shared/utils-BjEXwY3L.cjs +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent as f, useAttrs as p, computed as b, openBlock as l, createBlock as i, unref as h, mergeProps as x, withCtx as o, renderSlot as g, createElementBlock as C, Fragment as V, renderList as _, createTextVNode as E, toDisplayString as B } from "vue";
|
|
2
|
+
import { ElCheckboxGroup as z } from "element-plus";
|
|
3
|
+
import { C as $ } from "./index-_e-HwHF0.mjs";
|
|
4
|
+
const k = /* @__PURE__ */ f({
|
|
5
|
+
name: "QyCheckboxGroup",
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: () => [] },
|
|
10
|
+
options: { default: () => [] },
|
|
11
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
12
|
+
disabled: { type: Boolean, default: void 0 },
|
|
13
|
+
min: {},
|
|
14
|
+
max: {},
|
|
15
|
+
size: { default: void 0 },
|
|
16
|
+
ariaLabel: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:modelValue", "change"],
|
|
19
|
+
setup(s, { emit: n }) {
|
|
20
|
+
const a = s, d = n, r = p(), u = b(
|
|
21
|
+
() => Object.fromEntries(
|
|
22
|
+
Object.entries(r).filter(
|
|
23
|
+
([e]) => e === "class" || e === "style" || e === "role" || e === "title" || e === "id" || e.startsWith("data-") || e.startsWith("aria-")
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
function m(e) {
|
|
28
|
+
d("update:modelValue", e.slice());
|
|
29
|
+
}
|
|
30
|
+
function c(e) {
|
|
31
|
+
d("change", e.slice());
|
|
32
|
+
}
|
|
33
|
+
return (e, A) => (l(), i(h(z), x(u.value, {
|
|
34
|
+
"model-value": a.modelValue,
|
|
35
|
+
disabled: a.disabled,
|
|
36
|
+
"validate-event": a.validateEvent,
|
|
37
|
+
min: a.min,
|
|
38
|
+
max: a.max,
|
|
39
|
+
size: a.size,
|
|
40
|
+
"aria-label": a.ariaLabel,
|
|
41
|
+
"onUpdate:modelValue": m,
|
|
42
|
+
onChange: c
|
|
43
|
+
}), {
|
|
44
|
+
default: o(() => [
|
|
45
|
+
e.$slots.default ? g(e.$slots, "default", {}, void 0, void 0, 0) : (l(!0), C(V, { key: 1 }, _(a.options, (t, v) => (l(), i($, {
|
|
46
|
+
key: `${String(t.value)}-${v}`,
|
|
47
|
+
value: t.value,
|
|
48
|
+
"validate-event": a.validateEvent,
|
|
49
|
+
disabled: a.disabled || t.disabled
|
|
50
|
+
}, {
|
|
51
|
+
default: o(() => [
|
|
52
|
+
E(B(t.label), 1)
|
|
53
|
+
]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, ["value", "validate-event", "disabled"]))), 128))
|
|
56
|
+
]),
|
|
57
|
+
_: 3
|
|
58
|
+
}, 16, ["model-value", "disabled", "validate-event", "min", "max", "size", "aria-label"]));
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
export {
|
|
62
|
+
k as _
|
|
63
|
+
};
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { defineComponent as C, useAttrs as
|
|
1
|
+
import { defineComponent as C, useAttrs as E, computed as o, ref as G, openBlock as r, createBlock as s, unref as S, mergeProps as i, withCtx as f, renderSlot as m, createElementBlock as $, Fragment as O, renderList as w, resolveDynamicComponent as x, createTextVNode as A, toDisplayString as P } from "vue";
|
|
2
2
|
import { ElRadioButton as j, ElRadioGroup as D } from "element-plus";
|
|
3
|
-
import { R as N } from "./index-
|
|
3
|
+
import { R as N } from "./index-9G8dxxVx.mjs";
|
|
4
4
|
const I = /* @__PURE__ */ C({
|
|
5
5
|
name: "QyRadioGroup",
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
9
|
-
modelValue: { type: [
|
|
9
|
+
modelValue: { type: [String, Number, Boolean, null], default: void 0 },
|
|
10
10
|
options: { default: () => [] },
|
|
11
11
|
labelKey: { default: "label" },
|
|
12
12
|
valueKey: { default: "value" },
|
|
13
13
|
disabledKey: { default: "disabled" },
|
|
14
|
-
|
|
14
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
15
|
+
disabled: { type: Boolean, default: void 0 },
|
|
15
16
|
size: { default: void 0 },
|
|
16
17
|
name: { default: void 0 },
|
|
17
18
|
type: { default: "radio" },
|
|
18
19
|
border: { type: Boolean, default: !1 }
|
|
19
20
|
},
|
|
20
21
|
emits: ["update:modelValue", "change"],
|
|
21
|
-
setup(b, { expose: c, emit:
|
|
22
|
-
const a = b, n =
|
|
22
|
+
setup(b, { expose: c, emit: v }) {
|
|
23
|
+
const a = b, n = v, p = E(), y = o(
|
|
23
24
|
() => Object.fromEntries(
|
|
24
|
-
Object.entries(
|
|
25
|
+
Object.entries(p).filter(
|
|
25
26
|
([e]) => e === "class" || e === "style" || e === "role" || e === "title" || e === "id" || e.startsWith("data-") || e.startsWith("aria-")
|
|
26
27
|
)
|
|
27
28
|
)
|
|
28
|
-
),
|
|
29
|
+
), u = G(null), g = o(
|
|
29
30
|
() => a.type === "button" ? j : N
|
|
30
|
-
), V =
|
|
31
|
+
), V = o(
|
|
31
32
|
() => a.options.map((e) => {
|
|
32
|
-
const t = e[a.labelKey], l = e[a.valueKey],
|
|
33
|
+
const t = e[a.labelKey], l = e[a.valueKey], d = h(l) ? l : e.value ?? e.label ?? "";
|
|
33
34
|
return {
|
|
34
35
|
raw: e,
|
|
35
36
|
label: String(t ?? e.label ?? e.value ?? ""),
|
|
36
|
-
value:
|
|
37
|
+
value: d,
|
|
37
38
|
disabled: !!e[a.disabledKey]
|
|
38
39
|
};
|
|
39
40
|
})
|
|
@@ -46,7 +47,7 @@ const I = /* @__PURE__ */ C({
|
|
|
46
47
|
modelValue: a.modelValue ?? void 0,
|
|
47
48
|
value: e.value,
|
|
48
49
|
label: e.label,
|
|
49
|
-
disabled: e.disabled,
|
|
50
|
+
disabled: e.disabled || void 0,
|
|
50
51
|
size: a.size,
|
|
51
52
|
name: a.name
|
|
52
53
|
};
|
|
@@ -65,24 +66,25 @@ const I = /* @__PURE__ */ C({
|
|
|
65
66
|
n("change", e);
|
|
66
67
|
}
|
|
67
68
|
function K() {
|
|
68
|
-
return
|
|
69
|
+
return u.value;
|
|
69
70
|
}
|
|
70
71
|
return c({
|
|
71
72
|
getRadioGroupInstance: K
|
|
72
|
-
}), (e, t) => (
|
|
73
|
+
}), (e, t) => (r(), s(S(D), i({
|
|
73
74
|
ref_key: "radioGroupRef",
|
|
74
|
-
ref:
|
|
75
|
+
ref: u
|
|
75
76
|
}, y.value, {
|
|
76
77
|
"model-value": a.modelValue,
|
|
77
78
|
disabled: a.disabled,
|
|
79
|
+
"validate-event": a.validateEvent,
|
|
78
80
|
size: a.size,
|
|
79
81
|
name: a.name,
|
|
80
82
|
"onUpdate:modelValue": _,
|
|
81
83
|
onChange: z
|
|
82
84
|
}), {
|
|
83
85
|
default: f(() => [
|
|
84
|
-
e.$slots.default ? m(e.$slots, "default", {}, void 0, void 0, 0) : (
|
|
85
|
-
key: B(l,
|
|
86
|
+
e.$slots.default ? m(e.$slots, "default", {}, void 0, void 0, 0) : (r(!0), $(O, { key: 1 }, w(V.value, (l, d) => (r(), s(x(g.value), i({
|
|
87
|
+
key: B(l, d)
|
|
86
88
|
}, { ref_for: !0 }, R(l)), {
|
|
87
89
|
default: f(() => [
|
|
88
90
|
m(e.$slots, "option", {
|
|
@@ -98,7 +100,7 @@ const I = /* @__PURE__ */ C({
|
|
|
98
100
|
}, 1040))), 128))
|
|
99
101
|
]),
|
|
100
102
|
_: 3
|
|
101
|
-
}, 16, ["model-value", "disabled", "size", "name"]));
|
|
103
|
+
}, 16, ["model-value", "disabled", "validate-event", "size", "name"]));
|
|
102
104
|
}
|
|
103
105
|
});
|
|
104
106
|
export {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),A=require("element-plus"),w=a.defineComponent({name:"QyInputTag",inheritAttrs:!1,__name:"index",props:{modelValue:{default:()=>[]},max:{},trigger:{default:"enter"},tagTone:{default:"neutral"},tagEffect:{default:"light"},size:{},clearable:{type:Boolean},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean},placeholder:{},autofocus:{type:Boolean},validateEvent:{type:Boolean,default:!0},id:{},tabindex:{},maxlength:{},minlength:{},autocomplete:{},ariaLabel:{}},emits:["update:modelValue","change","input","add","remove","clear","focus","blur"],setup(c,{expose:f,emit:p}){const t=c,o=p,g=a.useAttrs(),i=a.ref(null),r=a.ref(null),m=a.computed(()=>Object.fromEntries(Object.entries(g).filter(([e])=>e==="class"||e==="style"||e==="title"||e==="role"||e.startsWith("data-")||e.startsWith("aria-")))),h=a.computed(()=>t.tagTone==="neutral"?"info":t.tagTone),v=a.computed(()=>t.trigger==="space"?"Space":"Enter");function u(e){return e?[...e]:[]}function y(e,n){if(e.length!==n.length+1)return null;for(let l=0;l<e.length;l+=1)if(e[l]!==n[l]&&e.slice(l+1).every((d,z)=>d===n[l+z]))return{value:e[l],index:l};return{value:e[e.length-1],index:e.length-1}}function x(e){if(t.readonly)return;const n=u(t.modelValue),l=u(e);r.value=l.length===0&&n.length>0?null:y(n,l),o("update:modelValue",l)}function b(e){t.readonly||o("change",u(e))}function T(e){t.readonly||o("input",e)}function C(e){t.readonly||o("add",e)}function B(e){if(t.readonly)return;const n=r.value,l=(n==null?void 0:n.value)===e?n.index:u(t.modelValue).indexOf(e);o("remove",e,l),r.value=null}function E(){t.readonly||(o("clear"),r.value=null)}function s(e){!t.readonly||!["Enter","NumpadEnter","Space"," ","Backspace","Delete"].includes(e.code||e.key)||(e.preventDefault(),e.stopPropagation())}function V(e){o("focus",e)}function R(e){o("blur",e)}function S(){var e,n;(n=(e=i.value)==null?void 0:e.focus)==null||n.call(e)}function $(){var e,n;(n=(e=i.value)==null?void 0:e.blur)==null||n.call(e)}return f({focus:S,blur:$}),(e,n)=>(a.openBlock(),a.createBlock(a.unref(A.ElInputTag),a.mergeProps({ref_key:"inputTagRef",ref:i,class:"qy-input-tag"},m.value,{"model-value":t.modelValue,max:t.max,"tag-type":h.value,"tag-effect":t.tagEffect,trigger:v.value,size:t.size,clearable:t.clearable,disabled:t.disabled,readonly:t.readonly,"save-on-blur":!t.readonly,placeholder:t.placeholder,autofocus:t.autofocus,"validate-event":t.validateEvent,id:t.id,tabindex:t.tabindex,maxlength:t.maxlength,minlength:t.minlength,autocomplete:t.autocomplete,"aria-label":t.ariaLabel,"onUpdate:modelValue":x,onChange:b,onInput:T,onAddTag:C,onRemoveTag:B,onClear:E,onKeydownCapture:s,onKeyupCapture:s,onFocusCapture:V,onBlurCapture:R}),a.createSlots({_:2},[e.$slots.tag?{name:"tag",fn:a.withCtx(({value:l,index:d})=>[a.renderSlot(e.$slots,"tag",{value:l,index:d})]),key:"0"}:void 0,e.$slots.prefix?{name:"prefix",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"prefix")]),key:"1"}:void 0,e.$slots.suffix?{name:"suffix",fn:a.withCtx(()=>[a.renderSlot(e.$slots,"suffix")]),key:"2"}:void 0]),1040,["model-value","max","tag-type","tag-effect","trigger","size","clearable","disabled","readonly","save-on-blur","placeholder","autofocus","validate-event","id","tabindex","maxlength","minlength","autocomplete","aria-label"]))}});exports._sfc_main=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),u=require("element-plus"),R=require("./index-BhpomD_C.cjs"),_=a.defineComponent({name:"QyRadioGroup",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,null],default:void 0},options:{default:()=>[]},labelKey:{default:"label"},valueKey:{default:"value"},disabledKey:{default:"disabled"},validateEvent:{type:Boolean,default:!0},disabled:{type:Boolean,default:void 0},size:{default:void 0},name:{default:void 0},type:{default:"radio"},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(s,{expose:i,emit:c}){const l=s,r=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([e])=>e==="class"||e==="style"||e==="role"||e==="title"||e==="id"||e.startsWith("data-")||e.startsWith("aria-")))),n=a.ref(null),b=a.computed(()=>l.type==="button"?u.ElRadioButton:R.Radio),v=a.computed(()=>l.options.map(e=>{const d=e[l.labelKey],t=e[l.valueKey],o=p(t)?t:e.value??e.label??"";return{raw:e,label:String(d??e.label??e.value??""),value:o,disabled:!!e[l.disabledKey]}}));function p(e){return typeof e=="boolean"||typeof e=="string"||typeof e=="number"}function y(e){const d={modelValue:l.modelValue??void 0,value:e.value,label:e.label,disabled:e.disabled||void 0,size:l.size,name:l.name};return l.type==="button"?d:{...d,border:l.border}}function g(e,d){return`${String(e.value??e.label)}-${d}`}function h(e){r("update:modelValue",e)}function B(e){r("change",e)}function V(){return n.value}return i({getRadioGroupInstance:V}),(e,d)=>(a.openBlock(),a.createBlock(a.unref(u.ElRadioGroup),a.mergeProps({ref_key:"radioGroupRef",ref:n},m.value,{"model-value":l.modelValue,disabled:l.disabled,"validate-event":l.validateEvent,size:l.size,name:l.name,"onUpdate:modelValue":h,onChange:B}),{default:a.withCtx(()=>[e.$slots.default?a.renderSlot(e.$slots,"default",{},void 0,void 0,0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(v.value,(t,o)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(b.value),a.mergeProps({key:g(t,o)},{ref_for:!0},y(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"option",{option:t.raw,label:t.label,value:t.value,disabled:t.disabled},()=>[a.createTextVNode(a.toDisplayString(t.label),1)])]),_:2},1040))),128))]),_:3},16,["model-value","disabled","validate-event","size","name"]))}});exports._sfc_main=_;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),d=require("element-plus"),f=require("./overlay-stack-DeKq7jZu.cjs"),r=require("./utils-DpkN3Zat.cjs"),p=e.defineComponent({name:"QyImagePreview",__name:"index",props:{open:{type:Boolean,default:!1},urlList:{default:()=>[]},initialIndex:{default:0},hideOnClickModal:{type:Boolean,default:!0}},emits:["update:open","close"],setup(t,{emit:c}){const o=t,a=c,l=e.computed(()=>o.urlList.map(i=>r.normalizeImageSrc(i)).filter(Boolean));let n;const u=e.ref(0),{nextZIndex:s}=d.useZIndex();e.watch(()=>o.open&&l.value.length>0,i=>{i?(u.value=f.resolveOverlayZIndex(s()),n??(n=r.acquirePreviewScrollLock())):(n==null||n(),n=void 0)},{immediate:!0,flush:"sync"}),e.onBeforeUnmount(()=>n==null?void 0:n());function m(){a("update:open",!1),a("close")}return(i,x)=>t.open&&l.value.length?(e.openBlock(),e.createBlock(e.unref(d.ElImageViewer),{key:0,"url-list":l.value,"initial-index":t.initialIndex,"hide-on-click-modal":t.hideOnClickModal,teleported:!0,"z-index":u.value,onClose:m},null,8,["url-list","initial-index","hide-on-click-modal","z-index"])):e.createCommentVNode("",!0)}});exports._sfc_main=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue"),P=require("element-plus"),$=t.defineComponent({name:"QyAutocomplete",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},valueKey:{default:"value"},labelKey:{default:"label"},placeholder:{default:"请输入"},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:{default:void 0},teleported:{type:Boolean,default:!0},appendTo:{default:"body"},popperClass:{default:""},filterMethod:{type:Function,default:void 0},fetchSuggestions:{}},emits:["update:modelValue","input","change","select","focus","blur","clear"],setup(a,{expose:m,emit:h}){const r=a,n=h,y=t.useAttrs(),f=t.ref(null);let c=0;t.onBeforeUnmount(()=>{c+=1});const v=t.computed(()=>["qy-autocomplete__popper",r.popperClass].filter(Boolean).join(" ")),b=t.computed(()=>{const e=t.unref(r.options);return(Array.isArray(e)?e:t.unref(e==null?void 0:e.value)||[]).map(l=>({...l,value:(l==null?void 0:l[r.valueKey])??(l==null?void 0:l.value)??(l==null?void 0:l[r.labelKey])??(l==null?void 0:l.label)??""}))});function i(e,u){const l=String(e??""),K=++c;if(r.fetchSuggestions){let o=!1;const d=s=>{o||K!==c||(o=!0,u(s))};try{const s=r.fetchSuggestions(l,d);Array.isArray(s)?d(s):s&&Promise.resolve(s).then(p=>{Array.isArray(p)&&d(p)},()=>d([]))}catch{d([])}return}const M=b.value.filter(o=>r.filterMethod?r.filterMethod(l,o):l?String(o.value??"").includes(l):!0);u(M)}function g(e){n("update:modelValue",e)}function S(e){n("input",e)}function A(e){n("change",e)}function C(e){n("select",e)}function B(e){n("focus",e)}function q(e){n("blur",e)}function V(){c+=1,n("clear")}function z(){var e,u;(u=(e=f.value)==null?void 0:e.focus)==null||u.call(e)}function I(){var e,u;(u=(e=f.value)==null?void 0:e.blur)==null||u.call(e)}return m({querySearch:i,focus:z,blur:I}),(e,u)=>(t.openBlock(),t.createBlock(t.unref(P.ElAutocomplete),t.mergeProps({ref_key:"autocompleteRef",ref:f},t.unref(y),{"model-value":a.modelValue,"fetch-suggestions":i,placeholder:a.placeholder,disabled:a.disabled,clearable:a.clearable,size:a.size,teleported:a.teleported,"append-to":a.appendTo,"popper-class":v.value,"onUpdate:modelValue":g,onInput:S,onChange:A,onSelect:C,onFocus:B,onBlur:q,onClear:V}),t.createSlots({_:2},[e.$slots.default?{name:"default",fn:t.withCtx(({item:l})=>[t.renderSlot(e.$slots,"default",{item:l})]),key:"0"}:void 0,t.renderList(["prefix","suffix","prepend","append"].filter(l=>e.$slots[l]),l=>({name:l,fn:t.withCtx(()=>[t.renderSlot(e.$slots,l)])}))]),1040,["model-value","placeholder","disabled","clearable","size","teleported","append-to","popper-class"]))}});exports._sfc_main=$;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { defineComponent as F, useAttrs as P, ref as R, onBeforeUnmount as U, computed as m, unref as c, openBlock as T, createBlock as j, mergeProps as E, createSlots as L, withCtx as h, renderSlot as y, renderList as Q } from "vue";
|
|
2
|
+
import { ElAutocomplete as w } from "element-plus";
|
|
3
|
+
const H = /* @__PURE__ */ F({
|
|
4
|
+
name: "QyAutocomplete",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: "" },
|
|
9
|
+
options: { default: () => [] },
|
|
10
|
+
valueKey: { default: "value" },
|
|
11
|
+
labelKey: { default: "label" },
|
|
12
|
+
placeholder: { default: "请输入" },
|
|
13
|
+
disabled: { type: Boolean, default: void 0 },
|
|
14
|
+
clearable: { type: Boolean, default: !0 },
|
|
15
|
+
size: { default: void 0 },
|
|
16
|
+
teleported: { type: Boolean, default: !0 },
|
|
17
|
+
appendTo: { default: "body" },
|
|
18
|
+
popperClass: { default: "" },
|
|
19
|
+
filterMethod: { type: Function, default: void 0 },
|
|
20
|
+
fetchSuggestions: {}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:modelValue", "input", "change", "select", "focus", "blur", "clear"],
|
|
23
|
+
setup(a, { expose: v, emit: b }) {
|
|
24
|
+
const r = a, u = b, g = P(), f = R(null);
|
|
25
|
+
let d = 0;
|
|
26
|
+
U(() => {
|
|
27
|
+
d += 1;
|
|
28
|
+
});
|
|
29
|
+
const A = m(
|
|
30
|
+
() => ["qy-autocomplete__popper", r.popperClass].filter(Boolean).join(" ")
|
|
31
|
+
), S = m(() => {
|
|
32
|
+
const e = c(r.options);
|
|
33
|
+
return (Array.isArray(e) ? e : c(e == null ? void 0 : e.value) || []).map((l) => ({
|
|
34
|
+
...l,
|
|
35
|
+
value: (l == null ? void 0 : l[r.valueKey]) ?? (l == null ? void 0 : l.value) ?? (l == null ? void 0 : l[r.labelKey]) ?? (l == null ? void 0 : l.label) ?? ""
|
|
36
|
+
}));
|
|
37
|
+
});
|
|
38
|
+
function i(e, t) {
|
|
39
|
+
const l = String(e ?? ""), k = ++d;
|
|
40
|
+
if (r.fetchSuggestions) {
|
|
41
|
+
let o = !1;
|
|
42
|
+
const s = (n) => {
|
|
43
|
+
o || k !== d || (o = !0, t(n));
|
|
44
|
+
};
|
|
45
|
+
try {
|
|
46
|
+
const n = r.fetchSuggestions(l, s);
|
|
47
|
+
Array.isArray(n) ? s(n) : n && Promise.resolve(n).then(
|
|
48
|
+
(p) => {
|
|
49
|
+
Array.isArray(p) && s(p);
|
|
50
|
+
},
|
|
51
|
+
() => s([])
|
|
52
|
+
);
|
|
53
|
+
} catch {
|
|
54
|
+
s([]);
|
|
55
|
+
}
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const x = S.value.filter((o) => r.filterMethod ? r.filterMethod(l, o) : l ? String(o.value ?? "").includes(l) : !0);
|
|
59
|
+
t(x);
|
|
60
|
+
}
|
|
61
|
+
function B(e) {
|
|
62
|
+
u("update:modelValue", e);
|
|
63
|
+
}
|
|
64
|
+
function C(e) {
|
|
65
|
+
u("input", e);
|
|
66
|
+
}
|
|
67
|
+
function V(e) {
|
|
68
|
+
u("change", e);
|
|
69
|
+
}
|
|
70
|
+
function q(e) {
|
|
71
|
+
u("select", e);
|
|
72
|
+
}
|
|
73
|
+
function z(e) {
|
|
74
|
+
u("focus", e);
|
|
75
|
+
}
|
|
76
|
+
function I(e) {
|
|
77
|
+
u("blur", e);
|
|
78
|
+
}
|
|
79
|
+
function K() {
|
|
80
|
+
d += 1, u("clear");
|
|
81
|
+
}
|
|
82
|
+
function M() {
|
|
83
|
+
var e, t;
|
|
84
|
+
(t = (e = f.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
85
|
+
}
|
|
86
|
+
function $() {
|
|
87
|
+
var e, t;
|
|
88
|
+
(t = (e = f.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
89
|
+
}
|
|
90
|
+
return v({
|
|
91
|
+
querySearch: i,
|
|
92
|
+
focus: M,
|
|
93
|
+
blur: $
|
|
94
|
+
}), (e, t) => (T(), j(c(w), E({
|
|
95
|
+
ref_key: "autocompleteRef",
|
|
96
|
+
ref: f
|
|
97
|
+
}, c(g), {
|
|
98
|
+
"model-value": a.modelValue,
|
|
99
|
+
"fetch-suggestions": i,
|
|
100
|
+
placeholder: a.placeholder,
|
|
101
|
+
disabled: a.disabled,
|
|
102
|
+
clearable: a.clearable,
|
|
103
|
+
size: a.size,
|
|
104
|
+
teleported: a.teleported,
|
|
105
|
+
"append-to": a.appendTo,
|
|
106
|
+
"popper-class": A.value,
|
|
107
|
+
"onUpdate:modelValue": B,
|
|
108
|
+
onInput: C,
|
|
109
|
+
onChange: V,
|
|
110
|
+
onSelect: q,
|
|
111
|
+
onFocus: z,
|
|
112
|
+
onBlur: I,
|
|
113
|
+
onClear: K
|
|
114
|
+
}), L({ _: 2 }, [
|
|
115
|
+
e.$slots.default ? {
|
|
116
|
+
name: "default",
|
|
117
|
+
fn: h(({ item: l }) => [
|
|
118
|
+
y(e.$slots, "default", { item: l })
|
|
119
|
+
]),
|
|
120
|
+
key: "0"
|
|
121
|
+
} : void 0,
|
|
122
|
+
Q(["prefix", "suffix", "prepend", "append"].filter((l) => e.$slots[l]), (l) => ({
|
|
123
|
+
name: l,
|
|
124
|
+
fn: h(() => [
|
|
125
|
+
y(e.$slots, l)
|
|
126
|
+
])
|
|
127
|
+
}))
|
|
128
|
+
]), 1040, ["model-value", "placeholder", "disabled", "clearable", "size", "teleported", "append-to", "popper-class"]));
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
export {
|
|
132
|
+
H as _
|
|
133
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElInputTag as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as K, useAttrs as O, ref as p, computed as d, openBlock as _, createBlock as j, unref as w, mergeProps as D, createSlots as F, withCtx as s, renderSlot as c } from "vue";
|
|
2
|
+
import { ElInputTag as L } from "element-plus";
|
|
3
|
+
const W = /* @__PURE__ */ K({
|
|
4
4
|
name: "QyInputTag",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "index",
|
|
@@ -12,7 +12,7 @@ const M = /* @__PURE__ */ S({
|
|
|
12
12
|
tagEffect: { default: "light" },
|
|
13
13
|
size: {},
|
|
14
14
|
clearable: { type: Boolean },
|
|
15
|
-
disabled: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean, default: void 0 },
|
|
16
16
|
readonly: { type: Boolean },
|
|
17
17
|
placeholder: {},
|
|
18
18
|
autofocus: { type: Boolean },
|
|
@@ -25,9 +25,9 @@ const M = /* @__PURE__ */ S({
|
|
|
25
25
|
ariaLabel: {}
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:modelValue", "change", "input", "add", "remove", "clear", "focus", "blur"],
|
|
28
|
-
setup(g, { expose: m, emit:
|
|
29
|
-
const t = g, l =
|
|
30
|
-
Object.entries(
|
|
28
|
+
setup(g, { expose: m, emit: h }) {
|
|
29
|
+
const t = g, l = h, v = O(), u = p(null), o = p(null), y = d(() => Object.fromEntries(
|
|
30
|
+
Object.entries(v).filter(
|
|
31
31
|
([e]) => e === "class" || e === "style" || e === "title" || e === "role" || e.startsWith("data-") || e.startsWith("aria-")
|
|
32
32
|
)
|
|
33
33
|
)), x = d(
|
|
@@ -35,55 +35,60 @@ const M = /* @__PURE__ */ S({
|
|
|
35
35
|
), b = d(
|
|
36
36
|
() => t.trigger === "space" ? "Space" : "Enter"
|
|
37
37
|
);
|
|
38
|
-
function
|
|
38
|
+
function r(e) {
|
|
39
39
|
return e ? [...e] : [];
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function T(e, a) {
|
|
42
42
|
if (e.length !== a.length + 1) return null;
|
|
43
43
|
for (let n = 0; n < e.length; n += 1)
|
|
44
|
-
if (e[n] !== a[n] && e.slice(n + 1).every((
|
|
44
|
+
if (e[n] !== a[n] && e.slice(n + 1).every((i, k) => i === a[n + k]))
|
|
45
45
|
return { value: e[n], index: n };
|
|
46
46
|
return { value: e[e.length - 1], index: e.length - 1 };
|
|
47
47
|
}
|
|
48
|
-
function T(e) {
|
|
49
|
-
const a = u(t.modelValue), n = u(e);
|
|
50
|
-
o.value = n.length === 0 && a.length > 0 ? null : y(a, n), l("update:modelValue", n);
|
|
51
|
-
}
|
|
52
48
|
function B(e) {
|
|
53
|
-
|
|
49
|
+
if (t.readonly) return;
|
|
50
|
+
const a = r(t.modelValue), n = r(e);
|
|
51
|
+
o.value = n.length === 0 && a.length > 0 ? null : T(a, n), l("update:modelValue", n);
|
|
54
52
|
}
|
|
55
53
|
function C(e) {
|
|
56
|
-
l("
|
|
54
|
+
t.readonly || l("change", r(e));
|
|
55
|
+
}
|
|
56
|
+
function E(e) {
|
|
57
|
+
t.readonly || l("input", e);
|
|
57
58
|
}
|
|
58
59
|
function V(e) {
|
|
59
|
-
l("add", e);
|
|
60
|
+
t.readonly || l("add", e);
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
62
|
+
function R(e) {
|
|
63
|
+
if (t.readonly) return;
|
|
64
|
+
const a = o.value, n = (a == null ? void 0 : a.value) === e ? a.index : r(t.modelValue).indexOf(e);
|
|
63
65
|
l("remove", e, n), o.value = null;
|
|
64
66
|
}
|
|
65
|
-
function
|
|
66
|
-
l("clear"), o.value = null;
|
|
67
|
+
function $() {
|
|
68
|
+
t.readonly || (l("clear"), o.value = null);
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
+
function f(e) {
|
|
71
|
+
!t.readonly || !["Enter", "NumpadEnter", "Space", " ", "Backspace", "Delete"].includes(e.code || e.key) || (e.preventDefault(), e.stopPropagation());
|
|
70
72
|
}
|
|
71
73
|
function z(e) {
|
|
74
|
+
l("focus", e);
|
|
75
|
+
}
|
|
76
|
+
function A(e) {
|
|
72
77
|
l("blur", e);
|
|
73
78
|
}
|
|
74
|
-
function
|
|
79
|
+
function I() {
|
|
75
80
|
var e, a;
|
|
76
|
-
(a = (e =
|
|
81
|
+
(a = (e = u.value) == null ? void 0 : e.focus) == null || a.call(e);
|
|
77
82
|
}
|
|
78
|
-
function
|
|
83
|
+
function S() {
|
|
79
84
|
var e, a;
|
|
80
|
-
(a = (e =
|
|
85
|
+
(a = (e = u.value) == null ? void 0 : e.blur) == null || a.call(e);
|
|
81
86
|
}
|
|
82
|
-
return m({ focus:
|
|
87
|
+
return m({ focus: I, blur: S }), (e, a) => (_(), j(w(L), D({
|
|
83
88
|
ref_key: "inputTagRef",
|
|
84
|
-
ref:
|
|
89
|
+
ref: u,
|
|
85
90
|
class: "qy-input-tag"
|
|
86
|
-
},
|
|
91
|
+
}, y.value, {
|
|
87
92
|
"model-value": t.modelValue,
|
|
88
93
|
max: t.max,
|
|
89
94
|
"tag-type": x.value,
|
|
@@ -93,6 +98,7 @@ const M = /* @__PURE__ */ S({
|
|
|
93
98
|
clearable: t.clearable,
|
|
94
99
|
disabled: t.disabled,
|
|
95
100
|
readonly: t.readonly,
|
|
101
|
+
"save-on-blur": !t.readonly,
|
|
96
102
|
placeholder: t.placeholder,
|
|
97
103
|
autofocus: t.autofocus,
|
|
98
104
|
"validate-event": t.validateEvent,
|
|
@@ -102,21 +108,23 @@ const M = /* @__PURE__ */ S({
|
|
|
102
108
|
minlength: t.minlength,
|
|
103
109
|
autocomplete: t.autocomplete,
|
|
104
110
|
"aria-label": t.ariaLabel,
|
|
105
|
-
"onUpdate:modelValue":
|
|
106
|
-
onChange:
|
|
107
|
-
onInput:
|
|
111
|
+
"onUpdate:modelValue": B,
|
|
112
|
+
onChange: C,
|
|
113
|
+
onInput: E,
|
|
108
114
|
onAddTag: V,
|
|
109
|
-
onRemoveTag:
|
|
110
|
-
onClear:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
onRemoveTag: R,
|
|
116
|
+
onClear: $,
|
|
117
|
+
onKeydownCapture: f,
|
|
118
|
+
onKeyupCapture: f,
|
|
119
|
+
onFocusCapture: z,
|
|
120
|
+
onBlurCapture: A
|
|
121
|
+
}), F({ _: 2 }, [
|
|
114
122
|
e.$slots.tag ? {
|
|
115
123
|
name: "tag",
|
|
116
|
-
fn: s(({ value: n, index:
|
|
124
|
+
fn: s(({ value: n, index: i }) => [
|
|
117
125
|
c(e.$slots, "tag", {
|
|
118
126
|
value: n,
|
|
119
|
-
index:
|
|
127
|
+
index: i
|
|
120
128
|
})
|
|
121
129
|
]),
|
|
122
130
|
key: "0"
|
|
@@ -135,9 +143,9 @@ const M = /* @__PURE__ */ S({
|
|
|
135
143
|
]),
|
|
136
144
|
key: "2"
|
|
137
145
|
} : void 0
|
|
138
|
-
]), 1040, ["model-value", "max", "tag-type", "tag-effect", "trigger", "size", "clearable", "disabled", "readonly", "placeholder", "autofocus", "validate-event", "id", "tabindex", "maxlength", "minlength", "autocomplete", "aria-label"]));
|
|
146
|
+
]), 1040, ["model-value", "max", "tag-type", "tag-effect", "trigger", "size", "clearable", "disabled", "readonly", "save-on-blur", "placeholder", "autofocus", "validate-event", "id", "tabindex", "maxlength", "minlength", "autocomplete", "aria-label"]));
|
|
139
147
|
}
|
|
140
148
|
});
|
|
141
149
|
export {
|
|
142
|
-
|
|
150
|
+
W as _
|
|
143
151
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { defineComponent as m, computed as s, ref as c, watch as f, onBeforeUnmount as p, openBlock as x, createBlock as h, unref as v, createCommentVNode as I } from "vue";
|
|
2
|
+
import { useZIndex as y, ElImageViewer as B } from "element-plus";
|
|
3
|
+
import { r as C } from "./overlay-stack-CFFRngnU.mjs";
|
|
4
|
+
import { n as g, a as k } from "./utils-CUXINmHY.mjs";
|
|
5
|
+
const P = /* @__PURE__ */ m({
|
|
6
|
+
name: "QyImagePreview",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
open: { type: Boolean, default: !1 },
|
|
10
|
+
urlList: { default: () => [] },
|
|
11
|
+
initialIndex: { default: 0 },
|
|
12
|
+
hideOnClickModal: { type: Boolean, default: !0 }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:open", "close"],
|
|
15
|
+
setup(n, { emit: d }) {
|
|
16
|
+
const o = n, l = d, i = s(
|
|
17
|
+
() => o.urlList.map((t) => g(t)).filter(Boolean)
|
|
18
|
+
);
|
|
19
|
+
let e;
|
|
20
|
+
const a = c(0), { nextZIndex: r } = y();
|
|
21
|
+
f(() => o.open && i.value.length > 0, (t) => {
|
|
22
|
+
t ? (a.value = C(r()), e ?? (e = k())) : (e == null || e(), e = void 0);
|
|
23
|
+
}, { immediate: !0, flush: "sync" }), p(() => e == null ? void 0 : e());
|
|
24
|
+
function u() {
|
|
25
|
+
l("update:open", !1), l("close");
|
|
26
|
+
}
|
|
27
|
+
return (t, z) => n.open && i.value.length ? (x(), h(v(B), {
|
|
28
|
+
key: 0,
|
|
29
|
+
"url-list": i.value,
|
|
30
|
+
"initial-index": n.initialIndex,
|
|
31
|
+
"hide-on-click-modal": n.hideOnClickModal,
|
|
32
|
+
teleported: !0,
|
|
33
|
+
"z-index": a.value,
|
|
34
|
+
onClose: u
|
|
35
|
+
}, null, 8, ["url-list", "initial-index", "hide-on-click-modal", "z-index"])) : I("", !0);
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export {
|
|
39
|
+
P as _
|
|
40
|
+
};
|