st-comp 0.0.207 → 0.0.208
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/es/ChartLayout.cjs +1 -1
- package/es/ChartLayout.js +1 -74
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +53 -56
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +45 -48
- package/es/HeatMap.cjs +1 -1
- package/es/HeatMap.js +1 -118
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +16 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +81 -84
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +161 -164
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +15 -18
- package/es/KlinePlus.cjs +1 -1
- package/es/KlinePlus.js +18 -21
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +140 -143
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +2 -3
- package/es/Table.cjs +1 -1
- package/es/Table.js +55 -58
- package/es/User.cjs +1 -1
- package/es/User.js +85 -88
- package/es/VarSelectDialog.cjs +2 -2
- package/es/VarSelectDialog.js +53 -56
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +15 -17
- package/es/VarietySearch.cjs +10 -10
- package/es/VarietySearch.js +53 -56
- package/es/VarietyTextCopy.cjs +3 -3
- package/es/VarietyTextCopy.js +33 -36
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +103 -106
- package/es/{_initCloneObject-eaef9418.js → _initCloneObject-c477c74d.js} +25 -26
- package/es/_initCloneObject-e660897e.cjs +1 -0
- package/es/base-7ba08794.cjs +5 -0
- package/es/{index-a871c3eb.js → base-aa512893.js} +454 -171
- package/es/{castArray-7741a212.js → castArray-1eb17278.js} +1 -1
- package/es/castArray-efa457a5.cjs +1 -0
- package/es/{config-provider-a584d81e.cjs → config-provider-18c0a68a.cjs} +1 -1
- package/es/{config-provider-b16efd62.js → config-provider-49c17381.js} +6 -6
- package/es/{debounce-8d53f4dd.js → debounce-33406a0d.js} +9 -9
- package/es/debounce-4aa22feb.cjs +1 -0
- package/es/{dropdown-071c5d7e.cjs → dropdown-3f1fe325.cjs} +1 -1
- package/es/{dropdown-a59bba73.js → dropdown-6e7b1df0.js} +15 -15
- package/es/el-autocomplete-609ac86d.cjs +1 -0
- package/es/{el-autocomplete-ba808eb6.js → el-autocomplete-87b7f461.js} +51 -53
- package/es/el-button-08310c06.cjs +1 -0
- package/es/{el-button-c95adb85.js → el-button-56624e61.js} +45 -46
- package/es/{el-checkbox-c25236a6.cjs → el-checkbox-09f3b57f.cjs} +1 -1
- package/es/{el-checkbox-7421ccd3.js → el-checkbox-f13560e9.js} +40 -40
- package/es/{el-dialog-41ab8417.js → el-dialog-1d5f5877.js} +9 -10
- package/es/el-dialog-ea480083.cjs +1 -0
- package/es/{el-divider-4e059794.js → el-divider-1cda1783.js} +1 -1
- package/es/{el-divider-4713d74c.cjs → el-divider-8a4c87e3.cjs} +1 -1
- package/es/{el-empty-33cb66f1.js → el-empty-04682b5d.js} +3 -3
- package/es/el-empty-b40fa7ea.cjs +1 -0
- package/es/el-form-item-338ea2f7.cjs +12 -0
- package/es/{el-form-item-c53c374d.js → el-form-item-505c0b70.js} +75 -76
- package/es/{el-input-2f75c4ba.js → el-input-262851e8.js} +84 -85
- package/es/el-input-b04b5bfc.cjs +1 -0
- package/es/el-input-number-7242c8b5.cjs +1 -0
- package/es/{el-input-number-5193fe6d.js → el-input-number-fdac2b86.js} +82 -83
- package/es/{el-loading-cfd86c15.cjs → el-loading-3cf7b796.cjs} +1 -1
- package/es/{el-loading-f6022062.js → el-loading-7440dc64.js} +2 -2
- package/es/{el-menu-item-7e881203.js → el-menu-item-36c3004c.js} +53 -54
- package/es/el-menu-item-7aca344e.cjs +1 -0
- package/es/el-message-05cd85bf.cjs +1 -0
- package/es/{el-message-e544a8f5.js → el-message-416bd265.js} +28 -29
- package/es/{el-message-box-a93d2f6a.js → el-message-box-8f5e34ca.js} +20 -22
- package/es/el-message-box-b7e9917e.cjs +1 -0
- package/es/{el-overlay-09ad71cd.js → el-overlay-04426e36.js} +52 -53
- package/es/el-overlay-60bc5a02.cjs +1 -0
- package/es/el-popconfirm-24b622c5.cjs +1 -0
- package/es/{el-popconfirm-81dcd202.js → el-popconfirm-3790cda2.js} +38 -39
- package/es/el-popper-1dd8f5b4.cjs +1 -0
- package/es/{el-popper-b4f97157.js → el-popper-49152708.js} +191 -192
- package/es/{el-segmented-b868d074.js → el-segmented-05509f9d.js} +12 -13
- package/es/el-segmented-a928d89b.cjs +1 -0
- package/es/el-select-5fd77a96.cjs +1 -0
- package/es/{el-select-95627997.js → el-select-700f3686.js} +292 -295
- package/es/{el-table-column-376cd907.js → el-table-column-44360700.js} +54 -57
- package/es/el-table-column-bf3ab2a6.cjs +14 -0
- package/es/{el-tag-66cab138.js → el-tag-55a172c9.js} +30 -31
- package/es/el-tag-d59f3463.cjs +1 -0
- package/es/{el-text-c20a9f48.cjs → el-text-5bcaffb6.cjs} +1 -1
- package/es/{el-text-ac60d0f2.js → el-text-ab6bfc40.js} +4 -4
- package/es/{index-1f7d4f70.js → index-0afedcbd.js} +11 -12
- package/es/{index-88546436.js → index-29418a8d.js} +18 -18
- package/es/index-3d0bc5da.js +566 -0
- package/es/{index-57672682.js → index-4e46f96c.js} +12 -13
- package/es/{index-844bdd85.js → index-66ad0d6a.js} +34 -34
- package/es/{index-f967d6c1.cjs → index-882d77d3.cjs} +1 -1
- package/es/index-a206f6eb.cjs +1 -0
- package/es/{index-298075cf.cjs → index-ae6c9d97.cjs} +1 -1
- package/es/index-b4700d83.cjs +1 -0
- package/es/index-c30cf7f9.cjs +1 -0
- package/es/{index-d91dc23f.js → index-cbbd78b4.js} +12 -12
- package/es/{index-11547a0c.cjs → index-d8294b1a.cjs} +1 -1
- package/es/{raf-8249652f.cjs → raf-336ef01e.cjs} +1 -1
- package/es/raf-d8c44079.js +6 -0
- package/es/{scroll-679bd6bf.js → scroll-0a48995c.js} +5 -5
- package/es/{scroll-b108dabd.cjs → scroll-19533c53.cjs} +1 -1
- package/es/style.css +1 -1
- package/es/use-form-common-props-41182853.cjs +1 -0
- package/es/use-form-common-props-4cdda474.js +671 -0
- package/es/use-global-config-7bfbe48c.js +71 -0
- package/es/use-global-config-dc5527e8.cjs +1 -0
- package/es/{validator-1b8a6128.cjs → validator-28b22907.cjs} +1 -1
- package/es/{validator-764a9db0.js → validator-e35f7978.js} +1 -1
- package/es/{vnode-b906ae6d.cjs → vnode-8cb31692.cjs} +1 -1
- package/es/{vnode-5ddb7ed1.js → vnode-b62d0045.js} +1 -1
- package/es/{zh-cn-e963c628.js → zh-cn-346f3a73.js} +2 -2
- package/es/{zh-cn-90317f62.cjs → zh-cn-7c8640bb.cjs} +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +1 -1
- package/lib/{index-f27d8c7a.js → index-da0f2951.js} +3 -3
- package/lib/{python-c345f0e2.js → python-c0a1e4ef.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineBasic/components/KlineTips/index.vue +1 -1
- package/es/_initCloneObject-52b6a510.cjs +0 -1
- package/es/base-a5af3db3.js +0 -288
- package/es/base-ef747d02.cjs +0 -5
- package/es/castArray-35947698.cjs +0 -1
- package/es/debounce-62f5b6e8.cjs +0 -1
- package/es/el-autocomplete-a07e9439.cjs +0 -1
- package/es/el-button-eec58cff.cjs +0 -1
- package/es/el-dialog-ae86edb8.cjs +0 -1
- package/es/el-empty-1697ded8.cjs +0 -1
- package/es/el-form-item-c3fe189b.cjs +0 -12
- package/es/el-input-7fd293af.cjs +0 -1
- package/es/el-input-number-22e21d16.cjs +0 -1
- package/es/el-menu-item-17dc717e.cjs +0 -1
- package/es/el-message-5e6a6be9.cjs +0 -1
- package/es/el-message-box-c10adb52.cjs +0 -1
- package/es/el-overlay-9e34965f.cjs +0 -1
- package/es/el-popconfirm-70a976bf.cjs +0 -1
- package/es/el-popper-b6c99b28.cjs +0 -1
- package/es/el-segmented-f8fce9ac.cjs +0 -1
- package/es/el-select-d8d91db1.cjs +0 -1
- package/es/el-table-column-c974cb96.cjs +0 -14
- package/es/el-tag-a33c4b22.cjs +0 -1
- package/es/index-098c2447.cjs +0 -1
- package/es/index-960806da.js +0 -314
- package/es/index-9780a537.cjs +0 -1
- package/es/index-9b9ef5dd.cjs +0 -1
- package/es/index-bb833443.cjs +0 -1
- package/es/index-c108567d.cjs +0 -1
- package/es/index-d77a7336.js +0 -204
- package/es/index-e5566b94.js +0 -368
- package/es/index-f3562b52.cjs +0 -1
- package/es/raf-80ef0c0a.js +0 -6
- package/es/use-form-common-props-815d48a6.js +0 -364
- package/es/use-form-common-props-fd9b61a0.cjs +0 -1
- package/es/use-global-config-30d7d8ce.cjs +0 -1
- package/es/use-global-config-b5e9d3d5.js +0 -72
|
@@ -1,33 +1,32 @@
|
|
|
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
|
|
2
|
-
import {
|
|
3
|
-
import { u as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { b as ot, e as lt, u as I, _ as K, w as nt, l as at } from "./base-a5af3db3.js";
|
|
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 E, provide as L, reactive as Q, toRef as P } from "vue";
|
|
2
|
+
import { b as W, B as X, d as Y, u as I, E as G, _ as F, w as Z, T as tt } from "./base-aa512893.js";
|
|
3
|
+
import { u as et } from "./index-2e331d74.js";
|
|
4
|
+
import { a as ot } from "./use-global-config-7bfbe48c.js";
|
|
5
|
+
import { f as nt, a as lt, e as K, u as at, k as D } from "./use-form-common-props-4cdda474.js";
|
|
7
6
|
import { T as rt } from "./index-657047bb.js";
|
|
8
7
|
const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
9
|
-
|
|
8
|
+
et({
|
|
10
9
|
from: "type.text",
|
|
11
10
|
replacement: "link",
|
|
12
11
|
version: "3.0.0",
|
|
13
12
|
scope: "props",
|
|
14
13
|
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
15
14
|
}, u(() => t.type === "text"));
|
|
16
|
-
const
|
|
15
|
+
const l = M(j, void 0), n = ot("button"), { form: s } = nt(), a = lt(u(() => l == null ? void 0 : l.size)), o = K(), b = O(), v = R(), p = u(() => {
|
|
17
16
|
var e;
|
|
18
|
-
return t.type || (
|
|
17
|
+
return t.type || (l == null ? void 0 : l.type) || ((e = n.value) == null ? void 0 : e.type) || "";
|
|
19
18
|
}), g = u(() => {
|
|
20
19
|
var e, r, i;
|
|
21
|
-
return (i = (r = t.autoInsertSpace) != null ? r : (e =
|
|
20
|
+
return (i = (r = t.autoInsertSpace) != null ? r : (e = n.value) == null ? void 0 : e.autoInsertSpace) != null ? i : !1;
|
|
22
21
|
}), h = u(() => {
|
|
23
22
|
var e, r, i;
|
|
24
|
-
return (i = (r = t.plain) != null ? r : (e =
|
|
23
|
+
return (i = (r = t.plain) != null ? r : (e = n.value) == null ? void 0 : e.plain) != null ? i : !1;
|
|
25
24
|
}), S = u(() => {
|
|
26
25
|
var e, r, i;
|
|
27
|
-
return (i = (r = t.round) != null ? r : (e =
|
|
26
|
+
return (i = (r = t.round) != null ? r : (e = n.value) == null ? void 0 : e.round) != null ? i : !1;
|
|
28
27
|
}), C = u(() => {
|
|
29
28
|
var e, r, i;
|
|
30
|
-
return (i = (r = t.text) != null ? r : (e =
|
|
29
|
+
return (i = (r = t.text) != null ? r : (e = n.value) == null ? void 0 : e.text) != null ? i : !1;
|
|
31
30
|
}), _ = u(() => t.tag === "button" ? {
|
|
32
31
|
ariaDisabled: o.value || t.loading,
|
|
33
32
|
disabled: o.value || t.loading,
|
|
@@ -72,8 +71,8 @@ const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
72
71
|
"danger",
|
|
73
72
|
"text",
|
|
74
73
|
""
|
|
75
|
-
], ct = ["button", "submit", "reset"], z =
|
|
76
|
-
size:
|
|
74
|
+
], ct = ["button", "submit", "reset"], z = W({
|
|
75
|
+
size: at,
|
|
77
76
|
disabled: Boolean,
|
|
78
77
|
type: {
|
|
79
78
|
type: String,
|
|
@@ -91,7 +90,7 @@ const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
91
90
|
loading: Boolean,
|
|
92
91
|
loadingIcon: {
|
|
93
92
|
type: D,
|
|
94
|
-
default: () =>
|
|
93
|
+
default: () => X
|
|
95
94
|
},
|
|
96
95
|
plain: {
|
|
97
96
|
type: Boolean,
|
|
@@ -116,7 +115,7 @@ const j = Symbol("buttonGroupContextKey"), st = (t, c) => {
|
|
|
116
115
|
default: void 0
|
|
117
116
|
},
|
|
118
117
|
tag: {
|
|
119
|
-
type:
|
|
118
|
+
type: Y([String, Object]),
|
|
120
119
|
default: "button"
|
|
121
120
|
}
|
|
122
121
|
}), ut = {
|
|
@@ -126,28 +125,28 @@ function f(t, c = 20) {
|
|
|
126
125
|
return t.mix("#141414", c).toString();
|
|
127
126
|
}
|
|
128
127
|
function dt(t) {
|
|
129
|
-
const c =
|
|
128
|
+
const c = K(), l = I("button");
|
|
130
129
|
return u(() => {
|
|
131
|
-
let
|
|
130
|
+
let n = {}, s = t.color;
|
|
132
131
|
if (s) {
|
|
133
132
|
const a = s.match(/var\((.*?)\)/);
|
|
134
133
|
a && (s = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
|
|
135
134
|
const o = new rt(s), b = t.dark ? o.tint(20).toString() : f(o, 20);
|
|
136
135
|
if (t.plain)
|
|
137
|
-
|
|
136
|
+
n = l.cssVarBlock({
|
|
138
137
|
"bg-color": t.dark ? f(o, 90) : o.tint(90).toString(),
|
|
139
138
|
"text-color": s,
|
|
140
139
|
"border-color": t.dark ? f(o, 50) : o.tint(50).toString(),
|
|
141
|
-
"hover-text-color": `var(${
|
|
140
|
+
"hover-text-color": `var(${l.cssVarName("color-white")})`,
|
|
142
141
|
"hover-bg-color": s,
|
|
143
142
|
"hover-border-color": s,
|
|
144
143
|
"active-bg-color": b,
|
|
145
|
-
"active-text-color": `var(${
|
|
144
|
+
"active-text-color": `var(${l.cssVarName("color-white")})`,
|
|
146
145
|
"active-border-color": b
|
|
147
|
-
}), c.value && (l
|
|
146
|
+
}), c.value && (n[l.cssVarBlockName("disabled-bg-color")] = t.dark ? f(o, 90) : o.tint(90).toString(), n[l.cssVarBlockName("disabled-text-color")] = t.dark ? f(o, 50) : o.tint(50).toString(), n[l.cssVarBlockName("disabled-border-color")] = t.dark ? f(o, 80) : o.tint(80).toString());
|
|
148
147
|
else {
|
|
149
|
-
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${
|
|
150
|
-
if (
|
|
148
|
+
const v = t.dark ? f(o, 30) : o.tint(30).toString(), p = o.isDark() ? `var(${l.cssVarName("color-white")})` : `var(${l.cssVarName("color-black")})`;
|
|
149
|
+
if (n = l.cssVarBlock({
|
|
151
150
|
"bg-color": s,
|
|
152
151
|
"text-color": p,
|
|
153
152
|
"border-color": s,
|
|
@@ -158,11 +157,11 @@ function dt(t) {
|
|
|
158
157
|
"active-border-color": b
|
|
159
158
|
}), c.value) {
|
|
160
159
|
const g = t.dark ? f(o, 50) : o.tint(50).toString();
|
|
161
|
-
l
|
|
160
|
+
n[l.cssVarBlockName("disabled-bg-color")] = g, n[l.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${l.cssVarName("color-white")})`, n[l.cssVarBlockName("disabled-border-color")] = g;
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
|
-
return
|
|
164
|
+
return n;
|
|
166
165
|
});
|
|
167
166
|
}
|
|
168
167
|
const bt = B({
|
|
@@ -171,8 +170,8 @@ const bt = B({
|
|
|
171
170
|
...bt,
|
|
172
171
|
props: z,
|
|
173
172
|
emits: ut,
|
|
174
|
-
setup(t, { expose: c, emit:
|
|
175
|
-
const
|
|
173
|
+
setup(t, { expose: c, emit: l }) {
|
|
174
|
+
const n = t, s = dt(n), a = I("button"), {
|
|
176
175
|
_ref: o,
|
|
177
176
|
_size: b,
|
|
178
177
|
_type: v,
|
|
@@ -183,18 +182,18 @@ const bt = B({
|
|
|
183
182
|
_text: C,
|
|
184
183
|
shouldAddSpace: _,
|
|
185
184
|
handleClick: x
|
|
186
|
-
} = st(
|
|
185
|
+
} = st(n, l), T = u(() => [
|
|
187
186
|
a.b(),
|
|
188
187
|
a.m(v.value),
|
|
189
188
|
a.m(b.value),
|
|
190
189
|
a.is("disabled", p.value),
|
|
191
|
-
a.is("loading",
|
|
190
|
+
a.is("loading", n.loading),
|
|
192
191
|
a.is("plain", h.value),
|
|
193
192
|
a.is("round", S.value),
|
|
194
|
-
a.is("circle",
|
|
193
|
+
a.is("circle", n.circle),
|
|
195
194
|
a.is("text", C.value),
|
|
196
|
-
a.is("link",
|
|
197
|
-
a.is("has-bg",
|
|
195
|
+
a.is("link", n.link),
|
|
196
|
+
a.is("has-bg", n.bg)
|
|
198
197
|
]);
|
|
199
198
|
return c({
|
|
200
199
|
ref: o,
|
|
@@ -206,7 +205,7 @@ const bt = B({
|
|
|
206
205
|
ref_key: "_ref",
|
|
207
206
|
ref: o
|
|
208
207
|
}, d(g), {
|
|
209
|
-
class: d(
|
|
208
|
+
class: d(T),
|
|
210
209
|
style: d(s),
|
|
211
210
|
onClick: d(x)
|
|
212
211
|
}), {
|
|
@@ -226,19 +225,19 @@ const bt = B({
|
|
|
226
225
|
e.icon ? (m(), y(N(e.icon), { key: 0 })) : k(e.$slots, "icon", { key: 1 })
|
|
227
226
|
]),
|
|
228
227
|
_: 3
|
|
229
|
-
})) :
|
|
228
|
+
})) : E("v-if", !0),
|
|
230
229
|
e.$slots.default ? (m(), $("span", {
|
|
231
230
|
key: 2,
|
|
232
231
|
class: w({ [d(a).em("text", "expand")]: d(_) })
|
|
233
232
|
}, [
|
|
234
233
|
k(e.$slots, "default")
|
|
235
|
-
], 2)) :
|
|
234
|
+
], 2)) : E("v-if", !0)
|
|
236
235
|
]),
|
|
237
236
|
_: 3
|
|
238
237
|
}, 16, ["class", "style", "onClick"]));
|
|
239
238
|
}
|
|
240
239
|
});
|
|
241
|
-
var ft = /* @__PURE__ */
|
|
240
|
+
var ft = /* @__PURE__ */ F(vt, [["__file", "button.vue"]]);
|
|
242
241
|
const mt = {
|
|
243
242
|
size: z.size,
|
|
244
243
|
type: z.type
|
|
@@ -253,20 +252,20 @@ const mt = {
|
|
|
253
252
|
size: P(c, "size"),
|
|
254
253
|
type: P(c, "type")
|
|
255
254
|
}));
|
|
256
|
-
const
|
|
257
|
-
return (
|
|
258
|
-
class: w(d(
|
|
255
|
+
const l = I("button");
|
|
256
|
+
return (n, s) => (m(), $("div", {
|
|
257
|
+
class: w(d(l).b("group"))
|
|
259
258
|
}, [
|
|
260
|
-
k(
|
|
259
|
+
k(n.$slots, "default")
|
|
261
260
|
], 2));
|
|
262
261
|
}
|
|
263
262
|
});
|
|
264
|
-
var A = /* @__PURE__ */
|
|
265
|
-
const
|
|
263
|
+
var A = /* @__PURE__ */ F(gt, [["__file", "button-group.vue"]]);
|
|
264
|
+
const Ct = Z(ft, {
|
|
266
265
|
ButtonGroup: A
|
|
267
266
|
});
|
|
268
|
-
|
|
267
|
+
tt(A);
|
|
269
268
|
export {
|
|
270
|
-
|
|
269
|
+
Ct as E,
|
|
271
270
|
it as b
|
|
272
271
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),E=require("./use-form-common-props-fd9b61a0.cjs"),g=require("./el-popper-b6c99b28.cjs"),o=require("./base-ef747d02.cjs"),L=require("./index-c108567d.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},...g.useAriaProps(["ariaControls"])},I={[g.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),n=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)||n.value)),isLimitDisabled:n}},w=(l,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:m,isLabeledByFormItem:c})=>{const b=e.inject(y,void 0),{formItem:u}=E.useFormItem(),{emit:v}=e.getCurrentInstance();function f(h){var a,C,k,d;return[!0,l.trueValue,l.trueLabel].includes(h)?(C=(a=l.trueValue)!=null?a:l.trueLabel)!=null?C:!0:(d=(k=l.falseValue)!=null?k:l.falseLabel)!=null?d:!1}function r(h,a){v(g.CHANGE_EVENT,f(h),a)}function s(h){if(i.value)return;const a=h.target;v(g.CHANGE_EVENT,f(a.checked),h)}async function p(h){i.value||!n.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 x=e.computed(()=>(b==null?void 0:b.validateEvent)||l.validateEvent);return e.watch(()=>l.modelValue,()=>{x.value&&(u==null||u.validate("change").catch(h=>g.debugWarn()))}),{handleChange:s,onClickRoot:p}},G=l=>{const t=e.ref(!1),{emit:i}=e.getCurrentInstance(),n=e.inject(y,void 0),m=e.computed(()=>o.isUndefined(n)===!1),c=e.ref(!1),b=e.computed({get(){var u,v;return m.value?(u=n==null?void 0:n.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=n==null?void 0:n.max)==null?void 0:v.value)!==void 0&&u.length>(n==null?void 0:n.max.value)&&u.length>b.value.length,c.value===!1&&((f=n==null?void 0:n.changeEvent)==null||f.call(n,u))):(i(g.UPDATE_MODEL_EVENT,u),t.value=u)}});return{model:b,isGroup:m,isLimitExceeded:c}},$=(l,t,{model:i})=>{const n=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=n==null?void 0:n.size)==null?void 0:r.value}),{prop:!0}),v=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.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:n,isGroup:m,isLimitExceeded:c}=G(l),{isFocused:b,isChecked:u,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,actualValue:s}=$(l,t,{model:n}),{isDisabled:p}=A({model:n,isChecked:u}),{inputId:x,isLabeledByFormItem:h}=E.useFormItemInputId(l,{formItemContext:i,disableIdGeneration:r,disableIdManagement:m}),{handleChange:a,onClickRoot:C}=w(l,{model:n,isLimitExceeded:c,hasOwnLabel:r,isDisabled:p,isLabeledByFormItem:h});return(()=>{function d(){var _,V;o.isArray(n.value)&&!n.value.includes(s.value)?n.value.push(s.value):n.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:x,isLabeledByFormItem:h,isChecked:u,isDisabled:p,isFocused:b,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,model:n,actualValue:s,handleChange:a,onClickRoot:C}},U=e.defineComponent({name:"ElCheckbox"}),O=e.defineComponent({...U,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{inputId:n,isLabeledByFormItem:m,isChecked:c,isDisabled:b,isFocused:u,checkboxSize:v,hasOwnLabel:f,model:r,actualValue:s,handleChange:p,onClickRoot:x}=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}}),a=o.useNamespace("checkbox"),C=e.computed(()=>[a.b(),a.m(v.value),a.is("disabled",b.value),a.is("bordered",t.border),a.is("checked",c.value)]),k=e.computed(()=>[a.e("input"),a.is("disabled",b.value),a.is("checked",c.value),a.is("indeterminate",t.indeterminate),a.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(x)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(k))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":V=>e.isRef(r)?r.value=V:null,class:e.unref(a).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(a).e("inner"))},null,2)],2),e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).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:n,isChecked:m,isDisabled:c,checkboxButtonSize:b,model:u,actualValue:v,handleChange:f}=D(t,i),r=e.computed(()=>{var a,C,k,d;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(C=(a=t.trueValue)!=null?a: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"),x=e.computed(()=>{var a,C,k,d;const _=(C=(a=s==null?void 0:s.fill)==null?void 0:a.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",n.value)]);return(a,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:a.name,tabindex:a.tabindex,disabled:e.unref(c)},e.unref(r),{onChange:e.unref(f),onFocus:k=>n.value=!0,onBlur:k=>n.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["onUpdate:modelValue","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(u)]]),a.$slots.default||a.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(x):void 0)},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.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},...g.useAriaProps(["ariaLabel"])}),R={[g.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,n=o.useNamespace("checkbox"),{formItem:m}=E.useFormItem(),{inputId:c,isLabeledByFormItem:b}=E.useFormItemInputId(i,{formItemContext:m}),u=async s=>{t(g.UPDATE_MODEL_EVENT,s),await e.nextTick(),t(g.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,{...g.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(x=>g.debugWarn()))}),(s,p)=>{var x;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{id:e.unref(c),class:e.normalizeClass(e.unref(n).b("group")),role:"group","aria-label":e.unref(b)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":e.unref(b)?(x=e.unref(m))==null?void 0:x.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options,(h,a)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:a},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;
|
|
1
|
+
"use strict";const e=require("vue"),E=require("./use-form-common-props-41182853.cjs"),g=require("./el-popper-1dd8f5b4.cjs"),o=require("./base-7ba08794.cjs"),L=require("./index-c30cf7f9.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},...g.useAriaProps(["ariaControls"])},I={[g.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),n=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)||n.value)),isLimitDisabled:n}},w=(l,{model:t,isLimitExceeded:i,hasOwnLabel:n,isDisabled:m,isLabeledByFormItem:c})=>{const b=e.inject(y,void 0),{formItem:u}=E.useFormItem(),{emit:v}=e.getCurrentInstance();function f(h){var a,C,k,d;return[!0,l.trueValue,l.trueLabel].includes(h)?(C=(a=l.trueValue)!=null?a:l.trueLabel)!=null?C:!0:(d=(k=l.falseValue)!=null?k:l.falseLabel)!=null?d:!1}function r(h,a){v(g.CHANGE_EVENT,f(h),a)}function s(h){if(i.value)return;const a=h.target;v(g.CHANGE_EVENT,f(a.checked),h)}async function p(h){i.value||!n.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 x=e.computed(()=>(b==null?void 0:b.validateEvent)||l.validateEvent);return e.watch(()=>l.modelValue,()=>{x.value&&(u==null||u.validate("change").catch(h=>g.debugWarn()))}),{handleChange:s,onClickRoot:p}},G=l=>{const t=e.ref(!1),{emit:i}=e.getCurrentInstance(),n=e.inject(y,void 0),m=e.computed(()=>o.isUndefined(n)===!1),c=e.ref(!1),b=e.computed({get(){var u,v;return m.value?(u=n==null?void 0:n.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=n==null?void 0:n.max)==null?void 0:v.value)!==void 0&&u.length>(n==null?void 0:n.max.value)&&u.length>b.value.length,c.value===!1&&((f=n==null?void 0:n.changeEvent)==null||f.call(n,u))):(i(g.UPDATE_MODEL_EVENT,u),t.value=u)}});return{model:b,isGroup:m,isLimitExceeded:c}},$=(l,t,{model:i})=>{const n=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=n==null?void 0:n.size)==null?void 0:r.value}),{prop:!0}),v=E.useFormSize(e.computed(()=>{var r;return(r=n==null?void 0:n.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:n,isGroup:m,isLimitExceeded:c}=G(l),{isFocused:b,isChecked:u,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,actualValue:s}=$(l,t,{model:n}),{isDisabled:p}=A({model:n,isChecked:u}),{inputId:x,isLabeledByFormItem:h}=E.useFormItemInputId(l,{formItemContext:i,disableIdGeneration:r,disableIdManagement:m}),{handleChange:a,onClickRoot:C}=w(l,{model:n,isLimitExceeded:c,hasOwnLabel:r,isDisabled:p,isLabeledByFormItem:h});return(()=>{function d(){var _,V;o.isArray(n.value)&&!n.value.includes(s.value)?n.value.push(s.value):n.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:x,isLabeledByFormItem:h,isChecked:u,isDisabled:p,isFocused:b,checkboxButtonSize:v,checkboxSize:f,hasOwnLabel:r,model:n,actualValue:s,handleChange:a,onClickRoot:C}},U=e.defineComponent({name:"ElCheckbox"}),O=e.defineComponent({...U,props:N,emits:I,setup(l){const t=l,i=e.useSlots(),{inputId:n,isLabeledByFormItem:m,isChecked:c,isDisabled:b,isFocused:u,checkboxSize:v,hasOwnLabel:f,model:r,actualValue:s,handleChange:p,onClickRoot:x}=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}}),a=o.useNamespace("checkbox"),C=e.computed(()=>[a.b(),a.m(v.value),a.is("disabled",b.value),a.is("bordered",t.border),a.is("checked",c.value)]),k=e.computed(()=>[a.e("input"),a.is("disabled",b.value),a.is("checked",c.value),a.is("indeterminate",t.indeterminate),a.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(x)},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(e.unref(k))},[e.withDirectives(e.createElementVNode("input",e.mergeProps({id:e.unref(n),"onUpdate:modelValue":V=>e.isRef(r)?r.value=V:null,class:e.unref(a).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(a).e("inner"))},null,2)],2),e.unref(f)?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(a).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:n,isChecked:m,isDisabled:c,checkboxButtonSize:b,model:u,actualValue:v,handleChange:f}=D(t,i),r=e.computed(()=>{var a,C,k,d;return t.trueValue||t.falseValue||t.trueLabel||t.falseLabel?{"true-value":(C=(a=t.trueValue)!=null?a: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"),x=e.computed(()=>{var a,C,k,d;const _=(C=(a=s==null?void 0:s.fill)==null?void 0:a.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",n.value)]);return(a,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:a.name,tabindex:a.tabindex,disabled:e.unref(c)},e.unref(r),{onChange:e.unref(f),onFocus:k=>n.value=!0,onBlur:k=>n.value=!1,onClick:e.withModifiers(()=>{},["stop"])}),null,16,["onUpdate:modelValue","name","tabindex","disabled","onChange","onFocus","onBlur","onClick"]),[[e.vModelCheckbox,e.unref(u)]]),a.$slots.default||a.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(x):void 0)},[e.renderSlot(a.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(a.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},...g.useAriaProps(["ariaLabel"])}),R={[g.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,n=o.useNamespace("checkbox"),{formItem:m}=E.useFormItem(),{inputId:c,isLabeledByFormItem:b}=E.useFormItemInputId(i,{formItemContext:m}),u=async s=>{t(g.UPDATE_MODEL_EVENT,s),await e.nextTick(),t(g.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,{...g.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(x=>g.debugWarn()))}),(s,p)=>{var x;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(s.tag),{id:e.unref(c),class:e.normalizeClass(e.unref(n).b("group")),role:"group","aria-label":e.unref(b)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":e.unref(b)?(x=e.unref(m))==null?void 0:x.labelId:void 0},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.options,(h,a)=>(e.openBlock(),e.createBlock(P,e.mergeProps({key:a},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;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { inject as I, computed as m, getCurrentInstance as
|
|
2
|
-
import {
|
|
3
|
-
import { u as be, U as F, d as ve, C as P, p as Be } from "./el-popper-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { inject as I, computed as m, getCurrentInstance as Q, watch as Y, nextTick as Z, ref as D, toRaw as H, defineComponent as S, useSlots as ee, openBlock as V, createBlock as w, resolveDynamicComponent as le, unref as s, normalizeClass as y, withCtx as ae, createElementVNode as N, withDirectives as te, mergeProps as O, isRef as ne, withModifiers as oe, vModelCheckbox as ue, createElementBlock as E, renderSlot as M, Fragment as se, createTextVNode as ie, toDisplayString as re, createCommentVNode as $, normalizeStyle as Ve, provide as ye, toRefs as Se, renderList as Le } from "vue";
|
|
2
|
+
import { u as ce, e as Ee, f as R, a as W, g as de } from "./use-form-common-props-4cdda474.js";
|
|
3
|
+
import { u as be, U as F, d as ve, C as P, p as Be } from "./el-popper-49152708.js";
|
|
4
|
+
import { m as X, n as J, o as T, A as U, i as B, X as A, p as Ie, u as j, _ as K, b as Ne, d as G, w as Fe, T as me } from "./base-aa512893.js";
|
|
5
|
+
import { f as fe } from "./index-3d0bc5da.js";
|
|
6
6
|
import { u as z } from "./index-2e331d74.js";
|
|
7
7
|
const he = {
|
|
8
8
|
modelValue: {
|
|
@@ -53,8 +53,8 @@ const he = {
|
|
|
53
53
|
},
|
|
54
54
|
...be(["ariaControls"])
|
|
55
55
|
}, pe = {
|
|
56
|
-
[F]: (e) =>
|
|
57
|
-
change: (e) =>
|
|
56
|
+
[F]: (e) => X(e) || J(e) || T(e),
|
|
57
|
+
change: (e) => X(e) || J(e) || T(e)
|
|
58
58
|
}, L = Symbol("checkboxGroupContextKey"), Ge = ({
|
|
59
59
|
model: e,
|
|
60
60
|
isChecked: l
|
|
@@ -62,7 +62,7 @@ const he = {
|
|
|
62
62
|
const i = I(L, void 0), t = m(() => {
|
|
63
63
|
var r, b;
|
|
64
64
|
const n = (r = i == null ? void 0 : i.max) == null ? void 0 : r.value, v = (b = i == null ? void 0 : i.min) == null ? void 0 : b.value;
|
|
65
|
-
return !
|
|
65
|
+
return !U(n) && e.value.length >= n && !l.value || !U(v) && e.value.length <= v && l.value;
|
|
66
66
|
});
|
|
67
67
|
return {
|
|
68
68
|
isDisabled: Ee(m(() => (i == null ? void 0 : i.disabled.value) || t.value)),
|
|
@@ -75,7 +75,7 @@ const he = {
|
|
|
75
75
|
isDisabled: d,
|
|
76
76
|
isLabeledByFormItem: r
|
|
77
77
|
}) => {
|
|
78
|
-
const b = I(L, void 0), { formItem: n } =
|
|
78
|
+
const b = I(L, void 0), { formItem: n } = R(), { emit: v } = Q();
|
|
79
79
|
function f(p) {
|
|
80
80
|
var a, g, k, c;
|
|
81
81
|
return [!0, e.trueValue, e.trueLabel].includes(p) ? (g = (a = e.trueValue) != null ? a : e.trueLabel) != null ? g : !0 : (c = (k = e.falseValue) != null ? k : e.falseLabel) != null ? c : !1;
|
|
@@ -100,7 +100,7 @@ const he = {
|
|
|
100
100
|
onClickRoot: h
|
|
101
101
|
};
|
|
102
102
|
}, De = (e) => {
|
|
103
|
-
const l = D(!1), { emit: i } =
|
|
103
|
+
const l = D(!1), { emit: i } = Q(), t = I(L, void 0), d = m(() => U(t) === !1), r = D(!1), b = m({
|
|
104
104
|
get() {
|
|
105
105
|
var n, v;
|
|
106
106
|
return d.value ? (n = t == null ? void 0 : t.modelValue) == null ? void 0 : n.value : (v = e.modelValue) != null ? v : l.value;
|
|
@@ -116,9 +116,9 @@ const he = {
|
|
|
116
116
|
isLimitExceeded: r
|
|
117
117
|
};
|
|
118
118
|
}, we = (e, l, { model: i }) => {
|
|
119
|
-
const t = I(L, void 0), d = D(!1), r = m(() =>
|
|
119
|
+
const t = I(L, void 0), d = D(!1), r = m(() => A(e.value) ? e.label : e.value), b = m(() => {
|
|
120
120
|
const o = i.value;
|
|
121
|
-
return
|
|
121
|
+
return T(o) ? o : B(o) ? Ie(r.value) ? o.map(H).some((u) => fe(u, r.value)) : o.map(H).includes(r.value) : o != null ? o === e.trueValue || o === e.trueLabel : !!o;
|
|
122
122
|
}), n = W(m(() => {
|
|
123
123
|
var o;
|
|
124
124
|
return (o = t == null ? void 0 : t.size) == null ? void 0 : o.value;
|
|
@@ -127,7 +127,7 @@ const he = {
|
|
|
127
127
|
}), v = W(m(() => {
|
|
128
128
|
var o;
|
|
129
129
|
return (o = t == null ? void 0 : t.size) == null ? void 0 : o.value;
|
|
130
|
-
})), f = m(() => !!l.default || !
|
|
130
|
+
})), f = m(() => !!l.default || !A(r.value));
|
|
131
131
|
return {
|
|
132
132
|
checkboxButtonSize: n,
|
|
133
133
|
isChecked: b,
|
|
@@ -137,7 +137,7 @@ const he = {
|
|
|
137
137
|
actualValue: r
|
|
138
138
|
};
|
|
139
139
|
}, ke = (e, l) => {
|
|
140
|
-
const { formItem: i } =
|
|
140
|
+
const { formItem: i } = R(), { model: t, isGroup: d, isLimitExceeded: r } = De(e), {
|
|
141
141
|
isFocused: b,
|
|
142
142
|
isChecked: n,
|
|
143
143
|
checkboxButtonSize: v,
|
|
@@ -167,7 +167,7 @@ const he = {
|
|
|
167
167
|
version: "3.0.0",
|
|
168
168
|
scope: "el-checkbox",
|
|
169
169
|
ref: "https://element-plus.org/en-US/component/checkbox.html"
|
|
170
|
-
}, m(() => d.value &&
|
|
170
|
+
}, m(() => d.value && A(e.value))), z({
|
|
171
171
|
from: "true-label",
|
|
172
172
|
replacement: "true-value",
|
|
173
173
|
version: "3.0.0",
|
|
@@ -220,7 +220,7 @@ const he = {
|
|
|
220
220
|
} : {
|
|
221
221
|
value: u.value
|
|
222
222
|
};
|
|
223
|
-
}), a =
|
|
223
|
+
}), a = j("checkbox"), g = m(() => [
|
|
224
224
|
a.b(),
|
|
225
225
|
a.m(v.value),
|
|
226
226
|
a.is("disabled", b.value),
|
|
@@ -242,7 +242,7 @@ const he = {
|
|
|
242
242
|
N("span", {
|
|
243
243
|
class: y(s(k))
|
|
244
244
|
}, [
|
|
245
|
-
te(N("input",
|
|
245
|
+
te(N("input", O({
|
|
246
246
|
id: s(t),
|
|
247
247
|
"onUpdate:modelValue": (_) => ne(o) ? o.value = _ : null,
|
|
248
248
|
class: s(a).e("original"),
|
|
@@ -268,7 +268,7 @@ const he = {
|
|
|
268
268
|
key: 0,
|
|
269
269
|
class: y(s(a).e("label"))
|
|
270
270
|
}, [
|
|
271
|
-
|
|
271
|
+
M(c.$slots, "default"),
|
|
272
272
|
c.$slots.default ? $("v-if", !0) : (V(), E(se, { key: 0 }, [
|
|
273
273
|
ie(re(c.label), 1)
|
|
274
274
|
], 64))
|
|
@@ -279,10 +279,10 @@ const he = {
|
|
|
279
279
|
}
|
|
280
280
|
});
|
|
281
281
|
var ge = /* @__PURE__ */ K(Pe, [["__file", "checkbox.vue"]]);
|
|
282
|
-
const
|
|
282
|
+
const Te = S({
|
|
283
283
|
name: "ElCheckboxButton"
|
|
284
|
-
}),
|
|
285
|
-
...
|
|
284
|
+
}), Ue = /* @__PURE__ */ S({
|
|
285
|
+
...Te,
|
|
286
286
|
props: he,
|
|
287
287
|
emits: pe,
|
|
288
288
|
setup(e) {
|
|
@@ -302,7 +302,7 @@ const Ue = S({
|
|
|
302
302
|
} : {
|
|
303
303
|
value: v.value
|
|
304
304
|
};
|
|
305
|
-
}), u = I(L, void 0), h =
|
|
305
|
+
}), u = I(L, void 0), h = j("checkbox"), x = m(() => {
|
|
306
306
|
var a, g, k, c;
|
|
307
307
|
const C = (g = (a = u == null ? void 0 : u.fill) == null ? void 0 : a.value) != null ? g : "";
|
|
308
308
|
return {
|
|
@@ -321,7 +321,7 @@ const Ue = S({
|
|
|
321
321
|
return (a, g) => (V(), E("label", {
|
|
322
322
|
class: y(s(p))
|
|
323
323
|
}, [
|
|
324
|
-
te(N("input",
|
|
324
|
+
te(N("input", O({
|
|
325
325
|
"onUpdate:modelValue": (k) => ne(n) ? n.value = k : null,
|
|
326
326
|
class: s(h).be("button", "original"),
|
|
327
327
|
type: "checkbox",
|
|
@@ -342,15 +342,15 @@ const Ue = S({
|
|
|
342
342
|
class: y(s(h).be("button", "inner")),
|
|
343
343
|
style: Ve(s(d) ? s(x) : void 0)
|
|
344
344
|
}, [
|
|
345
|
-
|
|
345
|
+
M(a.$slots, "default", {}, () => [
|
|
346
346
|
ie(re(a.label), 1)
|
|
347
347
|
])
|
|
348
348
|
], 6)) : $("v-if", !0)
|
|
349
349
|
], 2));
|
|
350
350
|
}
|
|
351
351
|
});
|
|
352
|
-
var xe = /* @__PURE__ */ K(
|
|
353
|
-
const
|
|
352
|
+
var xe = /* @__PURE__ */ K(Ue, [["__file", "checkbox-button.vue"]]);
|
|
353
|
+
const Ae = Ne({
|
|
354
354
|
modelValue: {
|
|
355
355
|
type: G(Array),
|
|
356
356
|
default: () => []
|
|
@@ -377,21 +377,21 @@ const Te = Ne({
|
|
|
377
377
|
default: () => Ce
|
|
378
378
|
},
|
|
379
379
|
...be(["ariaLabel"])
|
|
380
|
-
}),
|
|
380
|
+
}), Oe = {
|
|
381
381
|
[F]: (e) => B(e),
|
|
382
382
|
change: (e) => B(e)
|
|
383
383
|
}, Ce = {
|
|
384
384
|
label: "label",
|
|
385
385
|
value: "value",
|
|
386
386
|
disabled: "disabled"
|
|
387
|
-
},
|
|
387
|
+
}, Me = S({
|
|
388
388
|
name: "ElCheckboxGroup"
|
|
389
|
-
}),
|
|
390
|
-
...
|
|
391
|
-
props:
|
|
392
|
-
emits:
|
|
389
|
+
}), Re = /* @__PURE__ */ S({
|
|
390
|
+
...Me,
|
|
391
|
+
props: Ae,
|
|
392
|
+
emits: Oe,
|
|
393
393
|
setup(e, { emit: l }) {
|
|
394
|
-
const i = e, t =
|
|
394
|
+
const i = e, t = j("checkbox"), { formItem: d } = R(), { inputId: r, isLabeledByFormItem: b } = de(i, {
|
|
395
395
|
formItemContext: d
|
|
396
396
|
}), n = async (u) => {
|
|
397
397
|
l(F, u), await Z(), l(P, u);
|
|
@@ -437,8 +437,8 @@ const Te = Ne({
|
|
|
437
437
|
"aria-labelledby": s(b) ? (x = s(d)) == null ? void 0 : x.labelId : void 0
|
|
438
438
|
}, {
|
|
439
439
|
default: ae(() => [
|
|
440
|
-
|
|
441
|
-
(V(!0), E(se, null, Le(i.options, (p, a) => (V(), w(ge,
|
|
440
|
+
M(u.$slots, "default", {}, () => [
|
|
441
|
+
(V(!0), E(se, null, Le(i.options, (p, a) => (V(), w(ge, O({ key: a }, o(p)), null, 16))), 128))
|
|
442
442
|
])
|
|
443
443
|
]),
|
|
444
444
|
_: 3
|
|
@@ -446,14 +446,14 @@ const Te = Ne({
|
|
|
446
446
|
};
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
|
-
var _e = /* @__PURE__ */ K(
|
|
450
|
-
const
|
|
449
|
+
var _e = /* @__PURE__ */ K(Re, [["__file", "checkbox-group.vue"]]);
|
|
450
|
+
const Je = Fe(ge, {
|
|
451
451
|
CheckboxButton: xe,
|
|
452
452
|
CheckboxGroup: _e
|
|
453
453
|
});
|
|
454
454
|
me(xe);
|
|
455
|
-
const
|
|
455
|
+
const Qe = me(_e);
|
|
456
456
|
export {
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
Je as E,
|
|
458
|
+
Qe as a
|
|
459
459
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ref as I, onMounted as _, watchEffect as J, onBeforeUnmount as G, defineComponent as A, inject as j, computed as L, openBlock as P, createElementBlock as B, unref as e, normalizeClass as h, normalizeStyle as K, createElementVNode as R, renderSlot as k, toDisplayString as Q, createVNode as S, withCtx as C, createBlock as N, resolveDynamicComponent as Z, createCommentVNode as O, useSlots as x, provide as ee, Transition as oe, mergeProps as q, withDirectives as se, createSlots as te, vShow as le } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { F as fe,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { u as ye } from "./index-d77a7336.js";
|
|
2
|
+
import { d as ae, b as ne, c as V, e as re, f as ie, g as de, E as ce, a as ue } from "./el-overlay-04426e36.js";
|
|
3
|
+
import { F as fe, f as me, b as ve } from "./el-popper-49152708.js";
|
|
4
|
+
import { s as H, g as pe, E as ge, _ as W, u as he, w as Ce } from "./base-aa512893.js";
|
|
5
|
+
import { C as be } from "./use-form-common-props-4cdda474.js";
|
|
6
|
+
import { a as ye } from "./index-3d0bc5da.js";
|
|
8
7
|
import { u as Ee } from "./index-2e331d74.js";
|
|
9
8
|
const we = (r, d, l, $) => {
|
|
10
9
|
const a = {
|
|
@@ -47,7 +46,7 @@ const we = (r, d, l, $) => {
|
|
|
47
46
|
};
|
|
48
47
|
}, ke = (...r) => (d) => {
|
|
49
48
|
r.forEach((l) => {
|
|
50
|
-
|
|
49
|
+
pe(l) ? l(d) : l.value = d;
|
|
51
50
|
});
|
|
52
51
|
}, $e = A({ name: "ElDialogContent" }), De = /* @__PURE__ */ A({
|
|
53
52
|
...$e,
|
|
@@ -90,7 +89,7 @@ const we = (r, d, l, $) => {
|
|
|
90
89
|
type: "button",
|
|
91
90
|
onClick: (w) => s.$emit("close")
|
|
92
91
|
}, [
|
|
93
|
-
S(e(
|
|
92
|
+
S(e(ge), {
|
|
94
93
|
class: h(e(t).e("close"))
|
|
95
94
|
}, {
|
|
96
95
|
default: C(() => [
|
|
@@ -268,9 +267,9 @@ const Me = A({
|
|
|
268
267
|
}
|
|
269
268
|
});
|
|
270
269
|
var Le = /* @__PURE__ */ W(Te, [["__file", "dialog.vue"]]);
|
|
271
|
-
const
|
|
270
|
+
const Ne = Ce(Le);
|
|
272
271
|
export {
|
|
273
|
-
|
|
272
|
+
Ne as E,
|
|
274
273
|
ke as c,
|
|
275
274
|
we as u
|
|
276
275
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./el-overlay-60bc5a02.cjs"),T=require("./el-popper-1dd8f5b4.cjs"),h=require("./base-7ba08794.cjs"),I=require("./use-form-common-props-41182853.cjs"),R=require("./index-c30cf7f9.cjs"),V=require("./index-f1c702f6.cjs"),N=(r,d,s,k)=>{const l={offsetX:0,offsetY:0},c=e.ref(!1),b=(a,i)=>{if(r.value){const{offsetX:g,offsetY:C}=l,u=r.value.getBoundingClientRect(),f=u.left,t=u.top,m=u.width,E=u.height,$=document.documentElement.clientWidth,S=document.documentElement.clientHeight,z=-f+g,B=-t+C,P=$-f-m+g,M=S-t-(E<S?E:0)+C;k!=null&&k.value||(a=Math.min(Math.max(a,z),P),i=Math.min(Math.max(i,B),M)),l.offsetX=a,l.offsetY=i,r.value.style.transform=`translate(${h.addUnit(a)}, ${h.addUnit(i)})`}},v=a=>{const i=a.clientX,g=a.clientY,{offsetX:C,offsetY:u}=l,f=m=>{c.value||(c.value=!0);const E=C+m.clientX-i,$=u+m.clientY-g;b(E,$)},t=()=>{c.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",f),document.addEventListener("mouseup",t)},n=()=>{d.value&&r.value&&(d.value.addEventListener("mousedown",v),window.addEventListener("resize",w))},y=()=>{d.value&&r.value&&(d.value.removeEventListener("mousedown",v),window.removeEventListener("resize",w))},D=()=>{l.offsetX=0,l.offsetY=0,r.value&&(r.value.style.transform="")},w=()=>{const{offsetX:a,offsetY:i}=l;b(a,i)};return e.onMounted(()=>{e.watchEffect(()=>{s.value?n():y()})}),e.onBeforeUnmount(()=>{y()}),{isDragging:c,resetPosition:D,updatePosition:w}},F=(...r)=>d=>{r.forEach(s=>{h.isFunction(s)?s(d):s.value=d})},q=e.defineComponent({name:"ElDialogContent"}),A=e.defineComponent({...q,props:p.dialogContentProps,emits:p.dialogContentEmits,setup(r,{expose:d}){const s=r,{t:k}=R.useLocale(),{Close:l}=I.CloseComponents,{dialogRef:c,headerRef:b,bodyId:v,ns:n,style:y}=e.inject(p.dialogInjectionKey),{focusTrapRef:D}=e.inject(T.FOCUS_TRAP_INJECTION_KEY),w=F(D,c),a=e.computed(()=>!!s.draggable),i=e.computed(()=>!!s.overflow),{resetPosition:g,updatePosition:C,isDragging:u}=N(c,b,a,i),f=e.computed(()=>[n.b(),n.is("fullscreen",s.fullscreen),n.is("draggable",a.value),n.is("dragging",u.value),n.is("align-center",!!s.alignCenter),{[n.m("center")]:s.center}]);return d({resetPosition:g,updatePosition:C}),(t,m)=>(e.openBlock(),e.createElementBlock("div",{ref:e.unref(w),class:e.normalizeClass(e.unref(f)),style:e.normalizeStyle(e.unref(y)),tabindex:"-1"},[e.createElementVNode("header",{ref_key:"headerRef",ref:b,class:e.normalizeClass([e.unref(n).e("header"),t.headerClass,{"show-close":t.showClose}])},[e.renderSlot(t.$slots,"header",{},()=>[e.createElementVNode("span",{role:"heading","aria-level":t.ariaLevel,class:e.normalizeClass(e.unref(n).e("title"))},e.toDisplayString(t.title),11,["aria-level"])]),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":e.unref(k)("el.dialog.close"),class:e.normalizeClass(e.unref(n).e("headerbtn")),type:"button",onClick:E=>t.$emit("close")},[e.createVNode(e.unref(h.ElIcon),{class:e.normalizeClass(e.unref(n).e("close"))},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.closeIcon||e.unref(l))))]),_:1},8,["class"])],10,["aria-label","onClick"])):e.createCommentVNode("v-if",!0)],2),e.createElementVNode("div",{id:e.unref(v),class:e.normalizeClass([e.unref(n).e("body"),t.bodyClass])},[e.renderSlot(t.$slots,"default")],10,["id"]),t.$slots.footer?(e.openBlock(),e.createElementBlock("footer",{key:0,class:e.normalizeClass([e.unref(n).e("footer"),t.footerClass])},[e.renderSlot(t.$slots,"footer")],2)):e.createCommentVNode("v-if",!0)],6))}});var Y=h._export_sfc(A,[["__file","dialog-content.vue"]]);const X=e.defineComponent({name:"ElDialog",inheritAttrs:!1}),j=e.defineComponent({...X,props:p.dialogProps,emits:p.dialogEmits,setup(r,{expose:d}){const s=r,k=e.useSlots();V.useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},e.computed(()=>!!k.title));const l=h.useNamespace("dialog"),c=e.ref(),b=e.ref(),v=e.ref(),{visible:n,titleId:y,bodyId:D,style:w,overlayDialogStyle:a,rendered:i,transitionConfig:g,zIndex:C,_draggable:u,_alignCenter:f,_overflow:t,handleClose:m,onModalClick:E,onOpenAutoFocus:$,onCloseAutoFocus:S,onCloseRequested:z,onFocusoutPrevented:B}=p.useDialog(s,c);e.provide(p.dialogInjectionKey,{dialogRef:c,headerRef:b,bodyId:D,ns:l,rendered:i,style:w});const P=p.useSameTarget(E),M=e.computed(()=>s.modalPenetrable&&!s.modal&&!s.fullscreen);return d({visible:n,dialogContentRef:v,resetPosition:()=>{var o;(o=v.value)==null||o.resetPosition()},handleClose:m}),(o,_)=>(e.openBlock(),e.createBlock(e.unref(T.ElTeleport),{to:o.appendTo,disabled:o.appendTo!=="body"?!1:!o.appendToBody},{default:e.withCtx(()=>[e.createVNode(e.Transition,e.mergeProps(e.unref(g),{persisted:""}),{default:e.withCtx(()=>{var L;return[e.withDirectives(e.createVNode(e.unref(p.ElOverlay),{"custom-mask-event":"",mask:o.modal,"overlay-class":[(L=o.modalClass)!=null?L:"",`${e.unref(l).namespace.value}-modal-dialog`,e.unref(l).is("penetrable",e.unref(M))],"z-index":e.unref(C)},{default:e.withCtx(()=>[e.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":o.title||void 0,"aria-labelledby":o.title?void 0:e.unref(y),"aria-describedby":e.unref(D),class:e.normalizeClass(`${e.unref(l).namespace.value}-overlay-dialog`),style:e.normalizeStyle(e.unref(a)),onClick:e.unref(P).onClick,onMousedown:e.unref(P).onMousedown,onMouseup:e.unref(P).onMouseup},[e.createVNode(e.unref(T.ElFocusTrap),{loop:"",trapped:e.unref(n),"focus-start-el":"container",onFocusAfterTrapped:e.unref($),onFocusAfterReleased:e.unref(S),onFocusoutPrevented:e.unref(B),onReleaseRequested:e.unref(z)},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createBlock(Y,e.mergeProps({key:0,ref_key:"dialogContentRef",ref:v},o.$attrs,{center:o.center,"align-center":e.unref(f),"close-icon":o.closeIcon,draggable:e.unref(u),overflow:e.unref(t),fullscreen:o.fullscreen,"header-class":o.headerClass,"body-class":o.bodyClass,"footer-class":o.footerClass,"show-close":o.showClose,title:o.title,"aria-level":o.headerAriaLevel,onClose:e.unref(m)}),e.createSlots({header:e.withCtx(()=>[o.$slots.title?e.renderSlot(o.$slots,"title",{key:1}):e.renderSlot(o.$slots,"header",{key:0,close:e.unref(m),titleId:e.unref(y),titleClass:e.unref(l).e("title")})]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:2},[o.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):e.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[e.vShow,e.unref(n)]])]}),_:3},16)]),_:3},8,["to","disabled"]))}});var O=h._export_sfc(j,[["__file","dialog.vue"]]);const U=h.withInstall(O);exports.ElDialog=U;exports.composeRefs=F;exports.useDraggable=N;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as n, computed as c, openBlock as o, createElementBlock as i, normalizeClass as s, unref as r, normalizeStyle as p, renderSlot as u, createCommentVNode as v } from "vue";
|
|
2
|
-
import { b as f,
|
|
2
|
+
import { b as f, d as m, u as y, _ as S, w as _ } from "./base-aa512893.js";
|
|
3
3
|
const b = f({
|
|
4
4
|
direction: {
|
|
5
5
|
type: String,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),i=require("./base-
|
|
1
|
+
"use strict";const e=require("vue"),i=require("./base-7ba08794.cjs"),l=i.buildProps({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:i.definePropType(String),default:"solid"}}),d=e.defineComponent({name:"ElDivider"}),a=e.defineComponent({...d,props:l,setup(n){const o=n,t=i.useNamespace("divider"),s=e.computed(()=>t.cssVar({"border-style":o.borderStyle}));return(r,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(t).b(),e.unref(t).m(r.direction)]),style:e.normalizeStyle(e.unref(s)),role:"separator"},[r.$slots.default&&r.direction!=="vertical"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("text"),e.unref(t).is(r.contentPosition)])},[e.renderSlot(r.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],6))}});var c=i._export_sfc(a,[["__file","divider.vue"]]);const u=i.withInstall(c);exports.ElDivider=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as c, openBlock as r, createElementBlock as n, createElementVNode as l, unref as t, computed as d, normalizeClass as i, normalizeStyle as k, renderSlot as m, createVNode as v, toDisplayString as $, createCommentVNode as h } from "vue";
|
|
2
|
-
import { u, _ as y, b as _,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { u, _ as y, b as _, s as N, w } from "./base-aa512893.js";
|
|
3
|
+
import { d as B } from "./use-form-common-props-4cdda474.js";
|
|
4
|
+
import { a as V } from "./index-3d0bc5da.js";
|
|
5
5
|
const x = c({
|
|
6
6
|
name: "ImgEmpty"
|
|
7
7
|
}), E = /* @__PURE__ */ c({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),o=require("./base-7ba08794.cjs"),i=require("./use-form-common-props-41182853.cjs"),m=require("./index-c30cf7f9.cjs"),f=e.defineComponent({name:"ImgEmpty"}),d=e.defineComponent({...f,setup(a){const l=o.useNamespace("empty"),t=i.useId();return(n,s)=>(e.openBlock(),e.createElementBlock("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`linearGradient-1-${e.unref(t)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[e.createElementVNode("stop",{"stop-color":`var(${e.unref(l).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),e.createElementVNode("stop",{"stop-color":`var(${e.unref(l).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),e.createElementVNode("linearGradient",{id:`linearGradient-2-${e.unref(t)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[e.createElementVNode("stop",{"stop-color":`var(${e.unref(l).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),e.createElementVNode("stop",{"stop-color":`var(${e.unref(l).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),e.createElementVNode("rect",{id:`path-3-${e.unref(t)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),e.createElementVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createElementVNode("g",{transform:"translate(-1268.000000, -535.000000)"},[e.createElementVNode("g",{transform:"translate(1268.000000, 535.000000)"},[e.createElementVNode("path",{d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${e.unref(l).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),e.createElementVNode("g",{transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),e.createElementVNode("rect",{fill:`url(#linearGradient-1-${e.unref(t)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),e.createElementVNode("rect",{fill:`url(#linearGradient-2-${e.unref(t)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),e.createElementVNode("g",{transform:"translate(53.000000, 45.000000)"},[e.createElementVNode("use",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${e.unref(t)}`},null,8,["fill","xlink:href"]),e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${e.unref(t)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),e.createElementVNode("polygon",{fill:`var(${e.unref(l).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var p=o._export_sfc(d,[["__file","img-empty.vue"]]);const u=o.buildProps({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),N=e.defineComponent({name:"ElEmpty"}),E=e.defineComponent({...N,props:u,setup(a){const l=a,{t}=m.useLocale(),n=o.useNamespace("empty"),s=e.computed(()=>l.description||t("el.table.emptyText")),c=e.computed(()=>({width:o.addUnit(l.imageSize)}));return(r,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n).b())},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("image")),style:e.normalizeStyle(e.unref(c))},[r.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.image,ondragstart:"return false"},null,8,["src"])):e.renderSlot(r.$slots,"image",{key:1},()=>[e.createVNode(p)])],6),e.createElementVNode("div",{class:e.normalizeClass(e.unref(n).e("description"))},[r.$slots.description?e.renderSlot(r.$slots,"description",{key:0}):(e.openBlock(),e.createElementBlock("p",{key:1},e.toDisplayString(e.unref(s)),1))],2),r.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).e("bottom"))},[e.renderSlot(r.$slots,"default")],2)):e.createCommentVNode("v-if",!0)],2))}});var V=o._export_sfc(E,[["__file","empty.vue"]]);const y=o.withInstall(V);exports.ElEmpty=y;
|