ele-admin-plus 1.1.6-beta.6 → 1.1.7-beta.1

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.
@@ -5,9 +5,11 @@
5
5
  @include set-el-tree-var($ele);
6
6
 
7
7
  /* Tree */
8
- .el-tree {
8
+ body .el-tree {
9
9
  background: none;
10
+ }
10
11
 
12
+ .el-tree {
11
13
  .el-tree-node {
12
14
  padding-top: eleVar('tree', 'item-margin');
13
15
  box-sizing: border-box;
@@ -11,6 +11,10 @@
11
11
  padding: eleVar('tree-select', 'padding') !important;
12
12
  }
13
13
 
14
+ .el-tree {
15
+ background: none;
16
+ }
17
+
14
18
  .el-tree-node__content {
15
19
  position: relative;
16
20
  z-index: 0;
@@ -282,7 +282,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
282
282
  disableTransitions: true
283
283
  }, {
284
284
  default: withCtx(() => [
285
- renderSlot(_ctx.$slots, "maxTagPlaceholder", { omittedValues: _ctx.omittedTags }, () => [
285
+ renderSlot(_ctx.$slots, "maxTagPlaceholder", {
286
+ omittedValues: _ctx.omittedTags,
287
+ omittedSize: _ctx.omittedSize
288
+ }, () => [
286
289
  createTextVNode(" +" + toDisplayString(_ctx.omittedSize), 1)
287
290
  ])
288
291
  ]),
@@ -1,7 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  import { LAYOUT_KEY } from './props';
3
3
  import type { GlobalProvide, UseLocaleResult, UseLicenseResult, LocaleProps, ResponsiveProps, LayoutProvide } from './types';
4
- export declare const UNAUTHORIZED_TIP = "EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743";
4
+ declare const UNAUTHORIZED_TIP = "EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743";
5
5
  /**
6
6
  * 获取全局配置
7
7
  */
@@ -26,4 +26,4 @@ export declare function useLayoutState(defaultValue?: Ref<LayoutProvide>): Ref<L
26
26
  * 获取是否开启布局响应
27
27
  */
28
28
  export declare function useResponsive(props: ResponsiveProps): import("vue").ComputedRef<boolean>;
29
- export { LAYOUT_KEY };
29
+ export { LAYOUT_KEY, UNAUTHORIZED_TIP };
@@ -1,29 +1,29 @@
1
- import { inject as j, computed as S, ref as x, watch as N, unref as _ } from "vue";
1
+ import { inject as x, computed as w, ref as B, watch as N, unref as _ } from "vue";
2
2
  import { PROVIDE_KEY as I, LAYOUT_KEY as K } from "./props";
3
3
  import { LAYOUT_KEY as y } from "./props";
4
4
  import U from "../lang/zh_CN";
5
- const $ = "EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743", M = 1698336417, L = "1.1";
6
- function P() {
7
- return j(I, {});
5
+ const $ = "EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743", M = 1698336417, L = "1.1";
6
+ function R() {
7
+ return x(I, {});
8
8
  }
9
- function J(u) {
10
- const t = P();
11
- return S(() => t[u] ?? {});
9
+ function J(t) {
10
+ const n = R();
11
+ return w(() => n[t] ?? {});
12
12
  }
13
- function k(u, t) {
14
- const e = P();
15
- return { lang: S(() => {
13
+ function k(t, n) {
14
+ const e = R();
15
+ return { lang: w(() => {
16
16
  const c = e.locale ?? U;
17
- return u ? Object.assign({}, c[u] ?? {}, t == null ? void 0 : t.locale) : c;
17
+ return t ? Object.assign({}, c[t] ?? {}, n == null ? void 0 : n.locale) : c;
18
18
  }), globalConfig: e };
19
19
  }
20
20
  function q() {
21
- const u = P(), t = S(() => {
22
- const r = u.license;
21
+ const t = R(), n = w(() => {
22
+ const r = t.license;
23
23
  return r ? r.trim() : void 0;
24
- }), e = x(!1);
24
+ }), e = B(!1);
25
25
  return N(
26
- t,
26
+ n,
27
27
  (r) => {
28
28
  var c;
29
29
  if (typeof r != "string" || !r)
@@ -32,22 +32,22 @@ function q() {
32
32
  const o = JSON.parse(V(r));
33
33
  if (o.product !== "EleAdminPlus")
34
34
  return e.value = !1, h("");
35
- const { version: l, expiration: w, domain: f } = o;
35
+ const { version: l, expiration: O, domain: f } = o;
36
36
  if (l && l !== L)
37
37
  return e.value = !1, h(l);
38
- if (w && w < M)
39
- return e.value = !1, h(void 0, w);
38
+ if (O && O < M)
39
+ return e.value = !1, h(void 0, O);
40
40
  if (f) {
41
- const n = (c = window == null ? void 0 : window.location) == null ? void 0 : c.hostname;
42
- if (!n)
41
+ const u = (c = window == null ? void 0 : window.location) == null ? void 0 : c.hostname;
42
+ if (!u)
43
43
  return e.value = !1, h(void 0, void 0, f, "");
44
- if (n !== "localhost" && n !== "127.0.0.1") {
45
- const d = f.split("."), g = n.split(".");
44
+ if (u !== "localhost" && u !== "127.0.0.1") {
45
+ const d = f.split("."), g = u.split(".");
46
46
  for (let m = d.length - 1; m >= 0; m--)
47
47
  if (d[m] !== g[m])
48
- return e.value = !1, h(void 0, void 0, f, n);
48
+ return e.value = !1, h(void 0, void 0, f, u);
49
49
  if (g.length > d.length && g[g.length - d.length - 1] !== "www")
50
- return e.value = !1, h(void 0, void 0, f, n);
50
+ return e.value = !1, h(void 0, void 0, f, u);
51
51
  }
52
52
  }
53
53
  } catch (o) {
@@ -56,60 +56,60 @@ function q() {
56
56
  e.value = !0;
57
57
  },
58
58
  { immediate: !0 }
59
- ), { authenticated: e, globalConfig: u };
59
+ ), { authenticated: e, globalConfig: t };
60
60
  }
61
- function h(u, t, e, r) {
61
+ function h(t, n, e, r) {
62
62
  const c = new Array(60).join("*"), o = [c];
63
- if (o.push($), u == null && t == null && e == null && r == null && o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"), !u && t == null && !e && o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"), u && o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${u}, \u5F53\u524D\u7248\u672C: ${L};`), typeof t == "number") {
64
- const l = new Date(t * 1e3).toLocaleString();
63
+ if (o.push($), t == null && n == null && e == null && r == null && o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"), !t && n == null && !e && o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"), t && o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${t}, \u5F53\u524D\u7248\u672C: ${L};`), typeof n == "number") {
64
+ const l = new Date(n * 1e3).toLocaleString();
65
65
  o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${l};`);
66
66
  }
67
67
  e && o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${r};`), o.push(c), console.error(o.join(`
68
68
  `));
69
69
  }
70
- function V(u) {
71
- const t = (E, A, a) => {
70
+ function V(t) {
71
+ const n = (F, v, a) => {
72
72
  const i = ((s, D) => {
73
- const T = s.length - D;
74
- if (T <= 0)
73
+ const j = s.length - D;
74
+ if (j <= 0)
75
75
  return s;
76
- const B = new Array(s.length);
76
+ const P = new Array(s.length);
77
77
  for (let p = 0; p < s.length; p++)
78
- p < D ? B[p] = s[T + p] : B[p] = s[p - D];
79
- return B;
80
- })(E.split(""), a).join(""), F = [];
81
- let C = 0;
82
- for (; C < i.length; ) {
83
- let s = C + A;
78
+ p < D ? P[p] = s[j + p] : P[p] = s[p - D];
79
+ return P;
80
+ })(F.split(""), a).join(""), C = [];
81
+ let E = 0;
82
+ for (; E < i.length; ) {
83
+ let s = E + v;
84
84
  s > i.length && (s = i.length);
85
- const D = i.substring(C, s);
86
- F.push(D.split("").reverse().join("")), C = s;
85
+ const D = i.substring(E, s);
86
+ C.push(D.split("").reverse().join("")), E = s;
87
87
  }
88
- return F.join("");
89
- }, e = u.indexOf("="), r = e === -1 ? u : u.substring(0, e), c = e === -1 ? "" : u.substring(e), l = (t(r, 12, 3) + c).replace(/[^A-Za-z0-9\+\/\=]/g, ""), f = t("BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C", 3, 1) + "=";
90
- let n = "", d, g, m, R, b, O, Y, v = 0;
91
- for (; v < l.length; )
92
- R = f.indexOf(l.charAt(v++)), b = f.indexOf(l.charAt(v++)), O = f.indexOf(l.charAt(v++)), Y = f.indexOf(l.charAt(v++)), d = R << 2 | b >> 4, g = (b & 15) << 4 | O >> 2, m = (O & 3) << 6 | Y, n = n + String.fromCharCode(d), O != 64 && (n = n + String.fromCharCode(g)), Y != 64 && (n = n + String.fromCharCode(m));
93
- return n = ((E) => {
94
- let A = "", a = 0, i = 0, F = 0, C = 0;
95
- for (; a < E.length; )
96
- i = E.charCodeAt(a), i < 128 ? (A += String.fromCharCode(i), a++) : i > 191 && i < 224 ? (F = E.charCodeAt(a + 1), A += String.fromCharCode((i & 31) << 6 | F & 63), a += 2) : (F = E.charCodeAt(a + 1), C = E.charCodeAt(a + 2), A += String.fromCharCode(
97
- (i & 15) << 12 | (F & 63) << 6 | C & 63
88
+ return C.join("");
89
+ }, e = t.indexOf("="), r = e === -1 ? t : t.substring(0, e), c = e === -1 ? "" : t.substring(e), l = (n(r, 12, 3) + c).replace(/[^A-Za-z0-9\+\/\=]/g, ""), f = n("BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C", 3, 1) + "=";
90
+ let u = "", d, g, m, T, b, S, Y, A = 0;
91
+ for (; A < l.length; )
92
+ T = f.indexOf(l.charAt(A++)), b = f.indexOf(l.charAt(A++)), S = f.indexOf(l.charAt(A++)), Y = f.indexOf(l.charAt(A++)), d = T << 2 | b >> 4, g = (b & 15) << 4 | S >> 2, m = (S & 3) << 6 | Y, u = u + String.fromCharCode(d), S != 64 && (u = u + String.fromCharCode(g)), Y != 64 && (u = u + String.fromCharCode(m));
93
+ return u = ((F) => {
94
+ let v = "", a = 0, i = 0, C = 0, E = 0;
95
+ for (; a < F.length; )
96
+ i = F.charCodeAt(a), i < 128 ? (v += String.fromCharCode(i), a++) : i > 191 && i < 224 ? (C = F.charCodeAt(a + 1), v += String.fromCharCode((i & 31) << 6 | C & 63), a += 2) : (C = F.charCodeAt(a + 1), E = F.charCodeAt(a + 2), v += String.fromCharCode(
97
+ (i & 15) << 12 | (C & 63) << 6 | E & 63
98
98
  ), a += 3);
99
- return A;
100
- })(n), n;
99
+ return v;
100
+ })(u), u;
101
101
  }
102
- function Z(u) {
103
- return j(
102
+ function Z(t) {
103
+ return x(
104
104
  K,
105
- u ?? x({})
105
+ t ?? B({})
106
106
  );
107
107
  }
108
- function Q(u) {
109
- const t = Z();
110
- return S(() => {
108
+ function Q(t) {
109
+ const n = Z();
110
+ return w(() => {
111
111
  var e;
112
- return u.responsive ?? ((e = _(t)) == null ? void 0 : e.responsive) ?? !0;
112
+ return t.responsive ?? ((e = _(n)) == null ? void 0 : e.responsive) ?? !0;
113
113
  });
114
114
  }
115
115
  export {
@@ -119,6 +119,6 @@ export {
119
119
  Z as useLayoutState,
120
120
  q as useLicense,
121
121
  k as useLocale,
122
- P as useReceiver,
122
+ R as useReceiver,
123
123
  Q as useResponsive
124
124
  };
@@ -27,16 +27,34 @@ const _sfc_main = defineComponent({
27
27
  }
28
28
  return ((_a = innerRef.value) == null ? void 0 : _a.innerText) || "";
29
29
  };
30
- const onCopyClick = () => {
30
+ const copyText = (text) => {
31
31
  var _a;
32
- if (!authenticated.value) {
33
- return;
32
+ if (typeof ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) === "function") {
33
+ return navigator.clipboard.writeText(text);
34
34
  }
35
- if (typeof ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) !== "function") {
36
- emit("copy", new Error("浏览器不支持复制"));
35
+ return new Promise((resolve, reject) => {
36
+ const el = document.createElement("textarea");
37
+ el.value = text;
38
+ el.style.position = "fixed";
39
+ el.style.top = "-200px";
40
+ el.style.left = "-200px";
41
+ el.style.width = "100px";
42
+ el.style.height = "100px";
43
+ document.body.appendChild(el);
44
+ el.focus();
45
+ el.select();
46
+ if (document.execCommand("copy")) {
47
+ resolve();
48
+ } else {
49
+ reject(new Error("浏览器不支持复制"));
50
+ }
51
+ });
52
+ };
53
+ const onCopyClick = () => {
54
+ if (!authenticated.value) {
37
55
  return;
38
56
  }
39
- navigator.clipboard.writeText(getText()).then(() => {
57
+ copyText(getText()).then(() => {
40
58
  copied.value = true;
41
59
  updateTooltip();
42
60
  state.timer && clearTimeout(state.timer);
@@ -197,7 +197,7 @@ declare const _default: import("vue").DefineComponent<{
197
197
  sort: (prop: string, order: string) => void;
198
198
  scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
199
199
  setScrollTop: (top?: number | undefined) => void;
200
- setScrollLeft: (left?: number | undefined) => void; /** 当前页码 */
200
+ setScrollLeft: (left?: number | undefined) => void;
201
201
  setCurrentRowKey: (key?: import("../ele-data-table/types").DataKey | null | undefined) => void;
202
202
  getCurrentRow: () => DataItem | undefined;
203
203
  setSelectedRows: (rows?: DataItem[] | undefined) => void;
@@ -223,8 +223,8 @@ declare const _default: import("vue").DefineComponent<{
223
223
  rowClick: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
224
224
  rowContextmenu: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
225
225
  rowDblclick: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
226
- headerClick: (_column: import("./types").Column, _e: MouseEvent) => boolean;
227
- headerContextmenu: (_column: import("./types").Column, _e: MouseEvent) => boolean;
226
+ headerClick: (_column: import("./types").Column, _e: MouseEvent) => boolean; /** 当前页数据 */
227
+ headerContextmenu: (_column: import("./types").Column, _e: MouseEvent) => boolean; /** 当前页码 */
228
228
  sortChange: (_sorter: Sorter) => boolean;
229
229
  filterChange: (_filter: Filter) => boolean;
230
230
  currentChange: (_current?: DataItem | null | undefined, _old?: DataItem | null | undefined) => boolean;
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, watch, onMounted, resolveComponent, openBlock, createBlock, normalizeProps, guardReactiveProps, withCtx, mergeProps as mergeProps$1, renderSlot, createSlots, renderList, createCommentVNode, createElementBlock, normalizeStyle } from "vue";
2
2
  import { pick } from "../utils/core";
3
- import { useGlobalProps, useLicense } from "../ele-config-provider/receiver";
3
+ import { useGlobalProps, useLicense, UNAUTHORIZED_TIP } from "../ele-config-provider/receiver";
4
4
  import EleLoading from "../ele-loading/index";
5
5
  import ElePagination from "../ele-pagination/index";
6
6
  import { dataTablePropKeys } from "../ele-data-table/props";
@@ -118,6 +118,7 @@ const _sfc_main = defineComponent({
118
118
  });
119
119
  const reload = (option, parent, resolve) => {
120
120
  if (!authenticated.value) {
121
+ errorText.value = UNAUTHORIZED_TIP;
121
122
  return;
122
123
  }
123
124
  if (option) {
@@ -5,6 +5,10 @@
5
5
  @include set-tree-select-var($ele);
6
6
 
7
7
  .ele-tree-select-popper {
8
+ .el-tree {
9
+ background: none;
10
+ }
11
+
8
12
  .el-vl__wrapper {
9
13
  padding: eleVar('tree-select', 'padding');
10
14
  }
@@ -5,9 +5,11 @@
5
5
  @include set-el-tree-var($ele);
6
6
 
7
7
  /* Tree */
8
- .el-tree {
8
+ body .el-tree {
9
9
  background: none;
10
+ }
10
11
 
12
+ .el-tree {
11
13
  .el-tree-node {
12
14
  padding-top: eleVar('tree', 'item-margin');
13
15
  box-sizing: border-box;
@@ -11,6 +11,10 @@
11
11
  padding: eleVar('tree-select', 'padding') !important;
12
12
  }
13
13
 
14
+ .el-tree {
15
+ background: none;
16
+ }
17
+
14
18
  .el-tree-node__content {
15
19
  position: relative;
16
20
  z-index: 0;
@@ -283,7 +283,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
283
283
  disableTransitions: true
284
284
  }, {
285
285
  default: vue.withCtx(() => [
286
- vue.renderSlot(_ctx.$slots, "maxTagPlaceholder", { omittedValues: _ctx.omittedTags }, () => [
286
+ vue.renderSlot(_ctx.$slots, "maxTagPlaceholder", {
287
+ omittedValues: _ctx.omittedTags,
288
+ omittedSize: _ctx.omittedSize
289
+ }, () => [
287
290
  vue.createTextVNode(" +" + vue.toDisplayString(_ctx.omittedSize), 1)
288
291
  ])
289
292
  ]),
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),L=require("./props"),N=require("../lang/zh_CN"),_="EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743",K=1698336417,B="1.1";function w(){return h.inject(L.PROVIDE_KEY,{})}function U(u){const t=w();return h.computed(()=>t[u]??{})}function x(u,t){const e=w();return{lang:h.computed(()=>{const c=e.locale??N;return u?Object.assign({},c[u]??{},t==null?void 0:t.locale):c}),globalConfig:e}}function M(){const u=w(),t=h.computed(()=>{const r=u.license;return r?r.trim():void 0}),e=h.ref(!1);return h.watch(t,r=>{var c;if(typeof r!="string"||!r)return e.value=!1,d();try{const o=JSON.parse($(r));if(o.product!=="EleAdminPlus")return e.value=!1,d("");const{version:s,expiration:b,domain:a}=o;if(s&&s!==B)return e.value=!1,d(s);if(b&&b<K)return e.value=!1,d(void 0,b);if(a){const n=(c=window==null?void 0:window.location)==null?void 0:c.hostname;if(!n)return e.value=!1,d(void 0,void 0,a,"");if(n!=="localhost"&&n!=="127.0.0.1"){const g=a.split("."),E=n.split(".");for(let m=g.length-1;m>=0;m--)if(g[m]!==E[m])return e.value=!1,d(void 0,void 0,a,n);if(E.length>g.length&&E[E.length-g.length-1]!=="www")return e.value=!1,d(void 0,void 0,a,n)}}}catch(o){return e.value=!1,console.error(o),d("")}e.value=!0},{immediate:!0}),{authenticated:e,globalConfig:u}}function d(u,t,e,r){const c=new Array(60).join("*"),o=[c];if(o.push(_),u==null&&t==null&&e==null&&r==null&&o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"),!u&&t==null&&!e&&o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"),u&&o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${u}, \u5F53\u524D\u7248\u672C: ${B};`),typeof t=="number"){const s=new Date(t*1e3).toLocaleString();o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${s};`)}e&&o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${r};`),o.push(c),console.error(o.join(`
2
- `))}function $(u){const t=(p,A,f)=>{const i=((l,O)=>{const j=l.length-O;if(j<=0)return l;const Y=new Array(l.length);for(let v=0;v<l.length;v++)v<O?Y[v]=l[j+v]:Y[v]=l[v-O];return Y})(p.split(""),f).join(""),F=[];let C=0;for(;C<i.length;){let l=C+A;l>i.length&&(l=i.length);const O=i.substring(C,l);F.push(O.split("").reverse().join("")),C=l}return F.join("")},e=u.indexOf("="),r=e===-1?u:u.substring(0,e),c=e===-1?"":u.substring(e),s=(t(r,12,3)+c).replace(/[^A-Za-z0-9\+\/\=]/g,""),a=t("BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C",3,1)+"=";let n="",g,E,m,R,P,S,T,D=0;for(;D<s.length;)R=a.indexOf(s.charAt(D++)),P=a.indexOf(s.charAt(D++)),S=a.indexOf(s.charAt(D++)),T=a.indexOf(s.charAt(D++)),g=R<<2|P>>4,E=(P&15)<<4|S>>2,m=(S&3)<<6|T,n=n+String.fromCharCode(g),S!=64&&(n=n+String.fromCharCode(E)),T!=64&&(n=n+String.fromCharCode(m));return n=(p=>{let A="",f=0,i=0,F=0,C=0;for(;f<p.length;)i=p.charCodeAt(f),i<128?(A+=String.fromCharCode(i),f++):i>191&&i<224?(F=p.charCodeAt(f+1),A+=String.fromCharCode((i&31)<<6|F&63),f+=2):(F=p.charCodeAt(f+1),C=p.charCodeAt(f+2),A+=String.fromCharCode((i&15)<<12|(F&63)<<6|C&63),f+=3);return A})(n),n}function I(u){return h.inject(L.LAYOUT_KEY,u??h.ref({}))}function q(u){const t=I();return h.computed(()=>{var e;return u.responsive??((e=h.unref(t))==null?void 0:e.responsive)??!0})}Object.defineProperty(exports,"LAYOUT_KEY",{enumerable:!0,get:()=>L.LAYOUT_KEY});exports.UNAUTHORIZED_TIP=_;exports.useGlobalProps=U;exports.useLayoutState=I;exports.useLicense=M;exports.useLocale=x;exports.useReceiver=w;exports.useResponsive=q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("vue"),L=require("./props"),B=require("../lang/zh_CN"),_="EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743",K=1698336417,I="1.1";function w(){return h.inject(L.PROVIDE_KEY,{})}function U(t){const u=w();return h.computed(()=>u[t]??{})}function x(t,u){const e=w();return{lang:h.computed(()=>{const c=e.locale??B;return t?Object.assign({},c[t]??{},u==null?void 0:u.locale):c}),globalConfig:e}}function M(){const t=w(),u=h.computed(()=>{const r=t.license;return r?r.trim():void 0}),e=h.ref(!1);return h.watch(u,r=>{var c;if(typeof r!="string"||!r)return e.value=!1,d();try{const o=JSON.parse($(r));if(o.product!=="EleAdminPlus")return e.value=!1,d("");const{version:s,expiration:b,domain:a}=o;if(s&&s!==I)return e.value=!1,d(s);if(b&&b<K)return e.value=!1,d(void 0,b);if(a){const n=(c=window==null?void 0:window.location)==null?void 0:c.hostname;if(!n)return e.value=!1,d(void 0,void 0,a,"");if(n!=="localhost"&&n!=="127.0.0.1"){const g=a.split("."),m=n.split(".");for(let p=g.length-1;p>=0;p--)if(g[p]!==m[p])return e.value=!1,d(void 0,void 0,a,n);if(m.length>g.length&&m[m.length-g.length-1]!=="www")return e.value=!1,d(void 0,void 0,a,n)}}}catch(o){return e.value=!1,console.error(o),d("")}e.value=!0},{immediate:!0}),{authenticated:e,globalConfig:t}}function d(t,u,e,r){const c=new Array(60).join("*"),o=[c];if(o.push(_),t==null&&u==null&&e==null&&r==null&&o.push("\u8BF7\u5148\u914D\u7F6E\u81EA\u5DF1\u7684\u6388\u6743\u7801;"),!t&&u==null&&!e&&o.push("\u8BF7\u4F7F\u7528\u6B63\u786E\u683C\u5F0F\u7684\u6388\u6743\u7801;"),t&&o.push(`\u6388\u6743\u7248\u672C\u53F7\u4E0D\u5339\u914D, \u8BF7\u4F7F\u7528: ${t}, \u5F53\u524D\u7248\u672C: ${I};`),typeof u=="number"){const s=new Date(u*1e3).toLocaleString();o.push(`\u6388\u6743\u5DF2\u5931\u6548, \u5230\u671F\u65F6\u95F4: ${s};`)}e&&o.push(`\u57DF\u540D\u4E0D\u5339\u914D, \u8BF7\u90E8\u7F72\u5728: ${e} \u4E0B, \u5F53\u524D\u57DF\u540D: ${r};`),o.push(c),console.error(o.join(`
2
+ `))}function $(t){const u=(E,A,f)=>{const i=((l,O)=>{const j=l.length-O;if(j<=0)return l;const Y=new Array(l.length);for(let v=0;v<l.length;v++)v<O?Y[v]=l[j+v]:Y[v]=l[v-O];return Y})(E.split(""),f).join(""),F=[];let C=0;for(;C<i.length;){let l=C+A;l>i.length&&(l=i.length);const O=i.substring(C,l);F.push(O.split("").reverse().join("")),C=l}return F.join("")},e=t.indexOf("="),r=e===-1?t:t.substring(0,e),c=e===-1?"":t.substring(e),s=(u(r,12,3)+c).replace(/[^A-Za-z0-9\+\/\=]/g,""),a=u("BAFEDIHGLKJONMRQPUTSXWVaZYdcbgfejihmlkponsrqvutyxw10z432765+98/C",3,1)+"=";let n="",g,m,p,R,P,S,T,D=0;for(;D<s.length;)R=a.indexOf(s.charAt(D++)),P=a.indexOf(s.charAt(D++)),S=a.indexOf(s.charAt(D++)),T=a.indexOf(s.charAt(D++)),g=R<<2|P>>4,m=(P&15)<<4|S>>2,p=(S&3)<<6|T,n=n+String.fromCharCode(g),S!=64&&(n=n+String.fromCharCode(m)),T!=64&&(n=n+String.fromCharCode(p));return n=(E=>{let A="",f=0,i=0,F=0,C=0;for(;f<E.length;)i=E.charCodeAt(f),i<128?(A+=String.fromCharCode(i),f++):i>191&&i<224?(F=E.charCodeAt(f+1),A+=String.fromCharCode((i&31)<<6|F&63),f+=2):(F=E.charCodeAt(f+1),C=E.charCodeAt(f+2),A+=String.fromCharCode((i&15)<<12|(F&63)<<6|C&63),f+=3);return A})(n),n}function N(t){return h.inject(L.LAYOUT_KEY,t??h.ref({}))}function q(t){const u=N();return h.computed(()=>{var e;return t.responsive??((e=h.unref(u))==null?void 0:e.responsive)??!0})}Object.defineProperty(exports,"LAYOUT_KEY",{enumerable:!0,get:()=>L.LAYOUT_KEY});exports.UNAUTHORIZED_TIP=_;exports.useGlobalProps=U;exports.useLayoutState=N;exports.useLicense=M;exports.useLocale=x;exports.useReceiver=w;exports.useResponsive=q;
@@ -1,7 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  import { LAYOUT_KEY } from './props';
3
3
  import type { GlobalProvide, UseLocaleResult, UseLicenseResult, LocaleProps, ResponsiveProps, LayoutProvide } from './types';
4
- export declare const UNAUTHORIZED_TIP = "EleAdminPlus \u4E3A\u5546\u4E1A\u4EA7\u54C1\u9700\u8981\u6388\u6743\u4F7F\u7528, \u8BF7\u524D\u5F80\u5B98\u7F51 www.eleadmin.com \u8D2D\u4E70\u6388\u6743";
4
+ declare const UNAUTHORIZED_TIP = "EleAdminPlus\u9700\u8981\u6388\u6743\u4F7F\u7528,\u8BF7\u524D\u5F80eleadmin.com\u8D2D\u4E70\u6388\u6743";
5
5
  /**
6
6
  * 获取全局配置
7
7
  */
@@ -26,4 +26,4 @@ export declare function useLayoutState(defaultValue?: Ref<LayoutProvide>): Ref<L
26
26
  * 获取是否开启布局响应
27
27
  */
28
28
  export declare function useResponsive(props: ResponsiveProps): import("vue").ComputedRef<boolean>;
29
- export { LAYOUT_KEY };
29
+ export { LAYOUT_KEY, UNAUTHORIZED_TIP };
@@ -28,16 +28,34 @@ const _sfc_main = vue.defineComponent({
28
28
  }
29
29
  return ((_a = innerRef.value) == null ? void 0 : _a.innerText) || "";
30
30
  };
31
- const onCopyClick = () => {
31
+ const copyText = (text) => {
32
32
  var _a;
33
- if (!authenticated.value) {
34
- return;
33
+ if (typeof ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) === "function") {
34
+ return navigator.clipboard.writeText(text);
35
35
  }
36
- if (typeof ((_a = navigator == null ? void 0 : navigator.clipboard) == null ? void 0 : _a.writeText) !== "function") {
37
- emit("copy", new Error("浏览器不支持复制"));
36
+ return new Promise((resolve, reject) => {
37
+ const el = document.createElement("textarea");
38
+ el.value = text;
39
+ el.style.position = "fixed";
40
+ el.style.top = "-200px";
41
+ el.style.left = "-200px";
42
+ el.style.width = "100px";
43
+ el.style.height = "100px";
44
+ document.body.appendChild(el);
45
+ el.focus();
46
+ el.select();
47
+ if (document.execCommand("copy")) {
48
+ resolve();
49
+ } else {
50
+ reject(new Error("浏览器不支持复制"));
51
+ }
52
+ });
53
+ };
54
+ const onCopyClick = () => {
55
+ if (!authenticated.value) {
38
56
  return;
39
57
  }
40
- navigator.clipboard.writeText(getText()).then(() => {
58
+ copyText(getText()).then(() => {
41
59
  copied.value = true;
42
60
  updateTooltip();
43
61
  state.timer && clearTimeout(state.timer);
@@ -119,6 +119,7 @@ const _sfc_main = vue.defineComponent({
119
119
  });
120
120
  const reload = (option, parent, resolve) => {
121
121
  if (!authenticated.value) {
122
+ errorText.value = receiver.UNAUTHORIZED_TIP;
122
123
  return;
123
124
  }
124
125
  if (option) {
@@ -197,7 +197,7 @@ declare const _default: import("vue").DefineComponent<{
197
197
  sort: (prop: string, order: string) => void;
198
198
  scrollTo: (options: number | ScrollToOptions, yCoord?: number | undefined) => void;
199
199
  setScrollTop: (top?: number | undefined) => void;
200
- setScrollLeft: (left?: number | undefined) => void; /** 当前页码 */
200
+ setScrollLeft: (left?: number | undefined) => void;
201
201
  setCurrentRowKey: (key?: import("../ele-data-table/types").DataKey | null | undefined) => void;
202
202
  getCurrentRow: () => DataItem | undefined;
203
203
  setSelectedRows: (rows?: DataItem[] | undefined) => void;
@@ -223,8 +223,8 @@ declare const _default: import("vue").DefineComponent<{
223
223
  rowClick: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
224
224
  rowContextmenu: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
225
225
  rowDblclick: (_row: DataItem, _column: import("./types").Column, _e: MouseEvent) => boolean;
226
- headerClick: (_column: import("./types").Column, _e: MouseEvent) => boolean;
227
- headerContextmenu: (_column: import("./types").Column, _e: MouseEvent) => boolean;
226
+ headerClick: (_column: import("./types").Column, _e: MouseEvent) => boolean; /** 当前页数据 */
227
+ headerContextmenu: (_column: import("./types").Column, _e: MouseEvent) => boolean; /** 当前页码 */
228
228
  sortChange: (_sorter: Sorter) => boolean;
229
229
  filterChange: (_filter: Filter) => boolean;
230
230
  currentChange: (_current?: DataItem | null | undefined, _old?: DataItem | null | undefined) => boolean;
@@ -5,6 +5,10 @@
5
5
  @include set-tree-select-var($ele);
6
6
 
7
7
  .ele-tree-select-popper {
8
+ .el-tree {
9
+ background: none;
10
+ }
11
+
8
12
  .el-vl__wrapper {
9
13
  padding: eleVar('tree-select', 'padding');
10
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ele-admin-plus",
3
- "version": "1.1.6-beta.6",
3
+ "version": "1.1.7-beta.1",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite --host --config vite.global.ts",
@@ -42,7 +42,7 @@
42
42
  "element-plus": "^2.4.4",
43
43
  "eslint": "^8.56.0",
44
44
  "eslint-config-prettier": "^9.1.0",
45
- "eslint-plugin-prettier": "^5.1.0",
45
+ "eslint-plugin-prettier": "^5.1.2",
46
46
  "eslint-plugin-vue": "^9.19.2",
47
47
  "esno": "^4.0.0",
48
48
  "execa": "^8.0.1",
@@ -67,7 +67,7 @@
67
67
  "vue-eslint-parser": "^9.3.2",
68
68
  "vue-i18n": "^9.8.0",
69
69
  "vue-router": "^4.2.5",
70
- "vue-tsc": "^1.8.25",
70
+ "vue-tsc": "^1.8.26",
71
71
  "vuedraggable": "^4.1.0",
72
72
  "xgplayer": "^3.0.11",
73
73
  "xgplayer-hls": "^3.0.11",