st-comp 0.0.200 → 0.0.202
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 +3 -0
- package/es/ChartLayout.js +4 -4
- package/es/ConfigProvider.cjs +1 -1
- package/es/ConfigProvider.js +1 -1
- package/es/CustomFunction.cjs +1 -1
- package/es/CustomFunction.js +44 -40
- package/es/FactorWarning.cjs +1 -1
- package/es/FactorWarning.js +84 -78
- package/es/Kline.cjs +1 -1
- package/es/Kline.js +21 -19
- package/es/KlineBasic.cjs +1 -1
- package/es/KlineBasic.js +30 -28
- package/es/KlineConfig.cjs +1 -1
- package/es/KlineConfig.js +345 -331
- package/es/KlineNew.cjs +1 -1
- package/es/KlineNew.js +20 -18
- package/es/KlinePlus.cjs +4 -4
- package/es/KlinePlus.js +610 -588
- package/es/MonacoEditor.cjs +1 -1
- package/es/MonacoEditor.js +2 -2
- package/es/Pagination.cjs +1 -1
- package/es/Pagination.js +74 -72
- package/es/PasswordPrompt.cjs +1 -1
- package/es/PasswordPrompt.js +9 -157
- package/es/Pie.cjs +1 -1
- package/es/Pie.js +1 -1
- package/es/Table.cjs +1 -1
- package/es/Table.js +56 -52
- package/es/User.cjs +1 -1
- package/es/User.js +1313 -1
- package/es/VarSelectDialog.cjs +1 -1
- package/es/VarSelectDialog.js +28 -26
- package/es/VarietyAutoComplete.cjs +1 -1
- package/es/VarietyAutoComplete.js +19 -18
- package/es/VarietySearch.cjs +8 -8
- package/es/VarietySearch.js +704 -697
- package/es/VarietyTextCopy.cjs +1 -1
- package/es/VarietyTextCopy.js +12 -12
- package/es/VirtualTable.cjs +1 -1
- package/es/VirtualTable.js +80 -79
- package/es/{el-popover-5421d52a.cjs → _initCloneObject-52b6a510.cjs} +1 -1
- package/es/{el-popover-7a1c6412.js → _initCloneObject-eaef9418.js} +9 -9
- package/es/{base-8348063b.js → base-a5af3db3.js} +38 -38
- package/es/{castArray-3f45c3ec.js → castArray-7741a212.js} +1 -1
- package/es/{config-provider-eb0460f1.cjs → config-provider-a584d81e.cjs} +1 -1
- package/es/{config-provider-1a687690.js → config-provider-b16efd62.js} +6 -6
- package/es/debounce-62f5b6e8.cjs +1 -0
- package/es/debounce-8d53f4dd.js +83 -0
- package/es/dropdown-071c5d7e.cjs +1 -0
- package/es/dropdown-a59bba73.js +178 -0
- package/es/el-autocomplete-a07e9439.cjs +1 -0
- package/es/{el-autocomplete-d4cd96cd.js → el-autocomplete-ba808eb6.js} +16 -16
- package/es/{el-button-2e680390.js → el-button-c95adb85.js} +33 -33
- package/es/{el-button-4ccd7122.cjs → el-button-eec58cff.cjs} +1 -1
- package/es/el-checkbox-7421ccd3.js +459 -0
- package/es/el-checkbox-c25236a6.cjs +1 -0
- package/es/el-checkbox-group-0ea8fbf8.cjs +1 -0
- package/es/el-checkbox-group-4ed993c7.js +1 -0
- package/es/{el-dialog-bafc4b2b.js → el-dialog-41ab8417.js} +7 -6
- package/es/{el-dialog-6413b4af.cjs → el-dialog-ae86edb8.cjs} +1 -1
- package/es/{el-divider-93b0ee21.js → el-divider-4e059794.js} +1 -1
- package/es/{el-empty-56783dca.js → el-empty-33cb66f1.js} +3 -3
- package/es/el-form-item-c3fe189b.cjs +12 -0
- package/es/el-form-item-c53c374d.js +1269 -0
- package/es/{el-input-735575f4.js → el-input-2f75c4ba.js} +34 -34
- package/es/{el-input-6c5ac889.cjs → el-input-7fd293af.cjs} +1 -1
- package/es/{el-input-number-d5770776.cjs → el-input-number-22e21d16.cjs} +1 -1
- package/es/{el-input-number-6634a6ea.js → el-input-number-5193fe6d.js} +35 -35
- package/es/{el-loading-98dcebee.cjs → el-loading-cfd86c15.cjs} +1 -1
- package/es/{el-loading-049dacc5.js → el-loading-f6022062.js} +5 -5
- package/es/{el-menu-item-828bc6fa.cjs → el-menu-item-17dc717e.cjs} +1 -1
- package/es/{el-menu-item-8a210e21.js → el-menu-item-7e881203.js} +22 -22
- package/es/{el-message-a1ac37d4.cjs → el-message-5e6a6be9.cjs} +1 -1
- package/es/el-message-box-a93d2f6a.js +489 -0
- package/es/el-message-box-c10adb52.cjs +1 -0
- package/es/{el-message-def216ae.js → el-message-e544a8f5.js} +24 -24
- package/es/{el-overlay-4ea38eab.js → el-overlay-09ad71cd.js} +51 -51
- package/es/{el-overlay-69dfacb6.cjs → el-overlay-9e34965f.cjs} +1 -1
- package/es/{el-popconfirm-bdeceeb7.cjs → el-popconfirm-70a976bf.cjs} +1 -1
- package/es/{el-popconfirm-aace1104.js → el-popconfirm-81dcd202.js} +20 -20
- package/es/el-popover-0ea8fbf8.cjs +1 -0
- package/es/el-popover-4ed993c7.js +1 -0
- package/es/{el-popper-986a8371.js → el-popper-b4f97157.js} +115 -112
- package/es/{el-popper-b962125f.cjs → el-popper-b6c99b28.cjs} +1 -1
- package/es/el-scrollbar-323542e7.js +34 -0
- package/es/el-scrollbar-bc3f790d.cjs +1 -0
- package/es/{el-segmented-f892ec18.js → el-segmented-b868d074.js} +8 -8
- package/es/{el-segmented-6b057ed5.cjs → el-segmented-f8fce9ac.cjs} +1 -1
- package/es/{el-select-2189a8ac.js → el-select-95627997.js} +42 -41
- package/es/el-select-d8d91db1.cjs +1 -0
- package/es/el-table-column-376cd907.js +3432 -0
- package/es/el-table-column-c974cb96.cjs +14 -0
- package/es/{el-tag-75a7573a.js → el-tag-66cab138.js} +16 -16
- package/es/{el-tag-a15520b3.cjs → el-tag-a33c4b22.cjs} +1 -1
- package/es/{el-checkbox-group-e26a4533.js → el-text-ac60d0f2.js} +16 -16
- package/es/{el-checkbox-group-dfdad075.cjs → el-text-c20a9f48.cjs} +1 -1
- package/es/{index-1fb95601.cjs → index-098c2447.cjs} +1 -1
- package/es/{index-16802b35.cjs → index-11547a0c.cjs} +1 -1
- package/es/index-1f7d4f70.js +157 -0
- package/es/{index-680be212.cjs → index-298075cf.cjs} +1 -1
- package/es/index-57672682.js +113 -0
- package/es/{index-9cfb6ccf.js → index-7ed0999e.js} +2 -0
- package/es/{index-f3a86049.js → index-844bdd85.js} +29 -29
- package/es/index-88546436.js +163 -0
- package/es/{index-cc200b99.cjs → index-8901a38c.cjs} +1 -1
- package/es/{index-e00ee015.js → index-960806da.js} +36 -36
- package/es/index-9b9ef5dd.cjs +1 -0
- package/es/{index-847d58bc.js → index-a871c3eb.js} +92 -62
- package/es/{index-780e7fd2.js → index-bc8e277e.js} +2 -2
- package/es/{index-5e0314ac.cjs → index-c108567d.cjs} +1 -1
- package/es/{index-78381381.cjs → index-d725fef6.cjs} +2 -2
- package/es/{index-14c88a1a.js → index-d77a7336.js} +1 -1
- package/es/{index-f45c2897.js → index-d91dc23f.js} +20 -20
- package/es/{index-c94b9543.js → index-e5566b94.js} +43 -43
- package/es/index-f3562b52.cjs +1 -0
- package/es/index-f967d6c1.cjs +1 -0
- package/es/{python-2e916d28.cjs → python-c27ba105.cjs} +1 -1
- package/es/{python-7cf0b6ba.js → python-ecde9ff2.js} +2 -2
- package/es/{raf-8e5f0699.js → raf-80ef0c0a.js} +1 -1
- package/es/{scroll-c43468ab.js → scroll-679bd6bf.js} +1 -1
- package/es/style.css +1 -1
- package/es/{use-form-common-props-e6cba60f.js → use-form-common-props-815d48a6.js} +69 -69
- package/es/{use-form-common-props-d8866dc6.cjs → use-form-common-props-fd9b61a0.cjs} +1 -1
- package/es/{use-global-config-72d50e62.cjs → use-global-config-30d7d8ce.cjs} +1 -1
- package/es/{use-global-config-76ff2e3e.js → use-global-config-b5e9d3d5.js} +14 -14
- package/es/{validator-e759d43d.cjs → validator-1b8a6128.cjs} +1 -1
- package/es/{validator-220652c5.js → validator-764a9db0.js} +1 -1
- package/es/vnode-5ddb7ed1.js +14 -0
- package/es/vnode-b906ae6d.cjs +1 -0
- package/es/{zh-cn-33e7aee6.cjs → zh-cn-90317f62.cjs} +1 -1
- package/es/{zh-cn-c7fa42ea.js → zh-cn-e963c628.js} +2 -2
- package/lib/bundle.js +1 -1
- package/lib/bundle.umd.cjs +156 -156
- package/lib/{index-410c490f.js → index-a45d1494.js} +11238 -11207
- package/lib/{python-589861d2.js → python-82d17c8d.js} +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/packages/KlineConfig/config.js +2 -0
- package/packages/KlineConfig/index.vue +9 -0
- package/packages/KlinePlus/index.vue +18 -8
- package/packages/KlinePlus/utils.js +41 -5
- package/src/pages/KlinePlus/index.vue +6 -5
- package/es/el-autocomplete-86c0d989.cjs +0 -1
- package/es/el-form-item-41becb31.js +0 -1749
- package/es/el-form-item-95476197.cjs +0 -12
- package/es/el-scrollbar-139aa96d.cjs +0 -1
- package/es/el-scrollbar-cdadd788.js +0 -115
- package/es/el-select-e1046cc6.cjs +0 -1
- package/es/el-table-column-91d69c86.js +0 -3882
- package/es/el-table-column-f1c4af89.cjs +0 -14
- package/es/index-56ea97a9.js +0 -122
- package/es/index-8583c047.cjs +0 -1
- package/es/index-ce63356a.cjs +0 -1
- package/es/index-db1e1861.js +0 -318
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import "./base-a5af3db3.js";
|
|
2
|
+
import { computed as i, openBlock as d, createElementBlock as v, normalizeStyle as V, createVNode as _, Transition as k, withCtx as g, Fragment as z, renderList as A, createElementVNode as s, withDirectives as S, unref as N, vShow as F, toDisplayString as x, createCommentVNode as w, normalizeClass as h } from "vue";
|
|
3
|
+
import { o as Z, E as B } from "./index-a871c3eb.js";
|
|
4
|
+
import { _ as E } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
|
+
const L = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "rule-box"
|
|
8
|
+
}, P = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "level-box"
|
|
11
|
+
}, D = { class: "level-color" }, I = { class: "level-text" }, T = {
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
// 密码
|
|
15
|
+
value: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
// 是否聚焦密码框
|
|
20
|
+
isFocus: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
// 文案颜色
|
|
25
|
+
textColor: {
|
|
26
|
+
type: [String, null],
|
|
27
|
+
default: null
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(u, { expose: y }) {
|
|
31
|
+
const p = u, c = [
|
|
32
|
+
{
|
|
33
|
+
text: "不能包含空格",
|
|
34
|
+
validator: (e) => !/\s/.test(e)
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
text: "长度为8-18个字符",
|
|
38
|
+
validator: (e) => e.length >= 8 && e.length <= 18
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: "必须包含字母、数字、符号中至少2种",
|
|
42
|
+
validator: (e) => {
|
|
43
|
+
const t = /[a-zA-Z]/.test(e), o = /\d/.test(e), l = /[^a-zA-Z0-9]/.test(e);
|
|
44
|
+
return [t, o, l].filter(Boolean).length >= 2;
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
text: "请勿输入连续、重复6位以上字母或数字, 0123456, 1111111",
|
|
49
|
+
validator: (e) => {
|
|
50
|
+
if (/([a-zA-Z0-9])\1{6,}/.test(e) || /(?:0123456|1234567|2345678|3456789|9876543|8765432|7654321|6543210)/.test(e))
|
|
51
|
+
return !1;
|
|
52
|
+
const l = e.toLowerCase(), m = (r) => {
|
|
53
|
+
if (!/^[a-z]+$/.test(r))
|
|
54
|
+
return !1;
|
|
55
|
+
for (let n = 1; n < r.length; n++)
|
|
56
|
+
if (r.charCodeAt(n) !== r.charCodeAt(n - 1) + 1)
|
|
57
|
+
return !1;
|
|
58
|
+
return !0;
|
|
59
|
+
};
|
|
60
|
+
for (let r = 0; r <= l.length - 7; r++) {
|
|
61
|
+
const n = l.substr(r, 7);
|
|
62
|
+
if (m(n))
|
|
63
|
+
return !1;
|
|
64
|
+
}
|
|
65
|
+
return !0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
], C = i(() => !c.map((t) => t.validator(p.value)).includes(!1)), a = i(() => {
|
|
69
|
+
const e = p.value;
|
|
70
|
+
if (!e)
|
|
71
|
+
return 0;
|
|
72
|
+
let t = 0;
|
|
73
|
+
return e.length >= 8 && t++, e.length >= 12 && t++, /\d/.test(e) && t++, /[a-z]/.test(e) && t++, /[A-Z]/.test(e) && t++, /[^a-zA-Z0-9]/.test(e) && t++, t <= 2 ? 1 : t <= 4 ? 2 : 3;
|
|
74
|
+
}), f = i(() => {
|
|
75
|
+
switch (a.value) {
|
|
76
|
+
case 1:
|
|
77
|
+
return "lv1";
|
|
78
|
+
case 2:
|
|
79
|
+
return "lv2";
|
|
80
|
+
case 3:
|
|
81
|
+
return "lv3";
|
|
82
|
+
default:
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
}), b = i(() => {
|
|
86
|
+
switch (a.value) {
|
|
87
|
+
case 1:
|
|
88
|
+
return "弱";
|
|
89
|
+
case 2:
|
|
90
|
+
return "中";
|
|
91
|
+
case 3:
|
|
92
|
+
return "强";
|
|
93
|
+
default:
|
|
94
|
+
return "";
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
return y({
|
|
98
|
+
pwdValidators: c,
|
|
99
|
+
levelValue: a,
|
|
100
|
+
// 提供给表单校验使用
|
|
101
|
+
ruleFormPassword: [
|
|
102
|
+
{ required: !0, trigger: "blur", message: "密码不能为空" },
|
|
103
|
+
...c.map((e) => ({
|
|
104
|
+
trigger: "blur",
|
|
105
|
+
validator: (t, o, l) => {
|
|
106
|
+
e.validator(o) ? l() : l(e.text);
|
|
107
|
+
}
|
|
108
|
+
}))
|
|
109
|
+
]
|
|
110
|
+
}), (e, t) => {
|
|
111
|
+
const o = B;
|
|
112
|
+
return d(), v("div", {
|
|
113
|
+
class: "password-prompt",
|
|
114
|
+
style: V({ color: u.textColor ?? "var(--el-color-info)" })
|
|
115
|
+
}, [
|
|
116
|
+
_(k, { name: "slide-down" }, {
|
|
117
|
+
default: g(() => [
|
|
118
|
+
u.isFocus ? (d(), v("div", L, [
|
|
119
|
+
(d(), v(z, null, A(c, (l, m) => s("div", {
|
|
120
|
+
class: "rule-item",
|
|
121
|
+
key: m
|
|
122
|
+
}, [
|
|
123
|
+
S(_(o, null, {
|
|
124
|
+
default: g(() => [
|
|
125
|
+
_(N(Z))
|
|
126
|
+
]),
|
|
127
|
+
_: 2
|
|
128
|
+
}, 1536), [
|
|
129
|
+
[F, l.validator(u.value)]
|
|
130
|
+
]),
|
|
131
|
+
s("span", null, x(l.text), 1)
|
|
132
|
+
])), 64))
|
|
133
|
+
])) : w("", !0)
|
|
134
|
+
]),
|
|
135
|
+
_: 1
|
|
136
|
+
}),
|
|
137
|
+
!u.isFocus && C.value ? (d(), v("div", P, [
|
|
138
|
+
s("div", D, [
|
|
139
|
+
s("div", {
|
|
140
|
+
class: h(["levelValue-block", [a.value >= 1 ? f.value : ""]])
|
|
141
|
+
}, null, 2),
|
|
142
|
+
s("div", {
|
|
143
|
+
class: h(["levelValue-block", [a.value >= 2 ? f.value : ""]])
|
|
144
|
+
}, null, 2),
|
|
145
|
+
s("div", {
|
|
146
|
+
class: h(["levelValue-block", [a.value >= 3 ? f.value : ""]])
|
|
147
|
+
}, null, 2)
|
|
148
|
+
]),
|
|
149
|
+
s("div", I, "密码强度: " + x(b.value), 1)
|
|
150
|
+
])) : w("", !0)
|
|
151
|
+
], 4);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}, H = /* @__PURE__ */ E(T, [["__scopeId", "data-v-ff60a416"]]);
|
|
155
|
+
export {
|
|
156
|
+
H as P
|
|
157
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),T=require("./use-form-common-props-
|
|
1
|
+
"use strict";const e=require("vue"),T=require("./use-form-common-props-fd9b61a0.cjs"),C=require("./el-scrollbar-bc3f790d.cjs"),a=require("./base-ef747d02.cjs"),M=require("./el-popper-b6c99b28.cjs"),O=Symbol("scrollbarContextKey"),D=a.buildProps({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),q="Thumb",j=e.defineComponent({__name:"thumb",props:D,setup(z){const p=z,n=e.inject(O),o=a.useNamespace("scrollbar");n||M.throwError(q,"can not inject scrollbar context");const f=e.ref(),d=e.ref(),g=e.ref({}),b=e.ref(!1);let i=!1,c=!1,m=0,S=0,r=a.isClient?document.onselectstart:null;const t=e.computed(()=>C.BAR_MAP[p.vertical?"vertical":"horizontal"]),h=e.computed(()=>C.renderThumbStyle({size:p.size,move:p.move,bar:t.value})),y=e.computed(()=>f.value[t.value.offset]**2/n.wrapElement[t.value.scrollSize]/p.ratio/d.value[t.value.offset]),N=u=>{var w;if(u.stopPropagation(),u.ctrlKey||[1,2].includes(u.button))return;(w=window.getSelection())==null||w.removeAllRanges(),_(u);const v=u.currentTarget;v&&(g.value[t.value.axis]=v[t.value.offset]-(u[t.value.client]-v.getBoundingClientRect()[t.value.direction]))},E=u=>{if(!d.value||!f.value||!n.wrapElement)return;const w=Math.abs(u.target.getBoundingClientRect()[t.value.direction]-u[t.value.client]),v=d.value[t.value.offset]/2,l=(w-v)*100*y.value/f.value[t.value.offset];n.wrapElement[t.value.scroll]=l*n.wrapElement[t.value.scrollSize]/100},_=u=>{u.stopImmediatePropagation(),i=!0,m=n.wrapElement.scrollHeight,S=n.wrapElement.scrollWidth,document.addEventListener("mousemove",H),document.addEventListener("mouseup",k),r=document.onselectstart,document.onselectstart=()=>!1},H=u=>{if(!f.value||!d.value||i===!1)return;const w=g.value[t.value.axis];if(!w)return;const v=(f.value.getBoundingClientRect()[t.value.direction]-u[t.value.client])*-1,l=d.value[t.value.offset]-w,s=(v-l)*100*y.value/f.value[t.value.offset];t.value.scroll==="scrollLeft"?n.wrapElement[t.value.scroll]=s*S/100:n.wrapElement[t.value.scroll]=s*m/100},k=()=>{i=!1,g.value[t.value.axis]=0,document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",k),B(),c&&(b.value=!1)},A=()=>{c=!1,b.value=!!p.size},R=()=>{c=!0,b.value=i};e.onBeforeUnmount(()=>{B(),document.removeEventListener("mouseup",k)});const B=()=>{document.onselectstart!==r&&(document.onselectstart=r)};return T.useEventListener(e.toRef(n,"scrollbarElement"),"mousemove",A),T.useEventListener(e.toRef(n,"scrollbarElement"),"mouseleave",R),(u,w)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(o).b("fade"),persisted:""},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"instance",ref:f,class:e.normalizeClass([e.unref(o).e("bar"),e.unref(o).is(e.unref(t).key)]),onMousedown:E,onClick:e.withModifiers(()=>{},["stop"])},[e.createElementVNode("div",{ref_key:"thumb",ref:d,class:e.normalizeClass(e.unref(o).e("thumb")),style:e.normalizeStyle(e.unref(h)),onMousedown:N},null,38)],42,["onClick"]),[[e.vShow,u.always||b.value]])]),_:1},8,["name"]))}});var x=a._export_sfc(j,[["__file","thumb.vue"]]);const G=a.buildProps({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),V=e.defineComponent({__name:"bar",props:G,setup(z,{expose:p}){const n=z,o=e.inject(O),f=e.ref(0),d=e.ref(0),g=e.ref(""),b=e.ref(""),i=e.ref(1),c=e.ref(1);return p({handleScroll:r=>{if(r){const t=r.offsetHeight-C.GAP,h=r.offsetWidth-C.GAP;d.value=r.scrollTop*100/t*i.value,f.value=r.scrollLeft*100/h*c.value}},update:()=>{const r=o==null?void 0:o.wrapElement;if(!r)return;const t=r.offsetHeight-C.GAP,h=r.offsetWidth-C.GAP,y=t**2/r.scrollHeight,N=h**2/r.scrollWidth,E=Math.max(y,n.minSize),_=Math.max(N,n.minSize);i.value=y/(t-y)/(E/(t-E)),c.value=N/(h-N)/(_/(h-_)),b.value=E+C.GAP<t?`${E}px`:"",g.value=_+C.GAP<h?`${_}px`:""}}),(r,t)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(x,{move:f.value,ratio:c.value,size:g.value,always:r.always},null,8,["move","ratio","size","always"]),e.createVNode(x,{move:d.value,ratio:i.value,size:b.value,vertical:"",always:r.always},null,8,["move","ratio","size","always"])],64))}});var $=a._export_sfc(V,[["__file","bar.vue"]]);const I=a.buildProps({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:a.definePropType([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...M.useAriaProps(["ariaLabel","ariaOrientation"])}),W={"end-reached":z=>["left","right","top","bottom"].includes(z),scroll:({scrollTop:z,scrollLeft:p})=>[z,p].every(a.isNumber)},K="ElScrollbar",U=e.defineComponent({name:K}),F=e.defineComponent({...U,props:I,emits:W,setup(z,{expose:p,emit:n}){const o=z,f=a.useNamespace("scrollbar");let d,g,b,i=0,c=0,m="";const S={bottom:!1,top:!1,right:!1,left:!1},r=e.ref(),t=e.ref(),h=e.ref(),y=e.ref(),N=e.computed(()=>{const l={};return o.height&&(l.height=a.addUnit(o.height)),o.maxHeight&&(l.maxHeight=a.addUnit(o.maxHeight)),[o.wrapStyle,l]}),E=e.computed(()=>[o.wrapClass,f.e("wrap"),{[f.em("wrap","hidden-default")]:!o.native}]),_=e.computed(()=>[f.e("view"),o.viewClass]),H=l=>{var s;return(s=S[l])!=null?s:!1},k={top:"bottom",bottom:"top",left:"right",right:"left"},A=l=>{const s=k[m];if(!s)return;const P=l[m],L=l[s];P&&!S[m]&&(S[m]=!0),!L&&S[s]&&(S[s]=!1)},R=()=>{var l;if(t.value){(l=y.value)==null||l.handleScroll(t.value);const s=i,P=c;i=t.value.scrollTop,c=t.value.scrollLeft;const L={bottom:i+t.value.clientHeight>=t.value.scrollHeight-o.distance,top:i<=o.distance&&s!==0,right:c+t.value.clientWidth>=t.value.scrollWidth-o.distance&&P!==c,left:c<=o.distance&&P!==0};if(n("scroll",{scrollTop:i,scrollLeft:c}),s!==i&&(m=i>s?"bottom":"top"),P!==c&&(m=c>P?"right":"left"),o.distance>0){if(H(m))return;A(L)}L[m]&&n("end-reached",m)}};function B(l,s){a.isObject(l)?t.value.scrollTo(l):a.isNumber(l)&&a.isNumber(s)&&t.value.scrollTo(l,s)}const u=l=>{a.isNumber(l)&&(t.value.scrollTop=l)},w=l=>{a.isNumber(l)&&(t.value.scrollLeft=l)},v=()=>{var l;(l=y.value)==null||l.update(),S[m]=!1};return e.watch(()=>o.noresize,l=>{l?(d==null||d(),g==null||g(),b==null||b()):({stop:d}=T.useResizeObserver(h,v),{stop:g}=T.useResizeObserver(t,v),b=T.useEventListener("resize",v))},{immediate:!0}),e.watch(()=>[o.maxHeight,o.height],()=>{o.native||e.nextTick(()=>{var l;v(),t.value&&((l=y.value)==null||l.handleScroll(t.value))})}),e.provide(O,e.reactive({scrollbarElement:r,wrapElement:t})),e.onActivated(()=>{t.value&&(t.value.scrollTop=i,t.value.scrollLeft=c)}),e.onMounted(()=>{o.native||e.nextTick(()=>{v()})}),e.onUpdated(()=>v()),p({wrapRef:t,update:v,scrollTo:B,setScrollTop:u,setScrollLeft:w,handleScroll:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scrollbarRef",ref:r,class:e.normalizeClass(e.unref(f).b())},[e.createElementVNode("div",{ref_key:"wrapRef",ref:t,class:e.normalizeClass(e.unref(E)),style:e.normalizeStyle(e.unref(N)),tabindex:l.tabindex,onScroll:R},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.tag),{id:l.id,ref_key:"resizeRef",ref:h,class:e.normalizeClass(e.unref(_)),style:e.normalizeStyle(l.viewStyle),role:l.role,"aria-label":l.ariaLabel,"aria-orientation":l.ariaOrientation},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),l.native?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock($,{key:0,ref_key:"barRef",ref:y,always:l.always,"min-size":l.minSize},null,8,["always","min-size"]))],2))}});var X=a._export_sfc(F,[["__file","scrollbar.vue"]]);const Y=a.withInstall(X);exports.ElScrollbar=Y;exports.scrollbarEmits=W;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { defineComponent as E, computed as w, openBlock as r, createElementBlock as M, normalizeClass as n, unref as s, normalizeStyle as g, createElementVNode as i, renderSlot as b, createBlock as u, withModifiers as y, withCtx as p, createVNode as v, createCommentVNode as C, Transition as N } from "vue";
|
|
2
|
+
import { E as _, c as h } from "./index-a871c3eb.js";
|
|
3
|
+
import { b as V, u as $, _ as I, w as P } from "./base-a5af3db3.js";
|
|
4
|
+
import { k as F, e as K } from "./use-form-common-props-815d48a6.js";
|
|
5
|
+
const j = V({
|
|
6
|
+
type: {
|
|
7
|
+
type: String,
|
|
8
|
+
values: ["primary", "success", "info", "warning", "danger"],
|
|
9
|
+
default: "primary"
|
|
10
|
+
},
|
|
11
|
+
closable: Boolean,
|
|
12
|
+
disableTransitions: Boolean,
|
|
13
|
+
hit: Boolean,
|
|
14
|
+
color: String,
|
|
15
|
+
size: {
|
|
16
|
+
type: String,
|
|
17
|
+
values: F
|
|
18
|
+
},
|
|
19
|
+
effect: {
|
|
20
|
+
type: String,
|
|
21
|
+
values: ["dark", "light", "plain"],
|
|
22
|
+
default: "light"
|
|
23
|
+
},
|
|
24
|
+
round: Boolean
|
|
25
|
+
}), q = {
|
|
26
|
+
close: (a) => a instanceof MouseEvent,
|
|
27
|
+
click: (a) => a instanceof MouseEvent
|
|
28
|
+
}, A = E({
|
|
29
|
+
name: "ElTag"
|
|
30
|
+
}), D = /* @__PURE__ */ E({
|
|
31
|
+
...A,
|
|
32
|
+
props: j,
|
|
33
|
+
emits: q,
|
|
34
|
+
setup(a, { emit: m }) {
|
|
35
|
+
const S = a, T = K(), o = $("tag"), d = w(() => {
|
|
36
|
+
const { type: e, hit: l, effect: t, closable: c, round: B } = S;
|
|
37
|
+
return [
|
|
38
|
+
o.b(),
|
|
39
|
+
o.is("closable", c),
|
|
40
|
+
o.m(e || "primary"),
|
|
41
|
+
o.m(T.value),
|
|
42
|
+
o.m(t),
|
|
43
|
+
o.is("hit", l),
|
|
44
|
+
o.is("round", B)
|
|
45
|
+
];
|
|
46
|
+
}), f = (e) => {
|
|
47
|
+
m("close", e);
|
|
48
|
+
}, k = (e) => {
|
|
49
|
+
m("click", e);
|
|
50
|
+
}, z = (e) => {
|
|
51
|
+
var l, t, c;
|
|
52
|
+
(c = (t = (l = e == null ? void 0 : e.component) == null ? void 0 : l.subTree) == null ? void 0 : t.component) != null && c.bum && (e.component.subTree.component.bum = null);
|
|
53
|
+
};
|
|
54
|
+
return (e, l) => e.disableTransitions ? (r(), M("span", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: n(s(d)),
|
|
57
|
+
style: g({ backgroundColor: e.color }),
|
|
58
|
+
onClick: k
|
|
59
|
+
}, [
|
|
60
|
+
i("span", {
|
|
61
|
+
class: n(s(o).e("content"))
|
|
62
|
+
}, [
|
|
63
|
+
b(e.$slots, "default")
|
|
64
|
+
], 2),
|
|
65
|
+
e.closable ? (r(), u(s(_), {
|
|
66
|
+
key: 0,
|
|
67
|
+
class: n(s(o).e("close")),
|
|
68
|
+
onClick: y(f, ["stop"])
|
|
69
|
+
}, {
|
|
70
|
+
default: p(() => [
|
|
71
|
+
v(s(h))
|
|
72
|
+
]),
|
|
73
|
+
_: 1
|
|
74
|
+
}, 8, ["class", "onClick"])) : C("v-if", !0)
|
|
75
|
+
], 6)) : (r(), u(N, {
|
|
76
|
+
key: 1,
|
|
77
|
+
name: `${s(o).namespace.value}-zoom-in-center`,
|
|
78
|
+
appear: "",
|
|
79
|
+
onVnodeMounted: z
|
|
80
|
+
}, {
|
|
81
|
+
default: p(() => [
|
|
82
|
+
i("span", {
|
|
83
|
+
class: n(s(d)),
|
|
84
|
+
style: g({ backgroundColor: e.color }),
|
|
85
|
+
onClick: k
|
|
86
|
+
}, [
|
|
87
|
+
i("span", {
|
|
88
|
+
class: n(s(o).e("content"))
|
|
89
|
+
}, [
|
|
90
|
+
b(e.$slots, "default")
|
|
91
|
+
], 2),
|
|
92
|
+
e.closable ? (r(), u(s(_), {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: n(s(o).e("close")),
|
|
95
|
+
onClick: y(f, ["stop"])
|
|
96
|
+
}, {
|
|
97
|
+
default: p(() => [
|
|
98
|
+
v(s(h))
|
|
99
|
+
]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, ["class", "onClick"])) : C("v-if", !0)
|
|
102
|
+
], 6)
|
|
103
|
+
]),
|
|
104
|
+
_: 3
|
|
105
|
+
}, 8, ["name"]));
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
var G = /* @__PURE__ */ I(D, [["__file", "tag.vue"]]);
|
|
109
|
+
const Q = P(G);
|
|
110
|
+
export {
|
|
111
|
+
Q as E,
|
|
112
|
+
j as t
|
|
113
|
+
};
|
|
@@ -40267,9 +40267,11 @@ const EJ = (e) => {
|
|
|
40267
40267
|
};
|
|
40268
40268
|
};
|
|
40269
40269
|
export {
|
|
40270
|
+
jJ as A,
|
|
40270
40271
|
OJ as D,
|
|
40271
40272
|
PJ as G,
|
|
40272
40273
|
LJ as K,
|
|
40274
|
+
kJ as R,
|
|
40273
40275
|
IJ as U,
|
|
40274
40276
|
RJ as V,
|
|
40275
40277
|
qJ as v,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as x, inject as Z, ref as f, computed as R, onBeforeUnmount as oe, toRef as q, openBlock as k, createBlock as D, Transition as ae, unref as w, withCtx as ee, withDirectives as re, createElementVNode as $, normalizeClass as P, withModifiers as se, normalizeStyle as j, vShow as ne, createElementBlock as te, Fragment as ie, createVNode as G, watch as X, nextTick as Y, provide as ce, reactive as ue, onActivated as ve, onMounted as fe, onUpdated as
|
|
2
|
-
import {
|
|
3
|
-
import { B as be, r as ge, G as C } from "./el-scrollbar-
|
|
4
|
-
import { b as K, _ as U, u as le,
|
|
5
|
-
import {
|
|
1
|
+
import { defineComponent as x, inject as Z, ref as f, computed as R, onBeforeUnmount as oe, toRef as q, openBlock as k, createBlock as D, Transition as ae, unref as w, withCtx as ee, withDirectives as re, createElementVNode as $, normalizeClass as P, withModifiers as se, normalizeStyle as j, vShow as ne, createElementBlock as te, Fragment as ie, createVNode as G, watch as X, nextTick as Y, provide as ce, reactive as ue, onActivated as ve, onMounted as fe, onUpdated as me, resolveDynamicComponent as de, renderSlot as pe, createCommentVNode as he } from "vue";
|
|
2
|
+
import { c as I, u as F } from "./use-form-common-props-815d48a6.js";
|
|
3
|
+
import { B as be, r as ge, G as C } from "./el-scrollbar-323542e7.js";
|
|
4
|
+
import { b as K, _ as U, u as le, s as ye, e as Se, p as N, n as J, f as we, w as ze } from "./base-a5af3db3.js";
|
|
5
|
+
import { b as _e, u as Ee } from "./el-popper-b4f97157.js";
|
|
6
6
|
const V = Symbol("scrollbarContextKey"), Te = K({
|
|
7
7
|
vertical: Boolean,
|
|
8
8
|
size: String,
|
|
@@ -16,15 +16,15 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
16
16
|
__name: "thumb",
|
|
17
17
|
props: Te,
|
|
18
18
|
setup(z) {
|
|
19
|
-
const
|
|
19
|
+
const d = z, r = Z(V), l = le("scrollbar");
|
|
20
20
|
r || _e(He, "can not inject scrollbar context");
|
|
21
|
-
const c = f(),
|
|
21
|
+
const c = f(), m = f(), g = f({}), p = f(!1);
|
|
22
22
|
let s = !1, n = !1, v = 0, y = 0, o = ye ? document.onselectstart : null;
|
|
23
|
-
const e = R(() => be[
|
|
24
|
-
size:
|
|
25
|
-
move:
|
|
23
|
+
const e = R(() => be[d.vertical ? "vertical" : "horizontal"]), h = R(() => ge({
|
|
24
|
+
size: d.size,
|
|
25
|
+
move: d.move,
|
|
26
26
|
bar: e.value
|
|
27
|
-
})), b = R(() => c.value[e.value.offset] ** 2 / r.wrapElement[e.value.scrollSize] /
|
|
27
|
+
})), b = R(() => c.value[e.value.offset] ** 2 / r.wrapElement[e.value.scrollSize] / d.ratio / m.value[e.value.offset]), T = (i) => {
|
|
28
28
|
var S;
|
|
29
29
|
if (i.stopPropagation(), i.ctrlKey || [1, 2].includes(i.button))
|
|
30
30
|
return;
|
|
@@ -32,24 +32,24 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
32
32
|
const u = i.currentTarget;
|
|
33
33
|
u && (g.value[e.value.axis] = u[e.value.offset] - (i[e.value.client] - u.getBoundingClientRect()[e.value.direction]));
|
|
34
34
|
}, _ = (i) => {
|
|
35
|
-
if (!
|
|
35
|
+
if (!m.value || !c.value || !r.wrapElement)
|
|
36
36
|
return;
|
|
37
|
-
const S = Math.abs(i.target.getBoundingClientRect()[e.value.direction] - i[e.value.client]), u =
|
|
37
|
+
const S = Math.abs(i.target.getBoundingClientRect()[e.value.direction] - i[e.value.client]), u = m.value[e.value.offset] / 2, t = (S - u) * 100 * b.value / c.value[e.value.offset];
|
|
38
38
|
r.wrapElement[e.value.scroll] = t * r.wrapElement[e.value.scrollSize] / 100;
|
|
39
39
|
}, E = (i) => {
|
|
40
40
|
i.stopImmediatePropagation(), s = !0, v = r.wrapElement.scrollHeight, y = r.wrapElement.scrollWidth, document.addEventListener("mousemove", B), document.addEventListener("mouseup", L), o = document.onselectstart, document.onselectstart = () => !1;
|
|
41
41
|
}, B = (i) => {
|
|
42
|
-
if (!c.value || !
|
|
42
|
+
if (!c.value || !m.value || s === !1)
|
|
43
43
|
return;
|
|
44
44
|
const S = g.value[e.value.axis];
|
|
45
45
|
if (!S)
|
|
46
46
|
return;
|
|
47
|
-
const u = (c.value.getBoundingClientRect()[e.value.direction] - i[e.value.client]) * -1, t =
|
|
47
|
+
const u = (c.value.getBoundingClientRect()[e.value.direction] - i[e.value.client]) * -1, t = m.value[e.value.offset] - S, a = (u - t) * 100 * b.value / c.value[e.value.offset];
|
|
48
48
|
e.value.scroll === "scrollLeft" ? r.wrapElement[e.value.scroll] = a * y / 100 : r.wrapElement[e.value.scroll] = a * v / 100;
|
|
49
49
|
}, L = () => {
|
|
50
50
|
s = !1, g.value[e.value.axis] = 0, document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", L), A(), n && (p.value = !1);
|
|
51
51
|
}, W = () => {
|
|
52
|
-
n = !1, p.value = !!
|
|
52
|
+
n = !1, p.value = !!d.size;
|
|
53
53
|
}, O = () => {
|
|
54
54
|
n = !0, p.value = s;
|
|
55
55
|
};
|
|
@@ -74,7 +74,7 @@ const V = Symbol("scrollbarContextKey"), Te = K({
|
|
|
74
74
|
}, [
|
|
75
75
|
$("div", {
|
|
76
76
|
ref_key: "thumb",
|
|
77
|
-
ref:
|
|
77
|
+
ref: m,
|
|
78
78
|
class: P(w(l).e("thumb")),
|
|
79
79
|
style: j(w(h)),
|
|
80
80
|
onMousedown: T
|
|
@@ -100,13 +100,13 @@ const Re = K({
|
|
|
100
100
|
}), Le = /* @__PURE__ */ x({
|
|
101
101
|
__name: "bar",
|
|
102
102
|
props: Re,
|
|
103
|
-
setup(z, { expose:
|
|
104
|
-
const r = z, l = Z(V), c = f(0),
|
|
105
|
-
return
|
|
103
|
+
setup(z, { expose: d }) {
|
|
104
|
+
const r = z, l = Z(V), c = f(0), m = f(0), g = f(""), p = f(""), s = f(1), n = f(1);
|
|
105
|
+
return d({
|
|
106
106
|
handleScroll: (o) => {
|
|
107
107
|
if (o) {
|
|
108
108
|
const e = o.offsetHeight - C, h = o.offsetWidth - C;
|
|
109
|
-
|
|
109
|
+
m.value = o.scrollTop * 100 / e * s.value, c.value = o.scrollLeft * 100 / h * n.value;
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
update: () => {
|
|
@@ -124,7 +124,7 @@ const Re = K({
|
|
|
124
124
|
always: o.always
|
|
125
125
|
}, null, 8, ["move", "ratio", "size", "always"]),
|
|
126
126
|
G(Q, {
|
|
127
|
-
move:
|
|
127
|
+
move: m.value,
|
|
128
128
|
ratio: s.value,
|
|
129
129
|
size: p.value,
|
|
130
130
|
vertical: "",
|
|
@@ -185,17 +185,17 @@ const ke = K({
|
|
|
185
185
|
"end-reached": (z) => ["left", "right", "top", "bottom"].includes(z),
|
|
186
186
|
scroll: ({
|
|
187
187
|
scrollTop: z,
|
|
188
|
-
scrollLeft:
|
|
189
|
-
}) => [z,
|
|
188
|
+
scrollLeft: d
|
|
189
|
+
}) => [z, d].every(N)
|
|
190
190
|
}, Be = "ElScrollbar", Oe = x({
|
|
191
191
|
name: Be
|
|
192
192
|
}), Ae = /* @__PURE__ */ x({
|
|
193
193
|
...Oe,
|
|
194
194
|
props: ke,
|
|
195
195
|
emits: Pe,
|
|
196
|
-
setup(z, { expose:
|
|
196
|
+
setup(z, { expose: d, emit: r }) {
|
|
197
197
|
const l = z, c = le("scrollbar");
|
|
198
|
-
let
|
|
198
|
+
let m, g, p, s = 0, n = 0, v = "";
|
|
199
199
|
const y = {
|
|
200
200
|
bottom: !1,
|
|
201
201
|
top: !1,
|
|
@@ -257,7 +257,7 @@ const ke = K({
|
|
|
257
257
|
(t = b.value) == null || t.update(), y[v] = !1;
|
|
258
258
|
};
|
|
259
259
|
return X(() => l.noresize, (t) => {
|
|
260
|
-
t ? (
|
|
260
|
+
t ? (m == null || m(), g == null || g(), p == null || p()) : ({ stop: m } = F(h, u), { stop: g } = F(e, u), p = I("resize", u));
|
|
261
261
|
}, { immediate: !0 }), X(() => [l.maxHeight, l.height], () => {
|
|
262
262
|
l.native || Y(() => {
|
|
263
263
|
var t;
|
|
@@ -272,7 +272,7 @@ const ke = K({
|
|
|
272
272
|
l.native || Y(() => {
|
|
273
273
|
u();
|
|
274
274
|
});
|
|
275
|
-
}),
|
|
275
|
+
}), me(() => u()), d({
|
|
276
276
|
wrapRef: e,
|
|
277
277
|
update: u,
|
|
278
278
|
scrollTo: A,
|
|
@@ -292,7 +292,7 @@ const ke = K({
|
|
|
292
292
|
tabindex: t.tabindex,
|
|
293
293
|
onScroll: O
|
|
294
294
|
}, [
|
|
295
|
-
(k(), D(
|
|
295
|
+
(k(), D(de(t.tag), {
|
|
296
296
|
id: t.id,
|
|
297
297
|
ref_key: "resizeRef",
|
|
298
298
|
ref: h,
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent as h, computed as a, ref as T, unref as s, openBlock as u, createBlock as R, mergeProps as U, withCtx as v, createElementBlock as $, normalizeClass as D, toDisplayString as c, createCommentVNode as b, renderSlot as g, createTextVNode as K } from "vue";
|
|
2
|
+
import { i as f, g as r, E as V } from "./el-popper-b4f97157.js";
|
|
3
|
+
import { d } from "./dropdown-a59bba73.js";
|
|
4
|
+
import { b as O, o as H, u as I, n as L, _ as z, A as F, w as j } from "./base-a5af3db3.js";
|
|
5
|
+
const q = O({
|
|
6
|
+
trigger: f.trigger,
|
|
7
|
+
triggerKeys: f.triggerKeys,
|
|
8
|
+
placement: d.placement,
|
|
9
|
+
disabled: f.disabled,
|
|
10
|
+
visible: r.visible,
|
|
11
|
+
transition: r.transition,
|
|
12
|
+
popperOptions: d.popperOptions,
|
|
13
|
+
tabindex: d.tabindex,
|
|
14
|
+
content: r.content,
|
|
15
|
+
popperStyle: r.popperStyle,
|
|
16
|
+
popperClass: r.popperClass,
|
|
17
|
+
enterable: {
|
|
18
|
+
...r.enterable,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
effect: {
|
|
22
|
+
...r.effect,
|
|
23
|
+
default: "light"
|
|
24
|
+
},
|
|
25
|
+
teleported: r.teleported,
|
|
26
|
+
appendTo: r.appendTo,
|
|
27
|
+
title: String,
|
|
28
|
+
width: {
|
|
29
|
+
type: [String, Number],
|
|
30
|
+
default: 150
|
|
31
|
+
},
|
|
32
|
+
offset: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
showAfter: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 0
|
|
39
|
+
},
|
|
40
|
+
hideAfter: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 200
|
|
43
|
+
},
|
|
44
|
+
autoClose: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 0
|
|
47
|
+
},
|
|
48
|
+
showArrow: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: !0
|
|
51
|
+
},
|
|
52
|
+
persistent: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: !0
|
|
55
|
+
},
|
|
56
|
+
"onUpdate:visible": {
|
|
57
|
+
type: Function
|
|
58
|
+
}
|
|
59
|
+
}), G = {
|
|
60
|
+
"update:visible": (t) => H(t),
|
|
61
|
+
"before-enter": () => !0,
|
|
62
|
+
"before-leave": () => !0,
|
|
63
|
+
"after-enter": () => !0,
|
|
64
|
+
"after-leave": () => !0
|
|
65
|
+
}, J = "onUpdate:visible", M = h({
|
|
66
|
+
name: "ElPopover"
|
|
67
|
+
}), Q = /* @__PURE__ */ h({
|
|
68
|
+
...M,
|
|
69
|
+
props: q,
|
|
70
|
+
emits: G,
|
|
71
|
+
setup(t, { expose: p, emit: n }) {
|
|
72
|
+
const o = t, y = a(() => o[J]), i = I("popover"), l = T(), w = a(() => {
|
|
73
|
+
var e;
|
|
74
|
+
return (e = s(l)) == null ? void 0 : e.popperRef;
|
|
75
|
+
}), E = a(() => [
|
|
76
|
+
{
|
|
77
|
+
width: L(o.width)
|
|
78
|
+
},
|
|
79
|
+
o.popperStyle
|
|
80
|
+
]), P = a(() => [i.b(), o.popperClass, { [i.m("plain")]: !!o.content }]), C = a(() => o.transition === `${i.namespace.value}-fade-in-linear`), k = () => {
|
|
81
|
+
var e;
|
|
82
|
+
(e = l.value) == null || e.hide();
|
|
83
|
+
}, S = () => {
|
|
84
|
+
n("before-enter");
|
|
85
|
+
}, A = () => {
|
|
86
|
+
n("before-leave");
|
|
87
|
+
}, B = () => {
|
|
88
|
+
n("after-enter");
|
|
89
|
+
}, N = () => {
|
|
90
|
+
n("update:visible", !1), n("after-leave");
|
|
91
|
+
};
|
|
92
|
+
return p({
|
|
93
|
+
popperRef: w,
|
|
94
|
+
hide: k
|
|
95
|
+
}), (e, _) => (u(), R(s(V), U({
|
|
96
|
+
ref_key: "tooltipRef",
|
|
97
|
+
ref: l
|
|
98
|
+
}, e.$attrs, {
|
|
99
|
+
trigger: e.trigger,
|
|
100
|
+
"trigger-keys": e.triggerKeys,
|
|
101
|
+
placement: e.placement,
|
|
102
|
+
disabled: e.disabled,
|
|
103
|
+
visible: e.visible,
|
|
104
|
+
transition: e.transition,
|
|
105
|
+
"popper-options": e.popperOptions,
|
|
106
|
+
tabindex: e.tabindex,
|
|
107
|
+
content: e.content,
|
|
108
|
+
offset: e.offset,
|
|
109
|
+
"show-after": e.showAfter,
|
|
110
|
+
"hide-after": e.hideAfter,
|
|
111
|
+
"auto-close": e.autoClose,
|
|
112
|
+
"show-arrow": e.showArrow,
|
|
113
|
+
"aria-label": e.title,
|
|
114
|
+
effect: e.effect,
|
|
115
|
+
enterable: e.enterable,
|
|
116
|
+
"popper-class": s(P),
|
|
117
|
+
"popper-style": s(E),
|
|
118
|
+
teleported: e.teleported,
|
|
119
|
+
"append-to": e.appendTo,
|
|
120
|
+
persistent: e.persistent,
|
|
121
|
+
"gpu-acceleration": s(C),
|
|
122
|
+
"onUpdate:visible": s(y),
|
|
123
|
+
onBeforeShow: S,
|
|
124
|
+
onBeforeHide: A,
|
|
125
|
+
onShow: B,
|
|
126
|
+
onHide: N
|
|
127
|
+
}), {
|
|
128
|
+
content: v(() => [
|
|
129
|
+
e.title ? (u(), $("div", {
|
|
130
|
+
key: 0,
|
|
131
|
+
class: D(s(i).e("title")),
|
|
132
|
+
role: "title"
|
|
133
|
+
}, c(e.title), 3)) : b("v-if", !0),
|
|
134
|
+
g(e.$slots, "default", {}, () => [
|
|
135
|
+
K(c(e.content), 1)
|
|
136
|
+
])
|
|
137
|
+
]),
|
|
138
|
+
default: v(() => [
|
|
139
|
+
e.$slots.reference ? g(e.$slots, "reference", { key: 0 }) : b("v-if", !0)
|
|
140
|
+
]),
|
|
141
|
+
_: 3
|
|
142
|
+
}, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
var W = /* @__PURE__ */ z(Q, [["__file", "popover.vue"]]);
|
|
146
|
+
const m = (t, p) => {
|
|
147
|
+
const n = p.arg || p.value, o = n == null ? void 0 : n.popperRef;
|
|
148
|
+
o && (o.triggerRef = t);
|
|
149
|
+
};
|
|
150
|
+
var X = {
|
|
151
|
+
mounted(t, p) {
|
|
152
|
+
m(t, p);
|
|
153
|
+
},
|
|
154
|
+
updated(t, p) {
|
|
155
|
+
m(t, p);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const Y = "popover", Z = F(X, Y), re = j(W, {
|
|
159
|
+
directive: Z
|
|
160
|
+
});
|
|
161
|
+
export {
|
|
162
|
+
re as E
|
|
163
|
+
};
|
|
@@ -109,4 +109,4 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:n,curr
|
|
|
109
109
|
入参: ${JSON.stringify(l.method==="post"?l.data:l.params)}
|
|
110
110
|
返参: ${JSON.stringify(c)}`)))},u=>{const{response:c={},config:l={}}=u;a instanceof Function&&a(u);let s=u.message;return s==="Network Error"?s="服务器网络故障":s.includes("timeout")?s="服务器接口超时":s.includes("Request failed with status code")&&(s="服务器接口"+s.substr(s.length-3)+"异常"),Fc.error(s),Promise.reject(new Error(`服务器异常-${u.message} status: ${c==null?void 0:c.status}
|
|
111
111
|
接口: ${l.url}
|
|
112
|
-
入参: ${JSON.stringify(l.method==="post"?l.data:l.params)}`))}),{get:(u,c={},l={})=>o({method:"GET",url:`${jg(e)}${u.startsWith("/middleLayer/")?"":"/middleLayer/get"}${u}`,params:c,...l}),post:(u,c={},l={})=>o({method:"POST",url:`${jg(e)}${u.startsWith("/middleLayer/")?"":"/middleLayer/post"}${u}`,data:c,...l})}},bJ=Object.freeze(Object.defineProperty({__proto__:null,initRequest:yJ},Symbol.toStringTag,{value:"Module"}));var xJ=Object.defineProperty,wJ=(e,t,r)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ea=(e,t,r)=>wJ(e,typeof t!="symbol"?t+"":t,r);class hw{constructor(t,r={}){ea(this,"dom"),ea(this,"resizeRo"),ea(this,"callback"),ea(this,"visibilitychangeFn"),ea(this,"timer"),ea(this,"config",{debounce:50}),this.dom=t,this.config={...this.config,...r}}listen(t){this.callback=t;let r=!0;this.resizeRo=new ResizeObserver(()=>{if(r){r=!1;return}clearTimeout(this.timer),this.timer=setTimeout(()=>{this.callback&&this.callback(),clearTimeout(this.timer)},this.config.debounce)}),this.resizeRo.observe(this.dom),this.visibilitychangeFn=()=>{(document.visibilityState==="visible"||!document.hidden)&&this.callback&&this.callback()},document.addEventListener("visibilitychange",this.visibilitychangeFn)}dispose(){var t;(t=this.resizeRo)==null||t.disconnect(),document.removeEventListener("visibilitychange",this.visibilitychangeFn)}}const NJ=e=>new hw(e),DJ=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:hw,addResizeListener:NJ},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const EJ=e=>{e?Lg("token",e):console.error("token不能为空")},AJ=e=>{e?Lg("userData",e):console.error("用户数据不能为空")},gw=()=>Pg("token"),vw=e=>{const t=Pg("userData");return e?t==null?void 0:t[e]:t},SJ=()=>!!gw(),CJ=()=>{const e=vw();return(e==null?void 0:e.username)==="admin"},yw=(e="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(e||location.href)}`,MJ=(e=!0,t)=>{if(Hf("token"),Hf("userData"),e){yw();return}t&&(location.href=t)},_J=Object.freeze(Object.defineProperty({__proto__:null,getToken:gw,getUserData:vw,isAdmin:CJ,isLogin:SJ,login:yw,loginout:MJ,setToken:EJ,setUserData:AJ},Symbol.toStringTag,{value:"Module"})),FJ=gJ,{initRequest:TJ}=bJ,{addResizeListener:OJ}=DJ,{setToken:
|
|
112
|
+
入参: ${JSON.stringify(l.method==="post"?l.data:l.params)}`))}),{get:(u,c={},l={})=>o({method:"GET",url:`${jg(e)}${u.startsWith("/middleLayer/")?"":"/middleLayer/get"}${u}`,params:c,...l}),post:(u,c={},l={})=>o({method:"POST",url:`${jg(e)}${u.startsWith("/middleLayer/")?"":"/middleLayer/post"}${u}`,data:c,...l})}},bJ=Object.freeze(Object.defineProperty({__proto__:null,initRequest:yJ},Symbol.toStringTag,{value:"Module"}));var xJ=Object.defineProperty,wJ=(e,t,r)=>t in e?xJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ea=(e,t,r)=>wJ(e,typeof t!="symbol"?t+"":t,r);class hw{constructor(t,r={}){ea(this,"dom"),ea(this,"resizeRo"),ea(this,"callback"),ea(this,"visibilitychangeFn"),ea(this,"timer"),ea(this,"config",{debounce:50}),this.dom=t,this.config={...this.config,...r}}listen(t){this.callback=t;let r=!0;this.resizeRo=new ResizeObserver(()=>{if(r){r=!1;return}clearTimeout(this.timer),this.timer=setTimeout(()=>{this.callback&&this.callback(),clearTimeout(this.timer)},this.config.debounce)}),this.resizeRo.observe(this.dom),this.visibilitychangeFn=()=>{(document.visibilityState==="visible"||!document.hidden)&&this.callback&&this.callback()},document.addEventListener("visibilitychange",this.visibilitychangeFn)}dispose(){var t;(t=this.resizeRo)==null||t.disconnect(),document.removeEventListener("visibilitychange",this.visibilitychangeFn)}}const NJ=e=>new hw(e),DJ=Object.freeze(Object.defineProperty({__proto__:null,ResizeListener:hw,addResizeListener:NJ},Symbol.toStringTag,{value:"Module"}));`${new Date().getTime()}${Math.floor(Math.random()*1e9)}`;const EJ=e=>{e?Lg("token",e):console.error("token不能为空")},AJ=e=>{e?Lg("userData",e):console.error("用户数据不能为空")},gw=()=>Pg("token"),vw=e=>{const t=Pg("userData");return e?t==null?void 0:t[e]:t},SJ=()=>!!gw(),CJ=()=>{const e=vw();return(e==null?void 0:e.username)==="admin"},yw=(e="")=>location.href=`${location.origin}/login/index.html?url=${encodeURIComponent(e||location.href)}`,MJ=(e=!0,t)=>{if(Hf("token"),Hf("userData"),e){yw();return}t&&(location.href=t)},_J=Object.freeze(Object.defineProperty({__proto__:null,getToken:gw,getUserData:vw,isAdmin:CJ,isLogin:SJ,login:yw,loginout:MJ,setToken:EJ,setUserData:AJ},Symbol.toStringTag,{value:"Module"})),FJ=gJ,{initRequest:TJ}=bJ,{addResizeListener:OJ}=DJ,{setToken:LJ,setUserData:BJ,getToken:kJ,getUserData:IJ,isLogin:RJ,isAdmin:PJ,login:qJ,loginout:zJ}=_J,jJ=(e,t=500,r=!1)=>{let n=null;return function(...i){if(clearTimeout(n),r){const a=!n;n=setTimeout(()=>{n=null},t),a&&e.apply(this,i)}else n=setTimeout(()=>{e.apply(this,i)},t)}};exports.A=qJ;exports.D=OJ;exports.G=jJ;exports.K=zJ;exports.R=BJ;exports.U=kJ;exports.V=IJ;exports.v=RJ;exports.x=FJ;exports.y=TJ;
|