@qynpm/ui 1.0.43 → 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-DAztNKSp.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-DXZ6Y6wd.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 +2 -3
- 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-7MG12FbD.mjs +0 -2362
- package/dist/shared/index-BEcS8y8g.mjs +0 -68
- package/dist/shared/index-BSTMCPDj.mjs +0 -72
- package/dist/shared/index-BhvOSOfi.mjs +0 -766
- package/dist/shared/index-CGq7Q_hV.mjs +0 -119
- package/dist/shared/index-CVYNG8Fc.cjs +0 -1
- package/dist/shared/index-CbNd9JEx.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-d76Z3yrB.cjs +0 -1
- package/dist/shared/index-rSrDnOpu.cjs +0 -1
- 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
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as R, useAttrs as T, ref as _, computed as d, onMounted as H, onBeforeUnmount as I, openBlock as i, createElementBlock as l, mergeProps as N, unref as A, renderSlot as s, createElementVNode as u, normalizeProps as K, guardReactiveProps as W, toDisplayString as k, withDirectives as F, normalizeStyle as M, Fragment as Q, renderList as U, normalizeClass as X, createBlock as Y, resolveDynamicComponent as j, createCommentVNode as G, createTextVNode as w, vShow as J, nextTick as Z, markRaw as ee, toRaw as te } from "vue";
|
|
2
|
+
import { _ as ae } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
3
|
+
const oe = { class: "qy-dropdown__trigger-label" }, ne = ["aria-hidden"], de = ["disabled", "title", "data-qy-dropdown-key", "data-danger", "data-active", "data-disabled", "aria-disabled", "onClick"], re = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "qy-dropdown__item-icon",
|
|
6
6
|
"aria-hidden": "true"
|
|
7
|
-
},
|
|
7
|
+
}, ie = { class: "qy-dropdown__item-label" }, le = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "qy-dropdown__empty"
|
|
10
|
-
},
|
|
10
|
+
}, se = /* @__PURE__ */ R({
|
|
11
11
|
name: "QyDropdown",
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "index",
|
|
@@ -25,18 +25,18 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
25
25
|
},
|
|
26
26
|
emits: ["select", "open-change", "update:modelValue"],
|
|
27
27
|
setup(c, { emit: C }) {
|
|
28
|
-
const t = c, p = C, q =
|
|
28
|
+
const t = c, p = C, q = T(), f = _(null), v = _(!1), g = d(() => t.modelValue !== void 0), o = d(() => t.disabled ? !1 : g.value ? !!t.modelValue : v.value), m = d(() => t.items.filter((e) => !e.hidden)), D = d(() => t.panelWidth ?? t.width), x = d(() => [
|
|
29
29
|
`qy-dropdown--${t.placement}`,
|
|
30
30
|
{
|
|
31
31
|
"is-open": o.value,
|
|
32
32
|
"is-disabled": t.disabled
|
|
33
33
|
}
|
|
34
|
-
]),
|
|
35
|
-
width:
|
|
36
|
-
maxHeight:
|
|
34
|
+
]), S = d(() => ({
|
|
35
|
+
width: b(D.value),
|
|
36
|
+
maxHeight: b(t.maxHeight),
|
|
37
37
|
overflowX: "hidden",
|
|
38
38
|
overflowY: t.maxHeight ? "auto" : void 0
|
|
39
|
-
})),
|
|
39
|
+
})), y = d(() => ({
|
|
40
40
|
class: [
|
|
41
41
|
"qy-dropdown__trigger",
|
|
42
42
|
{
|
|
@@ -49,30 +49,28 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
49
49
|
"aria-haspopup": "menu",
|
|
50
50
|
"aria-expanded": o.value ? "true" : "false",
|
|
51
51
|
"aria-label": t.ariaLabel || void 0,
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: B,
|
|
53
53
|
onContextmenu: V,
|
|
54
|
-
onKeydown:
|
|
54
|
+
onKeydown: E
|
|
55
55
|
}));
|
|
56
|
-
function
|
|
56
|
+
function b(e) {
|
|
57
57
|
return typeof e == "number" ? `${e}px` : e;
|
|
58
58
|
}
|
|
59
59
|
function r(e) {
|
|
60
|
-
t.disabled || e === o.value || (
|
|
60
|
+
t.disabled || e === o.value || (g.value || (v.value = e), p("update:modelValue", e), p("open-change", e));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function B(e) {
|
|
63
63
|
t.trigger !== "click" || t.disabled || (e.stopPropagation(), r(!o.value));
|
|
64
64
|
}
|
|
65
65
|
function V(e) {
|
|
66
66
|
t.trigger !== "contextmenu" || t.disabled || (e.preventDefault(), e.stopPropagation(), r(!0));
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
t.trigger === "click" && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(!o.value));
|
|
75
|
-
}
|
|
68
|
+
function E(e) {
|
|
69
|
+
t.disabled || t.trigger === "click" && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r(!o.value));
|
|
70
|
+
}
|
|
71
|
+
async function $(e) {
|
|
72
|
+
var n, a;
|
|
73
|
+
e.key !== "Escape" || !o.value || (e.preventDefault(), e.stopPropagation(), r(!1), await Z(), o.value || (a = (n = f.value) == null ? void 0 : n.querySelector(".qy-dropdown__trigger")) == null || a.focus());
|
|
76
74
|
}
|
|
77
75
|
function z(e, n) {
|
|
78
76
|
if (e.disabled) {
|
|
@@ -81,7 +79,7 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
81
79
|
}
|
|
82
80
|
p("select", e), t.closeOnSelect && r(!1);
|
|
83
81
|
}
|
|
84
|
-
function
|
|
82
|
+
function L(e) {
|
|
85
83
|
return {
|
|
86
84
|
"is-disabled": e.disabled,
|
|
87
85
|
"is-danger": e.danger,
|
|
@@ -89,8 +87,8 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
89
87
|
"is-divided": e.divided
|
|
90
88
|
};
|
|
91
89
|
}
|
|
92
|
-
function
|
|
93
|
-
return e ?
|
|
90
|
+
function P(e) {
|
|
91
|
+
return e ? ee(te(e)) : void 0;
|
|
94
92
|
}
|
|
95
93
|
function h(e) {
|
|
96
94
|
var a;
|
|
@@ -104,29 +102,30 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
104
102
|
}), (e, n) => (i(), l("div", N({
|
|
105
103
|
ref_key: "rootRef",
|
|
106
104
|
ref: f
|
|
107
|
-
},
|
|
108
|
-
class: ["qy-dropdown", x.value]
|
|
105
|
+
}, A(q), {
|
|
106
|
+
class: ["qy-dropdown", x.value],
|
|
107
|
+
onKeydown: $
|
|
109
108
|
}), [
|
|
110
109
|
s(e.$slots, "trigger", {
|
|
111
110
|
open: o.value,
|
|
112
111
|
disabled: c.disabled,
|
|
113
|
-
attrs:
|
|
112
|
+
attrs: y.value
|
|
114
113
|
}, () => [
|
|
115
|
-
u("button",
|
|
116
|
-
u("span",
|
|
114
|
+
u("button", K(W(y.value)), [
|
|
115
|
+
u("span", oe, k(c.ariaLabel || "更多"), 1)
|
|
117
116
|
], 16)
|
|
118
117
|
], !0),
|
|
119
|
-
|
|
118
|
+
F(u("div", {
|
|
120
119
|
class: "qy-dropdown__panel",
|
|
121
|
-
style:
|
|
120
|
+
style: M(S.value),
|
|
122
121
|
"aria-hidden": o.value ? void 0 : "true",
|
|
123
122
|
role: "menu"
|
|
124
123
|
}, [
|
|
125
124
|
s(e.$slots, "header", {}, void 0, !0),
|
|
126
|
-
|
|
125
|
+
m.value.length > 0 ? (i(!0), l(Q, { key: 0 }, U(m.value, (a) => (i(), l("button", {
|
|
127
126
|
key: a.key,
|
|
128
127
|
type: "button",
|
|
129
|
-
class:
|
|
128
|
+
class: X(["qy-dropdown__item", L(a)]),
|
|
130
129
|
disabled: a.disabled,
|
|
131
130
|
title: a.title,
|
|
132
131
|
"data-qy-dropdown-key": a.key,
|
|
@@ -137,26 +136,26 @@ const te = { class: "qy-dropdown__trigger-label" }, ae = ["aria-hidden"], oe = [
|
|
|
137
136
|
role: "menuitem",
|
|
138
137
|
onClick: (O) => z(a, O)
|
|
139
138
|
}, [
|
|
140
|
-
a.icon ? (i(), l("span",
|
|
141
|
-
(i(),
|
|
142
|
-
])) :
|
|
143
|
-
u("span",
|
|
139
|
+
a.icon ? (i(), l("span", re, [
|
|
140
|
+
(i(), Y(j(P(a.icon))))
|
|
141
|
+
])) : G("", !0),
|
|
142
|
+
u("span", ie, [
|
|
144
143
|
s(e.$slots, "item", { item: a }, () => [
|
|
145
|
-
w(
|
|
144
|
+
w(k(a.label), 1)
|
|
146
145
|
], !0)
|
|
147
146
|
])
|
|
148
|
-
], 10,
|
|
147
|
+
], 10, de))), 128)) : (i(), l("div", le, [
|
|
149
148
|
s(e.$slots, "empty", {}, () => [
|
|
150
149
|
n[0] || (n[0] = w("暂无数据", -1))
|
|
151
150
|
], !0)
|
|
152
151
|
])),
|
|
153
152
|
s(e.$slots, "footer", {}, void 0, !0)
|
|
154
|
-
], 12,
|
|
155
|
-
[
|
|
153
|
+
], 12, ne), [
|
|
154
|
+
[J, o.value]
|
|
156
155
|
])
|
|
157
156
|
], 16));
|
|
158
157
|
}
|
|
159
|
-
}),
|
|
158
|
+
}), pe = /* @__PURE__ */ ae(se, [["__scopeId", "data-v-f0689274"]]);
|
|
160
159
|
export {
|
|
161
|
-
|
|
160
|
+
pe as D
|
|
162
161
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElTreeSelect as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as he, useAttrs as ye, ref as L, computed as k, watch as pe, toRaw as h, openBlock as ke, createBlock as be, unref as me, mergeProps as ve, createSlots as ge, withCtx as b, renderSlot as m } from "vue";
|
|
2
|
+
import { ElTreeSelect as Ce } from "element-plus";
|
|
3
|
+
import { _ as Ke } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
4
|
+
const xe = /* @__PURE__ */ he({
|
|
5
5
|
name: "QyTreeSelect",
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "index",
|
|
@@ -16,7 +16,8 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
16
16
|
props: { default: () => ({}) },
|
|
17
17
|
nodeKey: { default: void 0 },
|
|
18
18
|
placeholder: { default: "请选择" },
|
|
19
|
-
|
|
19
|
+
validateEvent: { type: Boolean, default: !0 },
|
|
20
|
+
disabled: { type: Boolean, default: void 0 },
|
|
20
21
|
clearable: { type: Boolean, default: !1 },
|
|
21
22
|
filterable: { type: Boolean, default: !1 },
|
|
22
23
|
filterMethod: { type: Function, default: void 0 },
|
|
@@ -52,88 +53,94 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
52
53
|
popperClass: { default: "" }
|
|
53
54
|
},
|
|
54
55
|
emits: ["update:modelValue", "change", "clear", "visible-change", "focus", "blur", "node-click", "node-expand", "node-collapse", "check-change", "check"],
|
|
55
|
-
setup(a, { expose:
|
|
56
|
-
const
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
setup(a, { expose: z, emit: $ }) {
|
|
57
|
+
const c = Symbol("invalid-tree-select-value"), n = a, r = $, F = ye(), B = L(null), D = k(() => n.data === void 0 ? n.options : n.data), W = L(n.defaultExpandedKeys ? [...n.defaultExpandedKeys] : void 0), I = L(n.defaultCheckedKeys ? [...n.defaultCheckedKeys] : void 0);
|
|
58
|
+
let y = /* @__PURE__ */ new WeakSet(), v = /* @__PURE__ */ new Set();
|
|
59
|
+
const f = /* @__PURE__ */ new Map();
|
|
60
|
+
let S = 0;
|
|
61
|
+
pe(D, (e, t) => {
|
|
62
|
+
S++, e !== t && f.clear(), y = /* @__PURE__ */ new WeakSet(), v = /* @__PURE__ */ new Set(), K(e), K(f.get(null));
|
|
63
|
+
for (const l of f.keys())
|
|
64
|
+
l && !y.has(l) && f.delete(l);
|
|
65
|
+
}, { immediate: !0, deep: !0 });
|
|
66
|
+
const P = k(() => Object.fromEntries(Object.entries(F).filter(
|
|
62
67
|
([e]) => e === "class" || e === "style" || e === "id" || e === "title" || e.startsWith("data-") || e.startsWith("aria-")
|
|
63
|
-
))),
|
|
64
|
-
const e =
|
|
65
|
-
if (e !==
|
|
68
|
+
))), R = k(() => ["qy-tree-select__popper", n.popperClass].filter(Boolean).join(" ")), q = k(() => {
|
|
69
|
+
const e = w(n.modelValue);
|
|
70
|
+
if (e !== c && Q(e) && !n.nodeKey)
|
|
66
71
|
throw new Error("QyTreeSelect object values require nodeKey");
|
|
67
|
-
return e ===
|
|
68
|
-
}),
|
|
72
|
+
return e === c ? void 0 : ce(e);
|
|
73
|
+
}), U = k(() => {
|
|
69
74
|
const e = n.props ?? {};
|
|
70
75
|
return {
|
|
71
|
-
value:
|
|
72
|
-
label:
|
|
73
|
-
children:
|
|
74
|
-
disabled:
|
|
75
|
-
isLeaf:
|
|
76
|
-
class:
|
|
76
|
+
value: p(e.value ?? n.nodeKey ?? n.valueKey),
|
|
77
|
+
label: p(e.label ?? n.labelKey),
|
|
78
|
+
children: p(e.children ?? n.childrenKey),
|
|
79
|
+
disabled: p(e.disabled ?? n.disabledKey),
|
|
80
|
+
isLeaf: p(e.isLeaf),
|
|
81
|
+
class: G(e.class)
|
|
77
82
|
};
|
|
78
83
|
});
|
|
79
84
|
function g(e) {
|
|
80
85
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : g(e) ?
|
|
87
|
+
function A(e) {
|
|
88
|
+
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : g(e) ? h(e) : c;
|
|
84
89
|
}
|
|
85
|
-
function
|
|
86
|
-
return e == null ? e : Array.isArray(e) ? e.every((t) =>
|
|
90
|
+
function w(e) {
|
|
91
|
+
return e == null ? e : Array.isArray(e) ? e.every((t) => A(t) !== c) ? e : c : A(e);
|
|
87
92
|
}
|
|
88
|
-
function
|
|
93
|
+
function Q(e) {
|
|
89
94
|
return Array.isArray(e) ? e.some(g) : g(e);
|
|
90
95
|
}
|
|
91
|
-
function
|
|
92
|
-
return g(e) ?
|
|
96
|
+
function C(e) {
|
|
97
|
+
return g(e) ? h(e) : null;
|
|
93
98
|
}
|
|
94
|
-
function
|
|
95
|
-
for (const t of e ?? [])
|
|
99
|
+
function K(e) {
|
|
100
|
+
for (const t of e ?? []) M(t);
|
|
96
101
|
}
|
|
97
|
-
function
|
|
98
|
-
const t =
|
|
99
|
-
|
|
100
|
-
|
|
102
|
+
function M(e) {
|
|
103
|
+
const t = h(e);
|
|
104
|
+
if (y.has(t)) return;
|
|
105
|
+
y.add(t), v.add(t);
|
|
106
|
+
const l = x("children", t);
|
|
101
107
|
if (Array.isArray(l))
|
|
102
108
|
for (const o of l) {
|
|
103
|
-
const d =
|
|
104
|
-
d &&
|
|
109
|
+
const d = C(o);
|
|
110
|
+
d && M(d);
|
|
105
111
|
}
|
|
112
|
+
K(f.get(t));
|
|
106
113
|
}
|
|
107
|
-
function
|
|
108
|
-
const t =
|
|
109
|
-
return t !== null &&
|
|
114
|
+
function i(e) {
|
|
115
|
+
const t = C(e);
|
|
116
|
+
return t !== null && y.has(t);
|
|
110
117
|
}
|
|
111
|
-
function
|
|
118
|
+
function x(e, t) {
|
|
112
119
|
var u;
|
|
113
120
|
const l = (u = n.props) == null ? void 0 : u[e], o = e === "value" ? n.valueKey : e === "label" ? n.labelKey : e === "children" ? n.childrenKey : e === "disabled" ? n.disabledKey : void 0, d = l ?? o;
|
|
114
121
|
return typeof d == "function" ? d(t) : typeof d == "string" ? t[d] : void 0;
|
|
115
122
|
}
|
|
116
|
-
function
|
|
123
|
+
function p(e) {
|
|
117
124
|
return typeof e == "function" ? (t) => e(t) : e;
|
|
118
125
|
}
|
|
119
|
-
function
|
|
126
|
+
function G(e) {
|
|
120
127
|
return typeof e != "function" ? e : (t, l) => {
|
|
121
128
|
const o = s(l);
|
|
122
|
-
return o &&
|
|
129
|
+
return o && i(t) ? e(t, o) : "";
|
|
123
130
|
};
|
|
124
131
|
}
|
|
125
|
-
function
|
|
132
|
+
function N(e) {
|
|
126
133
|
return typeof e == "string" || typeof e == "number" ? e : null;
|
|
127
134
|
}
|
|
128
135
|
function s(e) {
|
|
129
136
|
var l;
|
|
130
|
-
if (!e || !
|
|
131
|
-
const t =
|
|
137
|
+
if (!e || !i(e.data)) return null;
|
|
138
|
+
const t = C(e.data);
|
|
132
139
|
return t ? Object.freeze({
|
|
133
|
-
key:
|
|
134
|
-
parentKey:
|
|
140
|
+
key: N(e.key),
|
|
141
|
+
parentKey: N((l = e.parent) == null ? void 0 : l.key),
|
|
135
142
|
data: t,
|
|
136
|
-
label: typeof e.label == "string" ? e.label : String(
|
|
143
|
+
label: typeof e.label == "string" ? e.label : String(x("label", t) ?? ""),
|
|
137
144
|
level: typeof e.level == "number" ? e.level : 0,
|
|
138
145
|
expanded: e.expanded === !0,
|
|
139
146
|
checked: e.checked === !0,
|
|
@@ -146,7 +153,7 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
146
153
|
childCount: Array.isArray(e.childNodes) ? e.childNodes.length : 0
|
|
147
154
|
}) : null;
|
|
148
155
|
}
|
|
149
|
-
function
|
|
156
|
+
function H(e) {
|
|
150
157
|
return Object.freeze({
|
|
151
158
|
key: null,
|
|
152
159
|
parentKey: null,
|
|
@@ -164,126 +171,127 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
164
171
|
childCount: Array.isArray(e.childNodes) ? e.childNodes.length : 0
|
|
165
172
|
});
|
|
166
173
|
}
|
|
167
|
-
function
|
|
174
|
+
function J(e, t, l) {
|
|
168
175
|
const o = s(l);
|
|
169
|
-
return !o || !
|
|
176
|
+
return !o || !i(t) ? !1 : n.filterNodeMethod ? n.filterNodeMethod(e, t, o) : String(o.label).toLocaleLowerCase().includes(String(e ?? "").toLocaleLowerCase());
|
|
170
177
|
}
|
|
171
|
-
function
|
|
178
|
+
function X(e, t, l) {
|
|
172
179
|
if (!n.load) return t([]);
|
|
173
|
-
const o = e.level === 0 || e.data === void 0 || e.data === null, d =
|
|
180
|
+
const o = e.level === 0 || e.data === void 0 || e.data === null, d = S, u = s(e) ?? (o ? H(e) : null);
|
|
174
181
|
if (!u) return l();
|
|
175
|
-
n.load(u, (
|
|
176
|
-
(o ?
|
|
182
|
+
n.load(u, (E) => {
|
|
183
|
+
(o ? S !== d : !i(u.data)) || (f.set(o ? null : u.data, E), K(E), t(E));
|
|
177
184
|
}, l);
|
|
178
185
|
}
|
|
179
|
-
function
|
|
180
|
-
const t =
|
|
181
|
-
t !==
|
|
186
|
+
function Y(e) {
|
|
187
|
+
const t = w(V(e));
|
|
188
|
+
t !== c && r("update:modelValue", t);
|
|
182
189
|
}
|
|
183
|
-
function
|
|
184
|
-
const t =
|
|
185
|
-
t !==
|
|
190
|
+
function Z(e) {
|
|
191
|
+
const t = w(V(e));
|
|
192
|
+
t !== c && r("change", t);
|
|
186
193
|
}
|
|
187
|
-
function
|
|
194
|
+
function _() {
|
|
188
195
|
r("clear");
|
|
189
196
|
}
|
|
190
|
-
function
|
|
197
|
+
function ee(e) {
|
|
191
198
|
r("visible-change", e);
|
|
192
199
|
}
|
|
193
|
-
function
|
|
200
|
+
function te(e) {
|
|
194
201
|
r("focus", e);
|
|
195
202
|
}
|
|
196
|
-
function
|
|
203
|
+
function le(e) {
|
|
197
204
|
r("blur", e);
|
|
198
205
|
}
|
|
199
|
-
function
|
|
206
|
+
function ae(e, t) {
|
|
200
207
|
const l = s(t);
|
|
201
|
-
l &&
|
|
208
|
+
l && i(e) && r("node-click", e, l);
|
|
202
209
|
}
|
|
203
|
-
function
|
|
210
|
+
function ne(e, t) {
|
|
204
211
|
const l = s(t);
|
|
205
|
-
l &&
|
|
212
|
+
l && i(e) && r("node-expand", e, l);
|
|
206
213
|
}
|
|
207
|
-
function
|
|
214
|
+
function oe(e, t) {
|
|
208
215
|
const l = s(t);
|
|
209
|
-
l &&
|
|
216
|
+
l && i(e) && r("node-collapse", e, l);
|
|
210
217
|
}
|
|
211
|
-
function
|
|
212
|
-
|
|
218
|
+
function de(e, t, l) {
|
|
219
|
+
i(e) && r("check-change", e, t, l);
|
|
213
220
|
}
|
|
214
|
-
function
|
|
215
|
-
return (e ?? []).map(
|
|
221
|
+
function O(e) {
|
|
222
|
+
return (e ?? []).map(C).filter((t) => t !== null && i(t));
|
|
216
223
|
}
|
|
217
|
-
function
|
|
218
|
-
return (e ?? []).map(
|
|
224
|
+
function j(e) {
|
|
225
|
+
return (e ?? []).map(N).filter((t) => t !== null);
|
|
219
226
|
}
|
|
220
|
-
function
|
|
221
|
-
|
|
222
|
-
checkedKeys:
|
|
223
|
-
checkedNodes:
|
|
224
|
-
halfCheckedKeys:
|
|
225
|
-
halfCheckedNodes:
|
|
227
|
+
function re(e, t) {
|
|
228
|
+
i(e) && r("check", e, {
|
|
229
|
+
checkedKeys: j(t == null ? void 0 : t.checkedKeys),
|
|
230
|
+
checkedNodes: O(t == null ? void 0 : t.checkedNodes),
|
|
231
|
+
halfCheckedKeys: j(t == null ? void 0 : t.halfCheckedKeys),
|
|
232
|
+
halfCheckedNodes: O(t == null ? void 0 : t.halfCheckedNodes)
|
|
226
233
|
});
|
|
227
234
|
}
|
|
228
|
-
function
|
|
229
|
-
for (const t of
|
|
230
|
-
if (Object.is(
|
|
235
|
+
function T(e) {
|
|
236
|
+
for (const t of v)
|
|
237
|
+
if (Object.is(h(x("value", t)), h(e))) return t;
|
|
231
238
|
}
|
|
232
|
-
function
|
|
239
|
+
function ie(e) {
|
|
233
240
|
if (n.nodeKey) {
|
|
234
|
-
for (const t of
|
|
241
|
+
for (const t of v)
|
|
235
242
|
if (Object.is(t[n.nodeKey], e)) return t;
|
|
236
243
|
}
|
|
237
244
|
}
|
|
238
|
-
function
|
|
245
|
+
function ce(e) {
|
|
239
246
|
if (!n.nodeKey || e === null || e === void 0) return e;
|
|
240
247
|
const t = (l) => {
|
|
241
|
-
const o =
|
|
242
|
-
return (o ?
|
|
248
|
+
const o = T(l);
|
|
249
|
+
return (o ? N(o[n.nodeKey]) : null) ?? l;
|
|
243
250
|
};
|
|
244
251
|
return Array.isArray(e) ? e.map(t) : t(e);
|
|
245
252
|
}
|
|
246
|
-
function
|
|
253
|
+
function V(e) {
|
|
247
254
|
if (!n.nodeKey) return e;
|
|
248
255
|
const t = (l) => {
|
|
249
|
-
const o =
|
|
250
|
-
return o ?
|
|
256
|
+
const o = ie(l);
|
|
257
|
+
return o ? x("value", o) : l;
|
|
251
258
|
};
|
|
252
259
|
return Array.isArray(e) ? e.map(t) : t(e);
|
|
253
260
|
}
|
|
254
|
-
function
|
|
261
|
+
function se(e, t) {
|
|
255
262
|
return (e ?? []).flatMap((l) => {
|
|
256
|
-
const o =
|
|
257
|
-
if (o ===
|
|
258
|
-
const d =
|
|
263
|
+
const o = A(V(l.value));
|
|
264
|
+
if (o === c) return [];
|
|
265
|
+
const d = T(o);
|
|
259
266
|
return [Object.freeze({
|
|
260
267
|
value: o,
|
|
261
268
|
label: typeof l.currentLabel == "string" ? l.currentLabel : String(l.currentLabel ?? ""),
|
|
262
|
-
data: d ?
|
|
269
|
+
data: d ? h(d) : void 0,
|
|
263
270
|
closable: l.isDisabled !== !0,
|
|
264
271
|
remove: () => t == null ? void 0 : t(new MouseEvent("click"), l)
|
|
265
272
|
})];
|
|
266
273
|
});
|
|
267
274
|
}
|
|
268
|
-
function
|
|
275
|
+
function ue() {
|
|
269
276
|
var e, t;
|
|
270
|
-
(t = (e =
|
|
277
|
+
(t = (e = B.value) == null ? void 0 : e.focus) == null || t.call(e);
|
|
271
278
|
}
|
|
272
|
-
function
|
|
279
|
+
function fe() {
|
|
273
280
|
var e, t;
|
|
274
|
-
(t = (e =
|
|
281
|
+
(t = (e = B.value) == null ? void 0 : e.blur) == null || t.call(e);
|
|
275
282
|
}
|
|
276
|
-
return
|
|
283
|
+
return z({ focus: ue, blur: fe }), (e, t) => (ke(), be(me(Ce), ve({
|
|
277
284
|
ref_key: "treeSelectRef",
|
|
278
|
-
ref:
|
|
285
|
+
ref: B,
|
|
279
286
|
class: "qy-tree-select"
|
|
280
|
-
},
|
|
281
|
-
"model-value":
|
|
282
|
-
data:
|
|
283
|
-
props:
|
|
287
|
+
}, P.value, {
|
|
288
|
+
"model-value": q.value,
|
|
289
|
+
data: D.value,
|
|
290
|
+
props: U.value,
|
|
284
291
|
"node-key": a.nodeKey,
|
|
285
292
|
placeholder: a.placeholder,
|
|
286
293
|
disabled: a.disabled,
|
|
294
|
+
"validate-event": a.validateEvent,
|
|
287
295
|
clearable: a.clearable,
|
|
288
296
|
filterable: a.filterable,
|
|
289
297
|
"filter-method": a.filterMethod,
|
|
@@ -303,57 +311,57 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
303
311
|
"check-on-click-node": a.checkOnClickNode,
|
|
304
312
|
"check-on-click-leaf": a.checkOnClickLeaf,
|
|
305
313
|
"check-descendants": a.checkDescendants,
|
|
306
|
-
"default-expanded-keys":
|
|
307
|
-
"default-checked-keys":
|
|
314
|
+
"default-expanded-keys": W.value,
|
|
315
|
+
"default-checked-keys": I.value,
|
|
308
316
|
accordion: a.accordion,
|
|
309
317
|
indent: a.indent,
|
|
310
318
|
"highlight-current": a.highlightCurrent,
|
|
311
319
|
lazy: a.lazy,
|
|
312
|
-
load:
|
|
320
|
+
load: X,
|
|
313
321
|
"cache-data": a.cacheData,
|
|
314
|
-
"filter-node-method":
|
|
322
|
+
"filter-node-method": J,
|
|
315
323
|
size: a.size,
|
|
316
324
|
teleported: a.teleported,
|
|
317
325
|
"append-to": a.appendTo,
|
|
318
326
|
"fit-input-width": a.fitInputWidth,
|
|
319
|
-
"popper-class":
|
|
320
|
-
"onUpdate:modelValue":
|
|
321
|
-
onChange:
|
|
322
|
-
onClear:
|
|
323
|
-
onVisibleChange:
|
|
324
|
-
onFocus:
|
|
325
|
-
onBlur:
|
|
326
|
-
onNodeClick:
|
|
327
|
-
onNodeExpand:
|
|
328
|
-
onNodeCollapse:
|
|
329
|
-
onCheckChange:
|
|
330
|
-
onCheck:
|
|
331
|
-
}),
|
|
327
|
+
"popper-class": R.value,
|
|
328
|
+
"onUpdate:modelValue": Y,
|
|
329
|
+
onChange: Z,
|
|
330
|
+
onClear: _,
|
|
331
|
+
onVisibleChange: ee,
|
|
332
|
+
onFocus: te,
|
|
333
|
+
onBlur: le,
|
|
334
|
+
onNodeClick: ae,
|
|
335
|
+
onNodeExpand: ne,
|
|
336
|
+
onNodeCollapse: oe,
|
|
337
|
+
onCheckChange: de,
|
|
338
|
+
onCheck: re
|
|
339
|
+
}), ge({ _: 2 }, [
|
|
332
340
|
e.$slots.prefix ? {
|
|
333
341
|
name: "prefix",
|
|
334
|
-
fn:
|
|
335
|
-
|
|
342
|
+
fn: b(() => [
|
|
343
|
+
m(e.$slots, "prefix", {}, void 0, !0)
|
|
336
344
|
]),
|
|
337
345
|
key: "0"
|
|
338
346
|
} : void 0,
|
|
339
347
|
e.$slots.empty ? {
|
|
340
348
|
name: "empty",
|
|
341
|
-
fn:
|
|
342
|
-
|
|
349
|
+
fn: b(() => [
|
|
350
|
+
m(e.$slots, "empty", {}, void 0, !0)
|
|
343
351
|
]),
|
|
344
352
|
key: "1"
|
|
345
353
|
} : void 0,
|
|
346
354
|
e.$slots.loading ? {
|
|
347
355
|
name: "loading",
|
|
348
|
-
fn:
|
|
349
|
-
|
|
356
|
+
fn: b(() => [
|
|
357
|
+
m(e.$slots, "loading", {}, void 0, !0)
|
|
350
358
|
]),
|
|
351
359
|
key: "2"
|
|
352
360
|
} : void 0,
|
|
353
361
|
e.$slots.default ? {
|
|
354
362
|
name: "default",
|
|
355
|
-
fn:
|
|
356
|
-
|
|
363
|
+
fn: b((l) => [
|
|
364
|
+
m(e.$slots, "default", {
|
|
357
365
|
data: l.data,
|
|
358
366
|
node: s(l.node)
|
|
359
367
|
}, void 0, !0)
|
|
@@ -362,16 +370,16 @@ const Ce = /* @__PURE__ */ ue({
|
|
|
362
370
|
} : void 0,
|
|
363
371
|
e.$slots.tag ? {
|
|
364
372
|
name: "tag",
|
|
365
|
-
fn:
|
|
366
|
-
|
|
367
|
-
data:
|
|
373
|
+
fn: b((l) => [
|
|
374
|
+
m(e.$slots, "tag", {
|
|
375
|
+
data: se(l.data, l.deleteTag)
|
|
368
376
|
}, void 0, !0)
|
|
369
377
|
]),
|
|
370
378
|
key: "4"
|
|
371
379
|
} : void 0
|
|
372
|
-
]), 1040, ["model-value", "data", "props", "node-key", "placeholder", "disabled", "clearable", "filterable", "filter-method", "remote", "remote-method", "remote-show-suffix", "loading", "multiple", "multiple-limit", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "show-checkbox", "default-expand-all", "render-after-expand", "expand-on-click-node", "check-on-click-node", "check-on-click-leaf", "check-descendants", "default-expanded-keys", "default-checked-keys", "accordion", "indent", "highlight-current", "lazy", "cache-data", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
|
|
380
|
+
]), 1040, ["model-value", "data", "props", "node-key", "placeholder", "disabled", "validate-event", "clearable", "filterable", "filter-method", "remote", "remote-method", "remote-show-suffix", "loading", "multiple", "multiple-limit", "collapse-tags", "collapse-tags-tooltip", "check-strictly", "show-checkbox", "default-expand-all", "render-after-expand", "expand-on-click-node", "check-on-click-node", "check-on-click-leaf", "check-descendants", "default-expanded-keys", "default-checked-keys", "accordion", "indent", "highlight-current", "lazy", "cache-data", "size", "teleported", "append-to", "fit-input-width", "popper-class"]));
|
|
373
381
|
}
|
|
374
|
-
}),
|
|
382
|
+
}), Ae = /* @__PURE__ */ Ke(xe, [["__scopeId", "data-v-1cee15d2"]]);
|
|
375
383
|
export {
|
|
376
|
-
|
|
384
|
+
Ae as T
|
|
377
385
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue"),d=require("element-plus"),V=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),C=a.defineComponent({name:"QyCheckbox",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean],default:!1},value:{type:[String,Number,Boolean]},indeterminate:{type:Boolean,default:!1},validateEvent:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{default:void 0},trueValue:{type:[String,Number,Boolean],default:!0},falseValue:{type:[String,Number,Boolean],default:!1},name:{},id:{},tabindex:{},ariaLabel:{},ariaControls:{}},emits:["update:modelValue","change","focus","blur"],setup(s,{emit:c}){const e=s,l=c,f=a.useAttrs(),m=a.computed(()=>Object.fromEntries(Object.entries(f).filter(([t])=>t==="class"||t==="style"||t==="role"||t==="title"||t.startsWith("data-")||t.startsWith("aria-")))),o=a.inject(d.checkboxGroupContextKey,void 0),u=a.computed(()=>e.modelValue===e.trueValue),p=a.computed(()=>o?e.value!==void 0&&o.modelValue.value.includes(e.value):u.value);function i(t){return t?e.trueValue:e.falseValue}function b(t){e.disabled||l("update:modelValue",i(t===!0))}function v(t,n){if(e.disabled)return;l("change",i(t===!0));const r=n==null?void 0:n.target;r instanceof HTMLInputElement&&a.nextTick(()=>{r.checked=p.value})}function h(t){l("focus",t)}function x(t){l("blur",t)}return(t,n)=>(a.openBlock(),a.createBlock(a.unref(d.ElCheckbox),a.mergeProps(m.value,{class:"qy-checkbox","model-value":u.value,value:e.value,indeterminate:e.indeterminate,disabled:e.disabled||void 0,"validate-event":e.validateEvent,size:e.size,name:e.name,id:e.id,tabindex:e.tabindex,"aria-label":e.ariaLabel,"aria-controls":e.ariaControls,"onUpdate:modelValue":b,onChange:v,onFocusin:h,onFocusout:x}),{default:a.withCtx(()=>[a.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16,["model-value","value","indeterminate","disabled","validate-event","size","name","id","tabindex","aria-label","aria-controls"]))}}),_=V._export_sfc(C,[["__scopeId","data-v-34dd31e3"]]);exports.Checkbox=_;
|