st-comp 0.0.248 → 0.0.250
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/components.d.ts +1 -0
- package/es/ChartLayout.js +4 -4
- package/es/CustomFunction.cjs +2 -2
- package/es/CustomFunction.js +82 -80
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +36 -35
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +20 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +83 -82
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +19 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +22 -21
- package/es/LinearLegend.cjs +1 -1
- package/es/LinearLegend.js +63 -1
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +28 -26
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +121 -120
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +3 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +31 -30
- package/es/User.cjs +1 -1
- package/es/User.js +157 -155
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +29 -27
- package/es/VarietyAiHelper.cjs +4 -0
- package/es/VarietyAiHelper.js +276 -0
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +13 -12
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +70 -68
- package/es/{VarietySelect-2fd501da.cjs → VarietySelect-5c845562.cjs} +1 -1
- package/es/{VarietySelect-b9fe3000.js → VarietySelect-9f267958.js} +4 -4
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +24 -22
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +70 -70
- package/es/{_initCloneObject-3823a101.cjs → _initCloneObject-2b82e9f7.cjs} +1 -1
- package/es/{_initCloneObject-382335b2.js → _initCloneObject-69c8ae23.js} +7 -7
- package/es/aiTools.js +36 -0
- package/es/{base-ff0e366f.js → base-29f73b05.js} +40 -40
- package/es/{castArray-15070be9.js → castArray-609a313e.js} +1 -1
- package/es/{config-provider-2182708a.cjs → config-provider-2ae47cc8.cjs} +1 -1
- package/es/{config-provider-2e85eee8.js → config-provider-7860903c.js} +6 -6
- package/es/{debounce-e9e47f9a.js → debounce-a09ce9a3.js} +1 -1
- package/es/{dropdown-2b35a683.js → dropdown-497442b7.js} +30 -29
- package/es/dropdown-eba9eaf5.cjs +1 -0
- package/es/{el-autocomplete-18be2c5a.js → el-autocomplete-27c60cc8.js} +24 -23
- package/es/el-autocomplete-b59eb529.cjs +1 -0
- package/es/{el-button-68baab7b.cjs → el-button-974ff9e9.cjs} +1 -1
- package/es/{el-button-f08c0639.js → el-button-e2c63c08.js} +39 -39
- package/es/el-checkbox-08185353.cjs +1 -0
- package/es/{el-checkbox-058dba2d.js → el-checkbox-71ebd862.js} +31 -31
- package/es/el-dialog-1b185570.cjs +1 -0
- package/es/{el-dialog-d328e0d8.js → el-dialog-eedcfd3e.js} +15 -15
- package/es/{el-divider-4fe55ebe.js → el-divider-523e5874.js} +1 -1
- package/es/{el-empty-ceecb81c.js → el-empty-f5a1607a.js} +5 -5
- package/es/{el-form-item-cb328886.js → el-form-item-bdcfd297.js} +36 -36
- package/es/{el-form-item-4076e55f.cjs → el-form-item-c997b4fa.cjs} +1 -1
- package/es/{el-input-0f6ead19.js → el-input-d47281da.js} +91 -91
- package/es/el-input-fa18ef84.cjs +1 -0
- package/es/el-input-number-3d94fa58.cjs +1 -0
- package/es/{el-input-number-66e68609.js → el-input-number-c8018cb1.js} +28 -28
- package/es/{el-loading-412370c7.js → el-loading-0cd81d05.js} +5 -5
- package/es/{el-loading-05826e64.cjs → el-loading-969a79ca.cjs} +1 -1
- package/es/el-menu-item-26071fd6.cjs +1 -0
- package/es/{el-menu-item-0ee8ad18.js → el-menu-item-dac65bb3.js} +31 -30
- package/es/el-message-0ea8fbf8.cjs +1 -0
- package/es/el-message-4ed993c7.js +1 -0
- package/es/el-message-box-31e0aa98.cjs +1 -0
- package/es/{el-message-box-6db52b29.js → el-message-box-fea4fca8.js} +11 -11
- package/es/{el-overlay-981f8d49.js → el-overlay-1ee0338d.js} +63 -63
- package/es/el-overlay-ea65cb05.cjs +1 -0
- package/es/{el-popconfirm-005013fa.js → el-popconfirm-089b8bec.js} +17 -16
- package/es/el-popconfirm-9e232436.cjs +1 -0
- package/es/el-popper-2d3914e4.cjs +1 -0
- package/es/el-popper-c9b3d3cf.js +1662 -0
- package/es/el-segmented-140ac042.cjs +1 -0
- package/es/{el-segmented-050d0090.js → el-segmented-9d3a9e11.js} +8 -8
- package/es/el-select-a11f33e8.cjs +1 -0
- package/es/{el-select-23a1f302.js → el-select-e51e11c1.js} +92 -91
- package/es/{el-table-column-d0c374cf.js → el-table-column-05d292a8.js} +25 -24
- package/es/el-table-column-98570a4d.cjs +14 -0
- package/es/{el-tag-f13f463b.js → el-tag-17cd04a1.js} +14 -14
- package/es/el-tag-6d8e653e.cjs +1 -0
- package/es/{el-text-27cef2be.js → el-text-2710fff3.js} +2 -2
- package/es/{el-text-1470de46.cjs → el-text-a18106cb.cjs} +1 -1
- package/es/{index-09bd2621.js → index-0ee486ad.js} +43 -43
- package/es/index-0f79095c.js +440 -0
- package/es/{index-e0901394.js → index-1d9b50de.js} +34 -34
- package/es/index-28e03bad.cjs +1 -0
- package/es/{index-269b22da.cjs → index-299ee017.cjs} +1 -1
- package/es/{index-cebc7160.cjs → index-33f80550.cjs} +1 -1
- package/es/{index-4f48940d.cjs → index-37b8d3c6.cjs} +1 -1
- package/es/{index-2375023e.cjs → index-5befc414.cjs} +4 -4
- package/es/{index-696b6a94.cjs → index-6b99def3.cjs} +1 -1
- package/es/index-6ca95c8a.cjs +1 -0
- package/es/index-7dce9f59.cjs +1 -0
- package/es/{index-269b8a8c.js → index-8391a3df.js} +37 -37
- package/es/{index-c266c23a.js → index-8f9d0d17.js} +16 -15
- package/es/{index-15b9603e.js → index-95e5d454.js} +3 -3
- package/es/{index-b937ea22.js → index-b0117ba2.js} +2 -2
- package/es/{index-80a7ad32.js → index-bcd895a0.js} +17 -17
- package/es/{index-ec7ad93f.js → index-c2b9bbfd.js} +95 -65
- package/es/{index-4a3f30c5.js → index-c71e37dc.js} +11 -11
- package/es/{index-93a8960e.js → index-de24705f.js} +1 -1
- package/es/index-e8eeea22.cjs +1 -0
- package/es/{index-ee977f79.cjs → index-eb99b188.cjs} +1 -1
- package/es/{el-message-e6c755df.js → index-f30561d3.js} +33 -33
- package/es/{python-c67c8901.cjs → python-27ece6fa.cjs} +2 -2
- package/es/{python-823b276b.js → python-656db04f.js} +30 -28
- package/es/raf-744cf95a.js +6 -0
- package/es/{scroll-41b4f625.js → scroll-6799bafc.js} +5 -5
- package/es/style.css +1 -1
- package/es/{use-form-common-props-631cacae.js → use-form-common-props-cb0ca65c.js} +72 -72
- package/es/{use-form-common-props-344056f9.cjs → use-form-common-props-d3ed62c6.cjs} +1 -1
- package/es/{use-global-config-cf78ebac.cjs → use-global-config-c80f33a4.cjs} +1 -1
- package/es/{use-global-config-5d001623.js → use-global-config-cdaeca54.js} +14 -14
- package/es/{validator-3cad04b2.cjs → validator-07160325.cjs} +1 -1
- package/es/{validator-4160d9e7.js → validator-4ab9774f.js} +1 -1
- package/es/{vnode-06571d5b.js → vnode-a83e6de8.js} +1 -1
- package/es/{zh-cn-aabfaa94.cjs → zh-cn-6a0f844c.cjs} +1 -1
- package/es/{zh-cn-5df98ac2.js → zh-cn-8a6390a4.js} +2 -2
- package/lib/aiTools.js +36 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +157 -154
- package/lib/{index-f00d1e1f.js → index-b51777a3.js} +16211 -15934
- package/lib/{python-0f34e2e6.js → python-ac4949ec.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/VarietyAiHelper/index.ts +8 -0
- package/packages/VarietyAiHelper/index.vue +438 -0
- package/packages/index.ts +2 -0
- package/public/aiTools.js +36 -0
- package/src/App.vue +24 -14
- package/src/pages/VarietyAiHelper/index.vue +20 -0
- package/src/pages/VarietySearch/index.vue +76 -51
- package/src/router/routes.ts +5 -0
- package/es/dropdown-89b74bc9.cjs +0 -1
- package/es/el-autocomplete-b9a3054a.cjs +0 -1
- package/es/el-checkbox-b982e2ef.cjs +0 -1
- package/es/el-dialog-ad7309e9.cjs +0 -1
- package/es/el-input-172c49f8.cjs +0 -1
- package/es/el-input-number-c2e71528.cjs +0 -1
- package/es/el-menu-item-7f986598.cjs +0 -1
- package/es/el-message-a86c0efa.cjs +0 -1
- package/es/el-message-box-40ff2af5.cjs +0 -1
- package/es/el-overlay-d7a6e4a9.cjs +0 -1
- package/es/el-popconfirm-737a015b.cjs +0 -1
- package/es/el-popper-7ba87e05.cjs +0 -1
- package/es/el-popper-fdc7c793.js +0 -2094
- package/es/el-segmented-3fd66a0e.cjs +0 -1
- package/es/el-select-12f6deb7.cjs +0 -1
- package/es/el-table-column-516a0ed9.cjs +0 -14
- package/es/el-tag-789f05d3.cjs +0 -1
- package/es/index-8de94a49.cjs +0 -1
- package/es/index-c04f444f.cjs +0 -1
- package/es/raf-8e05a7f4.js +0 -6
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as g, b as E,
|
|
3
|
-
import {
|
|
1
|
+
import { a as f, u as _, r as b } from "./el-popper-c9b3d3cf.js";
|
|
2
|
+
import { _ as g, b as E, e as o } from "./base-29f73b05.js";
|
|
3
|
+
import { E as e } from "./index-0f79095c.js";
|
|
4
|
+
import { i as L } from "./use-form-common-props-cb0ca65c.js";
|
|
4
5
|
import { defineComponent as y, renderSlot as T, ref as I, provide as C, inject as $, onMounted as v, unref as m, onBeforeUnmount as h } from "vue";
|
|
5
6
|
const w = y({
|
|
6
7
|
inheritAttrs: !1
|
|
7
8
|
});
|
|
8
|
-
function M(n, r,
|
|
9
|
+
function M(n, r, s, l, a, d) {
|
|
9
10
|
return T(n.$slots, "default");
|
|
10
11
|
}
|
|
11
12
|
var A = /* @__PURE__ */ g(w, [["render", M], ["__file", "collection.vue"]]);
|
|
@@ -13,12 +14,12 @@ const B = y({
|
|
|
13
14
|
name: "ElCollectionItem",
|
|
14
15
|
inheritAttrs: !1
|
|
15
16
|
});
|
|
16
|
-
function K(n, r,
|
|
17
|
+
function K(n, r, s, l, a, d) {
|
|
17
18
|
return T(n.$slots, "default");
|
|
18
19
|
}
|
|
19
20
|
var P = /* @__PURE__ */ g(B, [["render", K], ["__file", "collection-item.vue"]]);
|
|
20
21
|
const x = "data-el-collection-item", Y = (n) => {
|
|
21
|
-
const r = `El${n}Collection`,
|
|
22
|
+
const r = `El${n}Collection`, s = `${r}Item`, l = Symbol(r), a = Symbol(s), d = {
|
|
22
23
|
...A,
|
|
23
24
|
name: r,
|
|
24
25
|
setup() {
|
|
@@ -26,10 +27,10 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
26
27
|
C(l, {
|
|
27
28
|
itemMap: c,
|
|
28
29
|
getItems: () => {
|
|
29
|
-
const
|
|
30
|
-
if (!
|
|
30
|
+
const i = m(u);
|
|
31
|
+
if (!i)
|
|
31
32
|
return [];
|
|
32
|
-
const t = Array.from(
|
|
33
|
+
const t = Array.from(i.querySelectorAll(`[${x}]`));
|
|
33
34
|
return [...c.values()].sort((N, S) => t.indexOf(N.ref) - t.indexOf(S.ref));
|
|
34
35
|
},
|
|
35
36
|
collectionRef: u
|
|
@@ -37,20 +38,20 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
37
38
|
}
|
|
38
39
|
}, O = {
|
|
39
40
|
...P,
|
|
40
|
-
name:
|
|
41
|
+
name: s,
|
|
41
42
|
setup(u, { attrs: c }) {
|
|
42
|
-
const p = I(),
|
|
43
|
+
const p = I(), i = $(l, void 0);
|
|
43
44
|
C(a, {
|
|
44
45
|
collectionItemRef: p
|
|
45
46
|
}), v(() => {
|
|
46
47
|
const t = m(p);
|
|
47
|
-
t &&
|
|
48
|
+
t && i.itemMap.set(t, {
|
|
48
49
|
ref: t,
|
|
49
50
|
...c
|
|
50
51
|
});
|
|
51
52
|
}), h(() => {
|
|
52
53
|
const t = m(p);
|
|
53
|
-
|
|
54
|
+
i.itemMap.delete(t);
|
|
54
55
|
});
|
|
55
56
|
}
|
|
56
57
|
};
|
|
@@ -60,7 +61,7 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
60
61
|
ElCollection: d,
|
|
61
62
|
ElCollectionItem: O
|
|
62
63
|
};
|
|
63
|
-
},
|
|
64
|
+
}, q = E({
|
|
64
65
|
trigger: f.trigger,
|
|
65
66
|
triggerKeys: {
|
|
66
67
|
type: o(Array),
|
|
@@ -140,7 +141,7 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
140
141
|
type: Boolean,
|
|
141
142
|
default: !0
|
|
142
143
|
}
|
|
143
|
-
}),
|
|
144
|
+
}), z = E({
|
|
144
145
|
command: {
|
|
145
146
|
type: [Object, String, Number],
|
|
146
147
|
default: () => ({})
|
|
@@ -151,28 +152,28 @@ const x = "data-el-collection-item", Y = (n) => {
|
|
|
151
152
|
icon: {
|
|
152
153
|
type: L
|
|
153
154
|
}
|
|
154
|
-
}),
|
|
155
|
+
}), G = E({
|
|
155
156
|
onKeydown: { type: o(Function) }
|
|
156
157
|
}), R = [
|
|
157
158
|
e.down,
|
|
158
159
|
e.pageDown,
|
|
159
160
|
e.home
|
|
160
|
-
], j = [e.up, e.pageUp, e.end],
|
|
161
|
-
ElCollection:
|
|
162
|
-
ElCollectionItem:
|
|
163
|
-
COLLECTION_INJECTION_KEY:
|
|
164
|
-
COLLECTION_ITEM_INJECTION_KEY:
|
|
161
|
+
], j = [e.up, e.pageUp, e.end], H = [...R, ...j], {
|
|
162
|
+
ElCollection: W,
|
|
163
|
+
ElCollectionItem: Q,
|
|
164
|
+
COLLECTION_INJECTION_KEY: X,
|
|
165
|
+
COLLECTION_ITEM_INJECTION_KEY: Z
|
|
165
166
|
} = Y("Dropdown");
|
|
166
167
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
Z as C,
|
|
169
|
+
W as E,
|
|
170
|
+
H as F,
|
|
170
171
|
j as L,
|
|
171
|
-
|
|
172
|
+
z as a,
|
|
172
173
|
x as b,
|
|
173
174
|
Y as c,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
q as d,
|
|
176
|
+
Q as e,
|
|
177
|
+
G as f,
|
|
178
|
+
X as g
|
|
178
179
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./el-popper-2d3914e4.cjs"),t=require("./base-ef747d02.cjs"),o=require("./index-28e03bad.cjs"),N=require("./use-form-common-props-d3ed62c6.cjs"),e=require("vue"),y=e.defineComponent({inheritAttrs:!1});function g(l,i,d,p,u,a){return e.renderSlot(l.$slots,"default")}var S=t._export_sfc(y,[["render",g],["__file","collection.vue"]]);const P=e.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function L(l,i,d,p,u,a){return e.renderSlot(l.$slots,"default")}var b=t._export_sfc(P,[["render",L],["__file","collection-item.vue"]]);const T="data-el-collection-item",_=l=>{const i=`El${l}Collection`,d=`${i}Item`,p=Symbol(i),u=Symbol(d),a={...S,name:i,setup(){const f=e.ref(),E=new Map,s=()=>{const c=e.unref(f);if(!c)return[];const n=Array.from(c.querySelectorAll(`[${T}]`));return[...E.values()].sort((I,O)=>n.indexOf(I.ref)-n.indexOf(O.ref))};e.provide(p,{itemMap:E,getItems:s,collectionRef:f})}},m={...b,name:d,setup(f,{attrs:E}){const s=e.ref(),c=e.inject(p,void 0);e.provide(u,{collectionItemRef:s}),e.onMounted(()=>{const n=e.unref(s);n&&c.itemMap.set(n,{ref:n,...E})}),e.onBeforeUnmount(()=>{const n=e.unref(s);c.itemMap.delete(n)})}};return{COLLECTION_INJECTION_KEY:p,COLLECTION_ITEM_INJECTION_KEY:u,ElCollection:a,ElCollectionItem:m}},v=t.buildProps({trigger:r.useTooltipTriggerProps.trigger,triggerKeys:{type:t.definePropType(Array),default:()=>[o.EVENT_CODE.enter,o.EVENT_CODE.numpadEnter,o.EVENT_CODE.space,o.EVENT_CODE.down]},virtualTriggering:r.useTooltipTriggerProps.virtualTriggering,virtualRef:r.useTooltipTriggerProps.virtualRef,effect:{...r.useTooltipContentProps.effect,default:"light"},type:{type:t.definePropType(String)},placement:{type:t.definePropType(String),default:"bottom"},popperOptions:{type:t.definePropType(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:t.definePropType([Number,String]),default:0},maxHeight:{type:t.definePropType([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,values:r.roleTypes,default:"menu"},buttonProps:{type:t.definePropType(Object)},teleported:r.useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0}}),w=t.buildProps({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:N.iconPropType}}),M=t.buildProps({onKeydown:{type:t.definePropType(Function)}}),$=[o.EVENT_CODE.down,o.EVENT_CODE.pageDown,o.EVENT_CODE.home],C=[o.EVENT_CODE.up,o.EVENT_CODE.pageUp,o.EVENT_CODE.end],h=[...$,...C],{ElCollection:K,ElCollectionItem:A,COLLECTION_INJECTION_KEY:D,COLLECTION_ITEM_INJECTION_KEY:V}=_("Dropdown");exports.COLLECTION_INJECTION_KEY=D;exports.COLLECTION_ITEM_INJECTION_KEY=V;exports.COLLECTION_ITEM_SIGN=T;exports.ElCollection=K;exports.ElCollectionItem=A;exports.FIRST_LAST_KEYS=h;exports.LAST_KEYS=C;exports.createCollectionWithScope=_;exports.dropdownItemProps=w;exports.dropdownMenuProps=M;exports.dropdownProps=v;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { defineComponent as oe, computed as k, useAttrs as Ce, ref as d, onBeforeUnmount as Se, onMounted as Ie, openBlock as b, createBlock as Ne, unref as t, withCtx as v, createElementVNode as X, normalizeClass as y, normalizeStyle as Y, createElementBlock as w, withModifiers as N, renderSlot as g, createCommentVNode as Z, createVNode as T, Fragment as Te, renderList as Ae, createTextVNode as Fe, toDisplayString as Pe, mergeProps as x, withKeys as C, createSlots as Ve } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { E as De, l as Oe } from "./index-
|
|
4
|
-
import { i as se, E as Ke } from "./el-input-
|
|
5
|
-
import { E as Re } from "./index-
|
|
6
|
-
import {
|
|
7
|
-
import { b as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
2
|
+
import { g as _e, x as Be } from "./use-form-common-props-cb0ca65c.js";
|
|
3
|
+
import { E as De, l as Oe } from "./index-c2b9bbfd.js";
|
|
4
|
+
import { i as se, E as Ke } from "./el-input-d47281da.js";
|
|
5
|
+
import { E as Re } from "./index-1d9b50de.js";
|
|
6
|
+
import { u as ee, E as Me } from "./el-popper-c9b3d3cf.js";
|
|
7
|
+
import { b as Ue, e as te, N as We, c as B, p as D, f as Le, u as He, _ as qe, j as O, w as je } from "./base-29f73b05.js";
|
|
8
|
+
import { U as A, I as K, C as le, p as ze, a as Ge } from "./index-0f79095c.js";
|
|
9
|
+
import { u as Je } from "./index-8391a3df.js";
|
|
10
|
+
import { d as Qe } from "./debounce-a09ce9a3.js";
|
|
11
|
+
const Xe = Ue({
|
|
11
12
|
...se,
|
|
12
13
|
valueKey: {
|
|
13
14
|
type: String,
|
|
@@ -35,7 +36,7 @@ const Xe = Le({
|
|
|
35
36
|
},
|
|
36
37
|
fetchSuggestions: {
|
|
37
38
|
type: te([Function, Array]),
|
|
38
|
-
default:
|
|
39
|
+
default: We
|
|
39
40
|
},
|
|
40
41
|
popperClass: {
|
|
41
42
|
type: String,
|
|
@@ -58,7 +59,7 @@ const Xe = Le({
|
|
|
58
59
|
focus: (l) => l instanceof FocusEvent,
|
|
59
60
|
blur: (l) => l instanceof FocusEvent,
|
|
60
61
|
clear: () => !0,
|
|
61
|
-
select: (l) =>
|
|
62
|
+
select: (l) => Le(l)
|
|
62
63
|
}, ae = "ElAutocomplete", Ze = oe({
|
|
63
64
|
name: ae,
|
|
64
65
|
inheritAttrs: !1
|
|
@@ -67,7 +68,7 @@ const Xe = Le({
|
|
|
67
68
|
props: Xe,
|
|
68
69
|
emits: Ye,
|
|
69
70
|
setup(l, { expose: ne, emit: i }) {
|
|
70
|
-
const n = l, re = k(() =>
|
|
71
|
+
const n = l, re = k(() => ze(n, Object.keys(se))), ue = Ce(), R = _e(), r = He("autocomplete"), p = d(), M = d(), S = d(), U = d();
|
|
71
72
|
let W = !1, F = !1;
|
|
72
73
|
const c = d([]), a = d(-1), L = d(""), f = d(!1), I = d(!1), h = d(!1), E = Je(), ie = k(() => ue.style), m = k(() => (c.value.length > 0 || h.value) && f.value), H = k(() => !n.hideLoading && h.value), ce = k(() => p.value ? Array.from(p.value.$el.querySelectorAll("input")) : []), pe = () => {
|
|
73
74
|
m.value && (L.value = `${p.value.$el.offsetWidth}px`);
|
|
@@ -77,7 +78,7 @@ const Xe = Le({
|
|
|
77
78
|
if (I.value)
|
|
78
79
|
return;
|
|
79
80
|
const o = (s) => {
|
|
80
|
-
h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) :
|
|
81
|
+
h.value = !1, !I.value && (O(s) ? (c.value = s, a.value = n.highlightFirstItem ? 0 : -1) : Ge(ae, "autocomplete suggestions must be an array"));
|
|
81
82
|
};
|
|
82
83
|
if (h.value = !0, O(n.fetchSuggestions))
|
|
83
84
|
o(n.fetchSuggestions);
|
|
@@ -85,13 +86,13 @@ const Xe = Le({
|
|
|
85
86
|
const s = await n.fetchSuggestions(e, o);
|
|
86
87
|
O(s) && o(s);
|
|
87
88
|
}
|
|
88
|
-
},
|
|
89
|
+
}, j = Qe(q, n.debounce), fe = (e) => {
|
|
89
90
|
const o = !!e;
|
|
90
91
|
if (i(K, e), i(A, e), I.value = !1, f.value || (f.value = o), !n.triggerOnFocus && !e) {
|
|
91
92
|
I.value = !0, c.value = [];
|
|
92
93
|
return;
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
j(e);
|
|
95
96
|
}, ve = (e) => {
|
|
96
97
|
var o;
|
|
97
98
|
R.value || (((o = e.target) == null ? void 0 : o.tagName) !== "INPUT" || ce.value.includes(document.activeElement)) && (f.value = !0);
|
|
@@ -104,7 +105,7 @@ const Xe = Le({
|
|
|
104
105
|
else {
|
|
105
106
|
f.value = !0, i("focus", e);
|
|
106
107
|
const s = (o = n.modelValue) != null ? o : "";
|
|
107
|
-
n.triggerOnFocus && !W &&
|
|
108
|
+
n.triggerOnFocus && !W && j(String(s));
|
|
108
109
|
}
|
|
109
110
|
}, he = (e) => {
|
|
110
111
|
setTimeout(() => {
|
|
@@ -117,7 +118,7 @@ const Xe = Le({
|
|
|
117
118
|
});
|
|
118
119
|
}, be = () => {
|
|
119
120
|
f.value = !1, i(A, ""), i("clear");
|
|
120
|
-
},
|
|
121
|
+
}, z = async () => {
|
|
121
122
|
var e;
|
|
122
123
|
(e = p.value) != null && e.isComposing || (m.value && a.value >= 0 && a.value < c.value.length ? P(c.value[a.value]) : n.selectWhenUnmatched && (i("select", { value: n.modelValue }), c.value = [], a.value = -1));
|
|
123
124
|
}, ye = (e) => {
|
|
@@ -169,13 +170,13 @@ const Xe = Le({
|
|
|
169
170
|
popperRef: S,
|
|
170
171
|
suggestions: c,
|
|
171
172
|
handleSelect: P,
|
|
172
|
-
handleKeyEnter:
|
|
173
|
+
handleKeyEnter: z,
|
|
173
174
|
focus: Ee,
|
|
174
175
|
blur: $e,
|
|
175
176
|
close: $,
|
|
176
177
|
highlight: V,
|
|
177
178
|
getData: q
|
|
178
|
-
}), (e, o) => (b(), Ne(t(
|
|
179
|
+
}), (e, o) => (b(), Ne(t(Me), {
|
|
179
180
|
ref_key: "popperRef",
|
|
180
181
|
ref: S,
|
|
181
182
|
visible: t(m),
|
|
@@ -283,7 +284,7 @@ const Xe = Le({
|
|
|
283
284
|
onKeydown: [
|
|
284
285
|
C(N((s) => V(a.value - 1), ["prevent"]), ["up"]),
|
|
285
286
|
C(N((s) => V(a.value + 1), ["prevent"]), ["down"]),
|
|
286
|
-
C(
|
|
287
|
+
C(z, ["enter"]),
|
|
287
288
|
C($, ["tab"]),
|
|
288
289
|
C(ye, ["esc"])
|
|
289
290
|
],
|
|
@@ -322,8 +323,8 @@ const Xe = Le({
|
|
|
322
323
|
}, 8, ["visible", "placement", "popper-class", "teleported", "append-to", "transition"]));
|
|
323
324
|
}
|
|
324
325
|
});
|
|
325
|
-
var et = /* @__PURE__ */
|
|
326
|
-
const
|
|
326
|
+
var et = /* @__PURE__ */ qe(xe, [["__file", "autocomplete.vue"]]);
|
|
327
|
+
const pt = je(et);
|
|
327
328
|
export {
|
|
328
|
-
|
|
329
|
+
pt as E
|
|
329
330
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),M=require("./use-form-common-props-d3ed62c6.cjs"),U=require("./index-33f80550.cjs"),$=require("./el-input-fa18ef84.cjs"),re=require("./index-e8eeea22.cjs"),S=require("./el-popper-2d3914e4.cjs"),n=require("./base-ef747d02.cjs"),p=require("./index-28e03bad.cjs"),ae=require("./index-9780a537.cjs"),ue=require("./debounce-62f5b6e8.cjs"),ie=n.buildProps({...$.inputProps,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:n.definePropType(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:n.definePropType([Function,Array]),default:n.NOOP},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:S.useTooltipContentProps.teleported,appendTo:S.useTooltipContentProps.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean}),ce={[p.UPDATE_MODEL_EVENT]:s=>n.isString(s)||n.isNumber(s),[p.INPUT_EVENT]:s=>n.isString(s)||n.isNumber(s),[p.CHANGE_EVENT]:s=>n.isString(s)||n.isNumber(s),focus:s=>s instanceof FocusEvent,blur:s=>s instanceof FocusEvent,clear:()=>!0,select:s=>n.isObject(s)},z="ElAutocomplete",de=e.defineComponent({name:z,inheritAttrs:!1}),pe=e.defineComponent({...de,props:ie,emits:ce,setup(s,{expose:L,emit:c}){const a=s,R=e.computed(()=>p.pick(a,Object.keys($.inputProps))),W=e.useAttrs(),T=M.useFormDisabled(),u=n.useNamespace("autocomplete"),f=e.ref(),A=e.ref(),b=e.ref(),P=e.ref();let V=!1,C=!1;const d=e.ref([]),r=e.ref(-1),I=e.ref(""),v=e.ref(!1),E=e.ref(!1),m=e.ref(!1),h=ae.useId(),H=e.computed(()=>W.style),g=e.computed(()=>(d.value.length>0||m.value)&&v.value),_=e.computed(()=>!a.hideLoading&&m.value),x=e.computed(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),G=()=>{g.value&&(I.value=`${f.value.$el.offsetWidth}px`)},j=()=>{r.value=-1},B=async t=>{if(E.value)return;const o=l=>{m.value=!1,!E.value&&(n.isArray(l)?(d.value=l,r.value=a.highlightFirstItem?0:-1):p.throwError(z,"autocomplete suggestions must be an array"))};if(m.value=!0,n.isArray(a.fetchSuggestions))o(a.fetchSuggestions);else{const l=await a.fetchSuggestions(t,o);n.isArray(l)&&o(l)}},D=ue.debounce(B,a.debounce),J=t=>{const o=!!t;if(c(p.INPUT_EVENT,t),c(p.UPDATE_MODEL_EVENT,t),E.value=!1,v.value||(v.value=o),!a.triggerOnFocus&&!t){E.value=!0,d.value=[];return}D(t)},Q=t=>{var o;T.value||(((o=t.target)==null?void 0:o.tagName)!=="INPUT"||x.value.includes(document.activeElement))&&(v.value=!0)},X=t=>{c(p.CHANGE_EVENT,t)},Y=t=>{var o;if(C)C=!1;else{v.value=!0,c("focus",t);const l=(o=a.modelValue)!=null?o:"";a.triggerOnFocus&&!V&&D(String(l))}},Z=t=>{setTimeout(()=>{var o;if((o=b.value)!=null&&o.isFocusInsideContent()){C=!0;return}v.value&&y(),c("blur",t)})},ee=()=>{v.value=!1,c(p.UPDATE_MODEL_EVENT,""),c("clear")},F=async()=>{var t;(t=f.value)!=null&&t.isComposing||(g.value&&r.value>=0&&r.value<d.value.length?w(d.value[r.value]):a.selectWhenUnmatched&&(c("select",{value:a.modelValue}),d.value=[],r.value=-1))},te=t=>{g.value&&(t.preventDefault(),t.stopPropagation(),y())},y=()=>{v.value=!1},oe=()=>{var t;(t=f.value)==null||t.focus()},le=()=>{var t;(t=f.value)==null||t.blur()},w=async t=>{c(p.INPUT_EVENT,t[a.valueKey]),c(p.UPDATE_MODEL_EVENT,t[a.valueKey]),c("select",t),d.value=[],r.value=-1},k=t=>{var o,l;if(!g.value||m.value)return;if(t<0){r.value=-1;return}t>=d.value.length&&(t=d.value.length-1);const i=A.value.querySelector(`.${u.be("suggestion","wrap")}`),se=i.querySelectorAll(`.${u.be("suggestion","list")} li`)[t],O=i.scrollTop,{offsetTop:K,scrollHeight:N}=se;K+N>O+i.clientHeight&&(i.scrollTop+=N),K<O&&(i.scrollTop-=N),r.value=t,(l=(o=f.value)==null?void 0:o.ref)==null||l.setAttribute("aria-activedescendant",`${h.value}-item-${r.value}`)},q=M.onClickOutside(P,()=>{var t;(t=b.value)!=null&&t.isFocusInsideContent()||g.value&&y()});return e.onBeforeUnmount(()=>{q==null||q()}),e.onMounted(()=>{var t;const o=(t=f.value)==null?void 0:t.ref;o&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${h.value}-item-${r.value}`}].forEach(({key:l,value:i})=>o.setAttribute(l,i)),V=o.hasAttribute("readonly"))}),L({highlightedIndex:r,activated:v,loading:m,inputRef:f,popperRef:b,suggestions:d,handleSelect:w,handleKeyEnter:F,focus:oe,blur:le,close:y,highlight:k,getData:B}),(t,o)=>(e.openBlock(),e.createBlock(e.unref(S.ElTooltip),{ref_key:"popperRef",ref:b,visible:e.unref(g),placement:t.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[e.unref(u).e("popper"),t.popperClass],teleported:t.teleported,"append-to":t.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${e.unref(u).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:G,onHide:j},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"regionRef",ref:A,class:e.normalizeClass([e.unref(u).b("suggestion"),e.unref(u).is("loading",e.unref(_))]),style:e.normalizeStyle({[t.fitInputWidth?"width":"minWidth"]:I.value,outline:"none"}),role:"region"},[t.$slots.header?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(u).be("suggestion","header")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"header")],10,["onClick"])):e.createCommentVNode("v-if",!0),e.createVNode(e.unref(re.ElScrollbar),{id:e.unref(h),tag:"ul","wrap-class":e.unref(u).be("suggestion","wrap"),"view-class":e.unref(u).be("suggestion","list"),role:"listbox"},{default:e.withCtx(()=>[e.unref(_)?(e.openBlock(),e.createElementBlock("li",{key:0},[e.renderSlot(t.$slots,"loading",{},()=>[e.createVNode(e.unref(U.ElIcon),{class:e.normalizeClass(e.unref(u).is("loading"))},{default:e.withCtx(()=>[e.createVNode(e.unref(U.loading_default))]),_:1},8,["class"])])])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value,(l,i)=>(e.openBlock(),e.createElementBlock("li",{id:`${e.unref(h)}-item-${i}`,key:i,class:e.normalizeClass({highlighted:r.value===i}),role:"option","aria-selected":r.value===i,onClick:ne=>w(l)},[e.renderSlot(t.$slots,"default",{item:l},()=>[e.createTextVNode(e.toDisplayString(l[t.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(u).be("suggestion","footer")),onClick:e.withModifiers(()=>{},["stop"])},[e.renderSlot(t.$slots,"footer")],10,["onClick"])):e.createCommentVNode("v-if",!0)],6)]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"listboxRef",ref:P,class:e.normalizeClass([e.unref(u).b(),t.$attrs.class]),style:e.normalizeStyle(e.unref(H)),role:"combobox","aria-haspopup":"listbox","aria-expanded":e.unref(g),"aria-owns":e.unref(h)},[e.createVNode(e.unref($.ElInput),e.mergeProps({ref_key:"inputRef",ref:f},e.mergeProps(e.unref(R),t.$attrs),{"model-value":t.modelValue,disabled:e.unref(T),onInput:J,onChange:X,onFocus:Y,onBlur:Z,onClear:ee,onKeydown:[e.withKeys(e.withModifiers(l=>k(r.value-1),["prevent"]),["up"]),e.withKeys(e.withModifiers(l=>k(r.value+1),["prevent"]),["down"]),e.withKeys(F,["enter"]),e.withKeys(y,["tab"]),e.withKeys(te,["esc"])],onMousedown:Q}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")])}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")])}:void 0,t.$slots.prefix?{name:"prefix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prefix")])}:void 0,t.$slots.suffix?{name:"suffix",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"suffix")])}:void 0]),1040,["model-value","disabled","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","append-to","transition"]))}});var fe=n._export_sfc(pe,[["__file","autocomplete.vue"]]);const ve=n.withInstall(fe);exports.ElAutocomplete=ve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),S=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),S=require("./index-33f80550.cjs"),z=require("./index-f1c702f6.cjs"),E=require("./use-global-config-c80f33a4.cjs"),b=require("./use-form-common-props-d3ed62c6.cjs"),p=require("./base-ef747d02.cjs"),I=require("./index-eea0bcb3.cjs"),N=Symbol("buttonGroupContextKey"),P=(o,u)=>{z.useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},e.computed(()=>o.type==="text"));const r=e.inject(N,void 0),l=E.useGlobalConfig("button"),{form:c}=b.useFormItem(),a=b.useFormSize(e.computed(()=>r==null?void 0:r.size)),n=b.useFormDisabled(),d=e.ref(),m=e.useSlots(),v=e.computed(()=>{var t;return o.type||(r==null?void 0:r.type)||((t=l.value)==null?void 0:t.type)||""}),g=e.computed(()=>{var t,s,i;return(i=(s=o.autoInsertSpace)!=null?s:(t=l.value)==null?void 0:t.autoInsertSpace)!=null?i:!1}),y=e.computed(()=>{var t,s,i;return(i=(s=o.plain)!=null?s:(t=l.value)==null?void 0:t.plain)!=null?i:!1}),_=e.computed(()=>{var t,s,i;return(i=(s=o.round)!=null?s:(t=l.value)==null?void 0:t.round)!=null?i:!1}),B=e.computed(()=>{var t,s,i;return(i=(s=o.text)!=null?s:(t=l.value)==null?void 0:t.text)!=null?i:!1}),k=e.computed(()=>o.tag==="button"?{ariaDisabled:n.value||o.loading,disabled:n.value||o.loading,autofocus:o.autofocus,type:o.nativeType}:{}),C=e.computed(()=>{var t;const s=(t=m.default)==null?void 0:t.call(m);if(g.value&&(s==null?void 0:s.length)===1){const i=s[0];if((i==null?void 0:i.type)===e.Text){const w=i.children;return/^\p{Unified_Ideograph}{2}$/u.test(w.trim())}}return!1});return{_disabled:n,_size:a,_type:v,_ref:d,_props:k,_plain:y,_round:_,_text:B,shouldAddSpace:C,handleClick:t=>{if(n.value||o.loading){t.stopPropagation();return}o.nativeType==="reset"&&(c==null||c.resetFields()),u("click",t)}}},$=["default","primary","success","warning","info","danger","text",""],T=["button","submit","reset"],h=p.buildProps({size:b.useSizeProp,disabled:Boolean,type:{type:String,values:$,default:""},icon:{type:b.iconPropType},nativeType:{type:String,values:T,default:"button"},loading:Boolean,loadingIcon:{type:b.iconPropType,default:()=>S.loading_default},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:p.definePropType([String,Object]),default:"button"}}),D={click:o=>o instanceof MouseEvent};function f(o,u=20){return o.mix("#141414",u).toString()}function G(o){const u=b.useFormDisabled(),r=p.useNamespace("button");return e.computed(()=>{let l={},c=o.color;if(c){const a=c.match(/var\((.*?)\)/);a&&(c=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const n=new I.TinyColor(c),d=o.dark?n.tint(20).toString():f(n,20);if(o.plain)l=r.cssVarBlock({"bg-color":o.dark?f(n,90):n.tint(90).toString(),"text-color":c,"border-color":o.dark?f(n,50):n.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":c,"hover-border-color":c,"active-bg-color":d,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":d}),u.value&&(l[r.cssVarBlockName("disabled-bg-color")]=o.dark?f(n,90):n.tint(90).toString(),l[r.cssVarBlockName("disabled-text-color")]=o.dark?f(n,50):n.tint(50).toString(),l[r.cssVarBlockName("disabled-border-color")]=o.dark?f(n,80):n.tint(80).toString());else{const m=o.dark?f(n,30):n.tint(30).toString(),v=n.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(l=r.cssVarBlock({"bg-color":c,"text-color":v,"border-color":c,"hover-bg-color":m,"hover-text-color":v,"hover-border-color":m,"active-bg-color":d,"active-border-color":d}),u.value){const g=o.dark?f(n,50):n.tint(50).toString();l[r.cssVarBlockName("disabled-bg-color")]=g,l[r.cssVarBlockName("disabled-text-color")]=o.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,l[r.cssVarBlockName("disabled-border-color")]=g}}}return l})}const q=e.defineComponent({name:"ElButton"}),F=e.defineComponent({...q,props:h,emits:D,setup(o,{expose:u,emit:r}){const l=o,c=G(l),a=p.useNamespace("button"),{_ref:n,_size:d,_type:m,_disabled:v,_props:g,_plain:y,_round:_,_text:B,shouldAddSpace:k,handleClick:C}=P(l,r),x=e.computed(()=>[a.b(),a.m(m.value),a.m(d.value),a.is("disabled",v.value),a.is("loading",l.loading),a.is("plain",y.value),a.is("round",_.value),a.is("circle",l.circle),a.is("text",B.value),a.is("link",l.link),a.is("has-bg",l.bg)]);return u({ref:n,size:d,type:m,disabled:v,shouldAddSpace:k}),(t,s)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({ref_key:"_ref",ref:n},e.unref(g),{class:e.unref(x),style:e.unref(c),onClick:e.unref(C)}),{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.$slots.loading?e.renderSlot(t.$slots,"loading",{key:0}):(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1,class:e.normalizeClass(e.unref(a).is("loading"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||t.$slots.icon?(e.openBlock(),e.createBlock(e.unref(S.ElIcon),{key:1},{default:e.withCtx(()=>[t.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.icon),{key:0})):e.renderSlot(t.$slots,"icon",{key:1})]),_:3})):e.createCommentVNode("v-if",!0),t.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass({[e.unref(a).em("text","expand")]:e.unref(k)})},[e.renderSlot(t.$slots,"default")],2)):e.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var K=p._export_sfc(F,[["__file","button.vue"]]);const j={size:h.size,type:h.type},A=e.defineComponent({name:"ElButtonGroup"}),R=e.defineComponent({...A,props:j,setup(o){const u=o;e.provide(N,e.reactive({size:e.toRef(u,"size"),type:e.toRef(u,"type")}));const r=p.useNamespace("button");return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(r).b("group"))},[e.renderSlot(l.$slots,"default")],2))}});var V=p._export_sfc(R,[["__file","button-group.vue"]]);const U=p.withInstall(K,{ButtonGroup:V});p.withNoopInstall(V);exports.ElButton=U;exports.buttonTypes=$;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as u, inject as M, ref as O, useSlots as R, Text as q, defineComponent as B, openBlock as m, createBlock as y, resolveDynamicComponent as N, mergeProps as H, unref as d, withCtx as V, createElementBlock as $, Fragment as J, renderSlot as k, normalizeClass as w, createCommentVNode as T, provide as L, reactive as Q, toRef as P } from "vue";
|
|
2
|
-
import { l as W, E as G } from "./index-
|
|
2
|
+
import { l as W, E as G } from "./index-c2b9bbfd.js";
|
|
3
3
|
import { u as X } from "./index-2e331d74.js";
|
|
4
|
-
import { a as Y } from "./use-global-config-
|
|
5
|
-
import {
|
|
6
|
-
import { b as ot,
|
|
4
|
+
import { a as Y } from "./use-global-config-cdaeca54.js";
|
|
5
|
+
import { d as Z, e as tt, g as F, h as et, i as D } from "./use-form-common-props-cb0ca65c.js";
|
|
6
|
+
import { b as ot, e as lt, u as I, _ as K, w as nt, l as at } from "./base-29f73b05.js";
|
|
7
7
|
import { T as rt } from "./index-657047bb.js";
|
|
8
|
-
const
|
|
8
|
+
const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
9
9
|
X({
|
|
10
10
|
from: "type.text",
|
|
11
11
|
replacement: "link",
|
|
@@ -13,21 +13,21 @@ const K = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
13
13
|
scope: "props",
|
|
14
14
|
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
15
15
|
}, u(() => t.type === "text"));
|
|
16
|
-
const
|
|
16
|
+
const n = M(j, void 0), l = Y("button"), { form: s } = Z(), a = tt(u(() => n == null ? void 0 : n.size)), o = F(), b = O(), v = R(), p = u(() => {
|
|
17
17
|
var e;
|
|
18
|
-
return t.type || (
|
|
18
|
+
return t.type || (n == null ? void 0 : n.type) || ((e = l.value) == null ? void 0 : e.type) || "";
|
|
19
19
|
}), g = u(() => {
|
|
20
20
|
var e, r, i;
|
|
21
|
-
return (i = (r = t.autoInsertSpace) != null ? r : (e =
|
|
21
|
+
return (i = (r = t.autoInsertSpace) != null ? r : (e = l.value) == null ? void 0 : e.autoInsertSpace) != null ? i : !1;
|
|
22
22
|
}), h = u(() => {
|
|
23
23
|
var e, r, i;
|
|
24
|
-
return (i = (r = t.plain) != null ? r : (e =
|
|
24
|
+
return (i = (r = t.plain) != null ? r : (e = l.value) == null ? void 0 : e.plain) != null ? i : !1;
|
|
25
25
|
}), S = u(() => {
|
|
26
26
|
var e, r, i;
|
|
27
|
-
return (i = (r = t.round) != null ? r : (e =
|
|
27
|
+
return (i = (r = t.round) != null ? r : (e = l.value) == null ? void 0 : e.round) != null ? i : !1;
|
|
28
28
|
}), C = u(() => {
|
|
29
29
|
var e, r, i;
|
|
30
|
-
return (i = (r = t.text) != null ? r : (e =
|
|
30
|
+
return (i = (r = t.text) != null ? r : (e = l.value) == null ? void 0 : e.text) != null ? i : !1;
|
|
31
31
|
}), _ = u(() => t.tag === "button" ? {
|
|
32
32
|
ariaDisabled: o.value || t.loading,
|
|
33
33
|
disabled: o.value || t.loading,
|
|
@@ -116,7 +116,7 @@ const K = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
116
116
|
default: void 0
|
|
117
117
|
},
|
|
118
118
|
tag: {
|
|
119
|
-
type:
|
|
119
|
+
type: lt([String, Object]),
|
|
120
120
|
default: "button"
|
|
121
121
|
}
|
|
122
122
|
}), ut = {
|
|
@@ -126,28 +126,28 @@ function f(t, c = 20) {
|
|
|
126
126
|
return t.mix("#141414", c).toString();
|
|
127
127
|
}
|
|
128
128
|
function dt(t) {
|
|
129
|
-
const c = F(),
|
|
129
|
+
const c = F(), n = I("button");
|
|
130
130
|
return u(() => {
|
|
131
|
-
let
|
|
131
|
+
let l = {}, s = t.color;
|
|
132
132
|
if (s) {
|
|
133
133
|
const a = s.match(/var\((.*?)\)/);
|
|
134
134
|
a && (s = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
|
|
135
135
|
const o = new rt(s), b = t.dark ? o.tint(20).toString() : f(o, 20);
|
|
136
136
|
if (t.plain)
|
|
137
|
-
|
|
137
|
+
l = n.cssVarBlock({
|
|
138
138
|
"bg-color": t.dark ? f(o, 90) : o.tint(90).toString(),
|
|
139
139
|
"text-color": s,
|
|
140
140
|
"border-color": t.dark ? f(o, 50) : o.tint(50).toString(),
|
|
141
|
-
"hover-text-color": `var(${
|
|
141
|
+
"hover-text-color": `var(${n.cssVarName("color-white")})`,
|
|
142
142
|
"hover-bg-color": s,
|
|
143
143
|
"hover-border-color": s,
|
|
144
144
|
"active-bg-color": b,
|
|
145
|
-
"active-text-color": `var(${
|
|
145
|
+
"active-text-color": `var(${n.cssVarName("color-white")})`,
|
|
146
146
|
"active-border-color": b
|
|
147
|
-
}), c.value && (n
|
|
147
|
+
}), c.value && (l[n.cssVarBlockName("disabled-bg-color")] = t.dark ? f(o, 90) : o.tint(90).toString(), l[n.cssVarBlockName("disabled-text-color")] = t.dark ? f(o, 50) : o.tint(50).toString(), l[n.cssVarBlockName("disabled-border-color")] = t.dark ? f(o, 80) : o.tint(80).toString());
|
|
148
148
|
else {
|
|
149
|
-
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${
|
|
150
|
-
if (
|
|
149
|
+
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
|
|
150
|
+
if (l = n.cssVarBlock({
|
|
151
151
|
"bg-color": s,
|
|
152
152
|
"text-color": p,
|
|
153
153
|
"border-color": s,
|
|
@@ -158,11 +158,11 @@ function dt(t) {
|
|
|
158
158
|
"active-border-color": b
|
|
159
159
|
}), c.value) {
|
|
160
160
|
const g = t.dark ? f(o, 50) : o.tint(50).toString();
|
|
161
|
-
n
|
|
161
|
+
l[n.cssVarBlockName("disabled-bg-color")] = g, l[n.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, l[n.cssVarBlockName("disabled-border-color")] = g;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return l;
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
const bt = B({
|
|
@@ -171,8 +171,8 @@ const bt = B({
|
|
|
171
171
|
...bt,
|
|
172
172
|
props: z,
|
|
173
173
|
emits: ut,
|
|
174
|
-
setup(t, { expose: c, emit:
|
|
175
|
-
const
|
|
174
|
+
setup(t, { expose: c, emit: n }) {
|
|
175
|
+
const l = t, s = dt(l), a = I("button"), {
|
|
176
176
|
_ref: o,
|
|
177
177
|
_size: b,
|
|
178
178
|
_type: v,
|
|
@@ -183,18 +183,18 @@ const bt = B({
|
|
|
183
183
|
_text: C,
|
|
184
184
|
shouldAddSpace: _,
|
|
185
185
|
handleClick: x
|
|
186
|
-
} = st(
|
|
186
|
+
} = st(l, n), E = u(() => [
|
|
187
187
|
a.b(),
|
|
188
188
|
a.m(v.value),
|
|
189
189
|
a.m(b.value),
|
|
190
190
|
a.is("disabled", p.value),
|
|
191
|
-
a.is("loading",
|
|
191
|
+
a.is("loading", l.loading),
|
|
192
192
|
a.is("plain", h.value),
|
|
193
193
|
a.is("round", S.value),
|
|
194
|
-
a.is("circle",
|
|
194
|
+
a.is("circle", l.circle),
|
|
195
195
|
a.is("text", C.value),
|
|
196
|
-
a.is("link",
|
|
197
|
-
a.is("has-bg",
|
|
196
|
+
a.is("link", l.link),
|
|
197
|
+
a.is("has-bg", l.bg)
|
|
198
198
|
]);
|
|
199
199
|
return c({
|
|
200
200
|
ref: o,
|
|
@@ -238,7 +238,7 @@ const bt = B({
|
|
|
238
238
|
}, 16, ["class", "style", "onClick"]));
|
|
239
239
|
}
|
|
240
240
|
});
|
|
241
|
-
var ft = /* @__PURE__ */
|
|
241
|
+
var ft = /* @__PURE__ */ K(vt, [["__file", "button.vue"]]);
|
|
242
242
|
const mt = {
|
|
243
243
|
size: z.size,
|
|
244
244
|
type: z.type
|
|
@@ -249,23 +249,23 @@ const mt = {
|
|
|
249
249
|
props: mt,
|
|
250
250
|
setup(t) {
|
|
251
251
|
const c = t;
|
|
252
|
-
L(
|
|
252
|
+
L(j, Q({
|
|
253
253
|
size: P(c, "size"),
|
|
254
254
|
type: P(c, "type")
|
|
255
255
|
}));
|
|
256
|
-
const
|
|
257
|
-
return (
|
|
258
|
-
class: w(d(
|
|
256
|
+
const n = I("button");
|
|
257
|
+
return (l, s) => (m(), $("div", {
|
|
258
|
+
class: w(d(n).b("group"))
|
|
259
259
|
}, [
|
|
260
|
-
k(
|
|
260
|
+
k(l.$slots, "default")
|
|
261
261
|
], 2));
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
|
-
var
|
|
265
|
-
const xt =
|
|
266
|
-
ButtonGroup:
|
|
264
|
+
var A = /* @__PURE__ */ K(gt, [["__file", "button-group.vue"]]);
|
|
265
|
+
const xt = nt(ft, {
|
|
266
|
+
ButtonGroup: A
|
|
267
267
|
});
|
|
268
|
-
at(
|
|
268
|
+
at(A);
|
|
269
269
|
export {
|
|
270
270
|
xt as E,
|
|
271
271
|
it as b
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),E=require("./use-form-common-props-d3ed62c6.cjs"),x=require("./index-28e03bad.cjs"),o=require("./base-ef747d02.cjs"),L=require("./index-37b8d3c6.cjs"),B=require("./index-f1c702f6.cjs"),N={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:E.useSizeProp,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...x.useAriaProps(["ariaControls"])},I={[x.UPDATE_MODEL_EVENT]:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l),change:l=>o.isString(l)||o.isNumber(l)||o.isBoolean(l)},y=Symbol("checkboxGroupContextKey"),A=({model:l,isChecked:t})=>{const i=e.inject(y,void 0),a=e.computed(()=>{var c,b;const u=(c=i==null?void 0:i.max)==null?void 0:c.value,v=(b=i==null?void 0:i.min)==null?void 0:b.value;return!o.isUndefined(u)&&l.value.length>=u&&!t.value||!o.isUndefined(v)&&l.value.length<=v&&t.value});return{isDisabled:E.useFormDisabled(e.computed(()=>(i==null?void 0:i.disabled.value)||a.value)),isLimitDisabled:a}},w=(l,{model:t,isLimitExceeded:i,hasOwnLabel:a,isDisabled:m,isLabeledByFormItem:c})=>{const b=e.inject(y,void 0),{formItem:u}=E.useFormItem(),{emit:v}=e.getCurrentInstance();function f(h){var n,C,k,d;return[!0,l.trueValue,l.trueLabel].includes(h)?(C=(n=l.trueValue)!=null?n:l.trueLabel)!=null?C:!0:(d=(k=l.falseValue)!=null?k:l.falseLabel)!=null?d:!1}function r(h,n){v(x.CHANGE_EVENT,f(h),n)}function s(h){if(i.value)return;const n=h.target;v(x.CHANGE_EVENT,f(n.checked),h)}async function p(h){i.value||!a.value&&!m.value&&c.value&&(h.composedPath().some(k=>k.tagName==="LABEL")||(t.value=f([!1,l.falseValue,l.falseLabel].includes(t.value)),await e.nextTick(),r(t.value,h)))}const g=e.computed(()=>(b==null?void 0:b.validateEvent)||l.validateEvent);return e.watch(()=>l.modelValue,()=>{g.value&&(u==null||u.validate("change").catch(h=>x.debugWarn()))}),{handleChange:s,onClickRoot:p}},G=l=>{const t=e.ref(!1),{emit:i}=e.getCurrentInstance(),a=e.inject(y,void 0),m=e.computed(()=>o.isUndefined(a)===!1),c=e.ref(!1),b=e.computed({get(){var u,v;return m.value?(u=a==null?void 0:a.modelValue)==null?void 0:u.value:(v=l.modelValue)!=null?v:t.value},set(u){var v,f;m.value&&o.isArray(u)?(c.value=((v=a==null?void 0:a.max)==null?void 0:v.value)!==void 0&&u.length>(a==null?void 0:a.max.value)&&u.length>b.value.length,c.value===!1&&((f=a==null?void 0:a.changeEvent)==null||f.call(a,u))):(i(x.UPDATE_MODEL_EVENT,u),t.value=u)}});return{model:b,isGroup:m,isLimitExceeded:c}},$=(l,t,{model:i})=>{const a=e.inject(y,void 0),m=e.ref(!1),c=e.computed(()=>o.isPropAbsent(l.value)?l.label:l.value),b=e.computed(()=>{const r=i.value;return o.isBoolean(r)?r:o.isArray(r)?o.isObject(c.value)?r.map(e.toRaw).some(s=>L.isEqual(s,c.value)):r.map(e.toRaw).includes(c.value):r!=null?r===l.trueValue||r===l.trueLabel:!!r}),u=E.useFormSize(e.computed(()=>{var r;return(r=a==null?void 0:a.size)==null?void 0:r.value}),{prop:!0}),v=E.useFormSize(e.computed(()=>{var r;return(r=a==null?void 0:a.size)==null?void 0:r.value})),f=e.computed(()=>!!t.default||!o.isPropAbsent(c.value));return{checkboxButtonSize:u,isChecked:b,isFocused:m,checkboxSize:v,hasOwnLabel:f,actualValue:c}},D=(l,t)=>{const{formItem:i}=E.useFormItem(),{model:a,isGroup:m,isLimitExceeded:c}=G(l),{isFocused:b,isChecked:u,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,actualValue:s}=$(l,t,{model:a}),{isDisabled:p}=A({model:a,isChecked:u}),{inputId:g,isLabeledByFormItem:h}=E.useFormItemInputId(l,{formItemContext:i,disableIdGeneration:r,disableIdManagement:m}),{handleChange:n,onClickRoot:C}=w(l,{model:a,isLimitExceeded:c,hasOwnLabel:r,isDisabled:p,isLabeledByFormItem:h});return(()=>{function d(){var _,V;o.isArray(a.value)&&!a.value.includes(s.value)?a.value.push(s.value):a.value=(V=(_=l.trueValue)!=null?_:l.trueLabel)!=null?V:!0}l.checked&&d()})(),B.useDeprecated({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>m.value&&o.isPropAbsent(l.value))),B.useDeprecated({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.trueLabel)),B.useDeprecated({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},e.computed(()=>!!l.falseLabel)),{inputId:g,isLabeledByFormItem:h,isChecked:u,isDisabled:p,isFocused:b,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,model:a,actualValue:s,handleChange:n,onClickRoot:C}},U=e.defineComponent({name:"ElCheckbox"}),O=e.defineComponent({...U,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{inputId:a,isLabeledByFormItem:m,isChecked:c,isDisabled:b,isFocused:u,checkboxSize:v,hasOwnLabel:f,model:r,actualValue:s,handleChange:p,onClickRoot:g}=D(t,i),h=e.computed(()=>{var d,_,V,S;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(_=(d=t.trueValue)!=null?d:t.trueLabel)!=null?_:!0,"false-value":(S=(V=t.falseValue)!=null?V:t.falseLabel)!=null?S:!1}:{value:s.value}}),n=o.useNamespace("checkbox"),C=e.computed(()=>[n.b(),n.m(v.value),n.is("disabled",b.value),n.is("bordered",t.border),n.is("checked",c.value)]),k=e.computed(()=>[n.e("input"),n.is("disabled",b.value),n.is("checked",c.value),n.is("indeterminate",t.indeterminate),n.is("focus",u.value)]);return(d,_)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(!e.unref(f)&&e.unref(m)?"span":"label"),{class:e.normalizeClass(e.unref(C)),"aria-controls":d.indeterminate?d.ariaControls:null,onClick:e.unref(g)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(k))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(a),"onUpdate:modelValue":V=>e.isRef(r)?r.value=V:null,class:e.unref(n).e("original"),type:"checkbox",indeterminate:d.indeterminate,name:d.name,tabindex:d.tabindex,disabled:e.unref(b)},e.unref(h),{onChange:e.unref(p),onFocus:V=>u.value=!0,onBlur:V=>u.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(r)]]),e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("inner"))},null,2)],2),e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("label"))},[e.renderSlot(d.$slots,"default"),d.$slots.default?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.label),1)],64))],2)):e.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var P=o._export_sfc(O,[["__file","checkbox.vue"]]);const M=e.defineComponent({name:"ElCheckboxButton"}),j=e.defineComponent({...M,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{isFocused:a,isChecked:m,isDisabled:c,checkboxButtonSize:b,model:u,actualValue:v,handleChange:f}=D(t,i),r=e.computed(()=>{var n,C,k,d;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(C=(n=t.trueValue)!=null?n:t.trueLabel)!=null?C:!0,"false-value":(d=(k=t.falseValue)!=null?k:t.falseLabel)!=null?d:!1}:{value:v.value}}),s=e.inject(y,void 0),p=o.useNamespace("checkbox"),g=e.computed(()=>{var n,C,k,d;const _=(C=(n=s==null?void 0:s.fill)==null?void 0:n.value)!=null?C:"";return{backgroundColor:_,borderColor:_,color:(d=(k=s==null?void 0:s.textColor)==null?void 0:k.value)!=null?d:"",boxShadow:_?`-1px 0 0 0 ${_}`:void 0}}),h=e.computed(()=>[p.b("button"),p.bm("button",b.value),p.is("disabled",c.value),p.is("checked",m.value),p.is("focus",a.value)]);return(n,C)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(e.unref(h))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":k=>e.isRef(u)?u.value=k:null,class:e.unref(p).be("button","original"),type:"checkbox",name:n.name,tabindex:n.tabindex,disabled:e.unref(c)},e.unref(r),{onChange:e.unref(f),onFocus:k=>a.value=!0,onBlur:k=>a.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["onUpdate:modelValue","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(u)]]),n.$slots.default||n.label?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(p).be("button","inner")),style:e.normalizeStyle(e.unref(m)?e.unref(g):void 0)},[e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(n.label),1)])],6)):e.createCommentVNode("v-if",!0)],2))}});var z=o._export_sfc(j,[["__file","checkbox-button.vue"]]);const q=o.buildProps({modelValue:{type:o.definePropType(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:E.useSizeProp,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:o.definePropType(Array)},props:{type:o.definePropType(Object),default:()=>F},...x.useAriaProps(["ariaLabel"])}),R={[x.UPDATE_MODEL_EVENT]:l=>o.isArray(l),change:l=>o.isArray(l)},F={label:"label",value:"value",disabled:"disabled"},K=e.defineComponent({name:"ElCheckboxGroup"}),H=e.defineComponent({...K,props:q,emits:R,setup(l,{emit:t}){const i=l,a=o.useNamespace("checkbox"),{formItem:m}=E.useFormItem(),{inputId:c,isLabeledByFormItem:b}=E.useFormItemInputId(i,{formItemContext:m}),u=async s=>{t(x.UPDATE_MODEL_EVENT,s),await e.nextTick(),t(x.CHANGE_EVENT,s)},v=e.computed({get(){return i.modelValue},set(s){u(s)}}),f=e.computed(()=>({...F,...i.props})),r=s=>{const p={label:s[f.value.label],value:s[f.value.value],disabled:s[f.value.disabled]};return{...s,...p}};return e.provide(y,{...x.pick(e.toRefs(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:v,changeEvent:u}),e.watch(()=>i.modelValue,(s,p)=>{i.validateEvent&&!L.isEqual(s,p)&&(m==null||m.validate("change").catch(g=>x.debugWarn()))}),(s,p)=>{var g;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{id:e.unref(c),class:e.normalizeClass(e.unref(a).b("group")),role:"group","aria-label":e.unref(b)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":e.unref(b)?(g=e.unref(m))==null?void 0:g.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options,(h,n)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:n},r(h)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var T=o._export_sfc(H,[["__file","checkbox-group.vue"]]);const W=o.withInstall(P,{CheckboxButton:z,CheckboxGroup:T});o.withNoopInstall(z);const J=o.withNoopInstall(T);exports.ElCheckbox=W;exports.ElCheckboxGroup=J;
|