@lingshugroup/web-plus 1.5.2 → 1.7.0

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.
Files changed (54) hide show
  1. package/lib/downloadFile/index.cjs +1 -0
  2. package/lib/downloadFile/index.js +12 -0
  3. package/lib/index/index.cjs +1 -1
  4. package/lib/index/index.js +20 -18
  5. package/lib/index/index.js.br +0 -0
  6. package/lib/index/index.js.gz +0 -0
  7. package/lib/index.css +1 -1
  8. package/lib/index.css.br +0 -0
  9. package/lib/index.css.gz +0 -0
  10. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.cjs +1 -1
  11. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js +20 -17
  12. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js.br +0 -0
  13. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js.gz +0 -0
  14. package/lib/packages/ls-components/components/_utils/utils/index.cjs +1 -1
  15. package/lib/packages/ls-components/components/_utils/utils/index.js +117 -64
  16. package/lib/packages/ls-components/components/_utils/utils/index.js.br +0 -0
  17. package/lib/packages/ls-components/components/_utils/utils/index.js.gz +0 -0
  18. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.cjs +1 -0
  19. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js +94 -0
  20. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js.br +0 -0
  21. package/lib/packages/ls-components/components/downloadFile/Index.vue/index.js.gz +0 -0
  22. package/lib/packages/ls-components/components/downloadFile/Index.vue/index2.cjs +1 -0
  23. package/lib/packages/ls-components/components/downloadFile/Index.vue/index2.js +4 -0
  24. package/lib/packages/ls-components/components/downloadFile/types/index.cjs +1 -0
  25. package/lib/packages/ls-components/components/downloadFile/types/index.js +46 -0
  26. package/lib/packages/ls-components/components/index/index.cjs +1 -1
  27. package/lib/packages/ls-components/components/index/index.js +35 -33
  28. package/lib/packages/ls-components/components/index/index.js.br +0 -0
  29. package/lib/packages/ls-components/components/index/index.js.gz +0 -0
  30. package/lib/packages/ls-components/components/menu/Index.vue/index.cjs +1 -1
  31. package/lib/packages/ls-components/components/menu/Index.vue/index.js +2 -2
  32. package/lib/packages/ls-components/components/menu/Index.vue/index2.cjs +1 -1
  33. package/lib/packages/ls-components/components/menu/Index.vue/index2.js +82 -48
  34. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.br +0 -0
  35. package/lib/packages/ls-components/components/menu/Index.vue/index2.js.gz +0 -0
  36. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.cjs +1 -1
  37. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js +73 -50
  38. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.br +0 -0
  39. package/lib/packages/ls-components/components/menu/MenuItem.vue/index.js.gz +0 -0
  40. package/lib/packages/ls-components/components/menu/types/index.cjs +1 -1
  41. package/lib/packages/ls-components/components/menu/types/index.js +15 -7
  42. package/lib/types/components/_hooks/useRouterHook.d.ts +2 -2
  43. package/lib/types/components/_utils/index.d.ts +2 -1
  44. package/lib/types/components/_utils/utils.d.ts +17 -0
  45. package/lib/types/components/downloadFile/Index.vue.d.ts +34 -0
  46. package/lib/types/components/downloadFile/index.d.ts +78 -0
  47. package/lib/types/components/downloadFile/types.d.ts +12 -0
  48. package/lib/types/components/menu/Index.vue.d.ts +7 -2
  49. package/lib/types/components/menu/MenuItem.vue.d.ts +3 -0
  50. package/lib/types/components/menu/index.d.ts +15 -3
  51. package/lib/types/components/menu/types.d.ts +3 -0
  52. package/lib/utils/index.cjs +1 -1
  53. package/lib/utils/index.js +2 -0
  54. package/package.json +1 -1
package/lib/index.css.br CHANGED
Binary file
package/lib/index.css.gz CHANGED
Binary file
@@ -1 +1 @@
1
- "use strict";var M=Object.defineProperty;var n=(o,c)=>M(o,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue-router"),b=require("vue");function m(){const o=d.useRouter(),c=d.useRoute(),y=b.ref(c),R=n((t,e)=>{const{name:u,query:s={},path:r}=t||{};e?r&&o.push({path:r,query:s}):u&&o.push({name:u,query:s})},"jumpRouteCom"),i=n(()=>c.query,"getRouteQuery");function l(t,e,u){t.bcList=u,t.children?(t.leaf&&e.push(t),t.children.forEach(s=>{const r=[...u,{title:t.title,name:t.name}];l(s,e,r)})):e.push(t)}n(l,"processMenuItems");const f=n(t=>{let e=[];return t.forEach(u=>l(u,e,[])),e},"getRouterConfig");function h(t,e,u,s){t.push({path:e.path||"",name:e.name,component:u[`${s}/${e.cpoPath}.vue`],meta:{key:e.key,title:e.title,bcList:(e.bcList||[]).concat({title:e.title})}})}return n(h,"addMenu"),{route:c,router:o,currentRouter:y,jumpRouteCom:R,getRouteQuery:i,getMenusByAuth:n((t,e,u,s)=>{const r=[];return f(t).forEach(a=>{var p;if(s){const v=((p=a==null?void 0:a.pCode)==null?void 0:p.toString())||"";s.includes(v)&&h(r,a,e,u)}else h(r,a,e,u)}),r},"getMenusByAuth")}}n(m,"useRouterHook");exports.default=m;
1
+ "use strict";var v=Object.defineProperty;var n=(o,a)=>v(o,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("vue-router"),M=require("vue");function f(){const o=d.useRouter(),a=d.useRoute(),y=M.ref(a),R=n((t,e)=>{const{name:u,query:s={},path:r}=t||{};e?r&&o.push({path:r,query:s}):u&&o.push({name:u,query:s})},"jumpRouteCom"),i=n(()=>a.query,"getRouteQuery");function l(t,e,u){t.bcList=u,t.children?(t.leaf&&e.push(t),t.children.forEach(s=>{const r=[...u,{title:t.title,name:t.name}];l(s,e,r)})):e.push(t)}n(l,"processMenuItems");const b=n(t=>{let e=[];return t.forEach(u=>l(u,e,[])),e},"getRouterConfig");function h(t,e,u,s){t.push({path:e.path||"",name:e.name,component:u[`${s}/${e.cpoPath}.vue`],meta:Object.assign({key:e.key,title:e.title,bcList:(e.bcList||[]).concat({title:e.title})},e.meta)})}return n(h,"addMenu"),{route:a,router:o,currentRouter:y,jumpRouteCom:R,getRouteQuery:i,getMenusByAuth:n((t,e,u,s)=>{const r=[];return b(t).forEach(c=>{var p;if(s){const m=((p=c==null?void 0:c.pCode)==null?void 0:p.toString())||"";s.includes(m)&&h(r,c,e,u)}else h(r,c,e,u)}),r},"getMenusByAuth")}}n(f,"useRouterHook");exports.default=f;
@@ -1,9 +1,9 @@
1
- var i = Object.defineProperty;
2
- var n = (o, a) => i(o, "name", { value: a, configurable: !0 });
3
- import { useRouter as k, useRoute as B } from "vue-router";
4
- import { ref as C } from "vue";
5
- function A() {
6
- const o = k(), a = B(), d = C(a), m = /* @__PURE__ */ n((t, e) => {
1
+ var b = Object.defineProperty;
2
+ var n = (o, a) => b(o, "name", { value: a, configurable: !0 });
3
+ import { useRouter as i, useRoute as k } from "vue-router";
4
+ import { ref as B } from "vue";
5
+ function q() {
6
+ const o = i(), a = k(), m = B(a), d = /* @__PURE__ */ n((t, e) => {
7
7
  const { name: u, query: s = {}, path: r } = t || {};
8
8
  e ? r && o.push({
9
9
  path: r,
@@ -35,20 +35,23 @@ function A() {
35
35
  path: e.path || "",
36
36
  name: e.name,
37
37
  component: u[`${s}/${e.cpoPath}.vue`],
38
- meta: {
39
- key: e.key,
40
- title: e.title,
41
- bcList: (e.bcList || []).concat({
42
- title: e.title
43
- })
44
- }
38
+ meta: Object.assign(
39
+ {
40
+ key: e.key,
41
+ title: e.title,
42
+ bcList: (e.bcList || []).concat({
43
+ title: e.title
44
+ })
45
+ },
46
+ e.meta
47
+ )
45
48
  });
46
49
  }
47
50
  return n(h, "addMenu"), {
48
51
  route: a,
49
52
  router: o,
50
- currentRouter: d,
51
- jumpRouteCom: m,
53
+ currentRouter: m,
54
+ jumpRouteCom: d,
52
55
  getRouteQuery: y,
53
56
  getMenusByAuth: /* @__PURE__ */ n((t, e, u, s) => {
54
57
  const r = [];
@@ -63,7 +66,7 @@ function A() {
63
66
  }, "getMenusByAuth")
64
67
  };
65
68
  }
66
- n(A, "useRouterHook");
69
+ n(q, "useRouterHook");
67
70
  export {
68
- A as default
71
+ q as default
69
72
  };
@@ -1 +1 @@
1
- "use strict";var a=Object.defineProperty;var n=(t,e)=>a(t,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function f(t){if(t===null)return!0;const e=typeof t;return!!(e==="undefined"||e==="string"&&(t=t.replace(/^\s*|\s*$/g,""),t==="")||e==="number"&&Number.isNaN(t)||e==="object"&&Object.keys(t).length===0)}n(f,"isEmpty");const d=n((t=[])=>{const e=[];return t.forEach(o=>{e.push(new Promise((c,u)=>{const r=document.createElement("script");r.id=o.id,r.src=o.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),u({})}}))}),Promise.all(e)},"loadJs"),p=n((t=[])=>{t.forEach(e=>{const o=document.getElementById(e.id);o&&o.remove()})},"removeJs"),h=n((t=[])=>{const e=[];return t.forEach(o=>{e.push(new Promise((c,u)=>{const r=document.createElement("link");r.id=o.id,r.rel="stylesheet",r.href=o.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),u({})}}))}),Promise.all(e)},"loadCss"),m=n((t=[])=>{t.forEach(e=>{const o=document.getElementById(e.id);o&&o.remove()})},"removeCss");function s(t,e){return Number((Math.ceil(t*100)/100).toFixed(e||1))}n(s,"numberFixed");function b(t,e,o){const c=t,u=e;o=o||0,t=s(t,o),e=s(e,o);let r=s((t-e)/2,o);r=r==0?.1:r;let l=Math.ceil((t-e)/r);l=l==0?1:l,e<r&&(e=0);let i=s(r*l+e,o);return i<=c&&(i=s(i+r,o)),{aMax:i,aMin:e==0||e<u?e:s(e-r,o),aInterval:r}}n(b,"formatChartAxis");function y(t){try{return t=JSON.parse(t),t!==null&&typeof t=="object"?t.constructor===Object:!1}catch{return!1}}n(y,"isValidJSON");exports.formatChartAxis=b;exports.isEmpty=f;exports.isValidJSON=y;exports.loadCss=h;exports.loadJs=d;exports.numberFixed=s;exports.removeCss=m;exports.removeJs=p;
1
+ "use strict";var C=Object.defineProperty;var s=(e,t)=>C(e,"name",{value:t,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function f(e){if(e===null)return!0;const t=typeof e;return!!(t==="undefined"||t==="string"&&(e=e.replace(/^\s*|\s*$/g,""),e==="")||t==="number"&&Number.isNaN(e)||t==="object"&&Object.keys(e).length===0)}s(f,"isEmpty");function a(e,t){try{const n=new Blob([e]),c=URL.createObjectURL(n),o=document.createElement("a");o.style.display="none",o.href=c,o.download=t,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(c)}catch{}}s(a,"exportFile");function d(e){if(f(e))return"";const t=e.lastIndexOf(".");return t>=0?e.substring(t):""}s(d,"getExtension");const h=s((e=[])=>{const t=[];return e.forEach(n=>{t.push(new Promise((c,o)=>{const r=document.createElement("script");r.id=n.id,r.src=n.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),o({})}}))}),Promise.all(t)},"loadJs"),b=s((e=[])=>{e.forEach(t=>{const n=document.getElementById(t.id);n&&n.remove()})},"removeJs"),p=s((e=[])=>{const t=[];return e.forEach(n=>{t.push(new Promise((c,o)=>{const r=document.createElement("link");r.id=n.id,r.rel="stylesheet",r.href=n.src,document.body.appendChild(r),r.onload=function(){c({})},r.onerror=function(){r.remove(),o({})}}))}),Promise.all(t)},"loadCss"),y=s((e=[])=>{e.forEach(t=>{const n=document.getElementById(t.id);n&&n.remove()})},"removeCss");function m(){return`#${Math.floor(Math.random()*16777215).toString(16).padStart(6,"0")}`}s(m,"getRandomHexColor");function u(e,t){return Number((Math.ceil(e*100)/100).toFixed(t||1))}s(u,"numberFixed");function M(e,t,n){const c=e,o=t;n=n||0,e=u(e,n),t=u(t,n);let r=u((e-t)/2,n);r=r==0?.1:r;let i=Math.ceil((e-t)/r);i=i==0?1:i,t<r&&(t=0);let l=u(r*i+t,n);return l<=c&&(l=u(l+r,n)),{aMax:l,aMin:t==0||t<o?t:u(t-r,n),aInterval:r}}s(M,"formatChartAxis");function g(e){try{return e=JSON.parse(e),e!==null&&typeof e=="object"?e.constructor===Object:!1}catch{return!1}}s(g,"isValidJSON");function E(e){const t=e.reduce((r,i)=>r+i.byteLength,0),n=new ArrayBuffer(t),c=new Uint8Array(n);let o=0;return e.forEach(r=>{c.set(new Uint8Array(r.file),o),o+=r.byteLength}),c}s(E,"mergeBuffer");function w(e){const t=window.atob(e),n=t.length,c=new Uint8Array(n);for(let o=0;o<n;o++)c[o]=t.charCodeAt(o);return new Uint8Array(c).buffer}s(w,"fileToBuffer");const v={isEmpty:f,exportFile:a,getExtension:d,loadJs:h,removeJs:b,loadCss:p,removeCss:y,getRandomHexColor:m,numberFixed:u,isValidJSON:g,mergeBuffer:E,fileToBuffer:w};exports.default=v;exports.exportFile=a;exports.fileToBuffer=w;exports.formatChartAxis=M;exports.getExtension=d;exports.getRandomHexColor=m;exports.isEmpty=f;exports.isValidJSON=g;exports.loadCss=p;exports.loadJs=h;exports.mergeBuffer=E;exports.numberFixed=u;exports.removeCss=y;exports.removeJs=b;
@@ -1,84 +1,137 @@
1
- var f = Object.defineProperty;
2
- var o = (t, e) => f(t, "name", { value: e, configurable: !0 });
3
- function d(t) {
4
- if (t === null) return !0;
5
- const e = typeof t;
6
- return !!(e === "undefined" || e === "string" && (t = t.replace(/^\s*|\s*$/g, ""), t === "") || e === "number" && Number.isNaN(t) || e === "object" && Object.keys(t).length === 0);
1
+ var a = Object.defineProperty;
2
+ var s = (e, t) => a(e, "name", { value: t, configurable: !0 });
3
+ function f(e) {
4
+ if (e === null) return !0;
5
+ const t = typeof e;
6
+ return !!(t === "undefined" || t === "string" && (e = e.replace(/^\s*|\s*$/g, ""), e === "") || t === "number" && Number.isNaN(e) || t === "object" && Object.keys(e).length === 0);
7
7
  }
8
- o(d, "isEmpty");
9
- const p = /* @__PURE__ */ o((t = []) => {
10
- const e = [];
11
- return t.forEach((n) => {
12
- e.push(
13
- new Promise((s, u) => {
14
- const r = document.createElement("script");
15
- r.id = n.id, r.src = n.src, document.body.appendChild(r), r.onload = function() {
16
- s({});
17
- }, r.onerror = function() {
18
- r.remove(), u({});
8
+ s(f, "isEmpty");
9
+ function d(e, t) {
10
+ try {
11
+ const r = new Blob([e]), c = URL.createObjectURL(r), o = document.createElement("a");
12
+ o.style.display = "none", o.href = c, o.download = t, document.body.appendChild(o), o.click(), o.remove(), URL.revokeObjectURL(c);
13
+ } catch {
14
+ }
15
+ }
16
+ s(d, "exportFile");
17
+ function h(e) {
18
+ if (f(e)) return "";
19
+ const t = e.lastIndexOf(".");
20
+ return t >= 0 ? e.substring(t) : "";
21
+ }
22
+ s(h, "getExtension");
23
+ const b = /* @__PURE__ */ s((e = []) => {
24
+ const t = [];
25
+ return e.forEach((r) => {
26
+ t.push(
27
+ new Promise((c, o) => {
28
+ const n = document.createElement("script");
29
+ n.id = r.id, n.src = r.src, document.body.appendChild(n), n.onload = function() {
30
+ c({});
31
+ }, n.onerror = function() {
32
+ n.remove(), o({});
19
33
  };
20
34
  })
21
35
  );
22
- }), Promise.all(e);
23
- }, "loadJs"), h = /* @__PURE__ */ o((t = []) => {
24
- t.forEach((e) => {
25
- const n = document.getElementById(e.id);
26
- n && n.remove();
36
+ }), Promise.all(t);
37
+ }, "loadJs"), p = /* @__PURE__ */ s((e = []) => {
38
+ e.forEach((t) => {
39
+ const r = document.getElementById(t.id);
40
+ r && r.remove();
27
41
  });
28
- }, "removeJs"), b = /* @__PURE__ */ o((t = []) => {
29
- const e = [];
30
- return t.forEach((n) => {
31
- e.push(
32
- new Promise((s, u) => {
33
- const r = document.createElement("link");
34
- r.id = n.id, r.rel = "stylesheet", r.href = n.src, document.body.appendChild(r), r.onload = function() {
35
- s({});
36
- }, r.onerror = function() {
37
- r.remove(), u({});
42
+ }, "removeJs"), y = /* @__PURE__ */ s((e = []) => {
43
+ const t = [];
44
+ return e.forEach((r) => {
45
+ t.push(
46
+ new Promise((c, o) => {
47
+ const n = document.createElement("link");
48
+ n.id = r.id, n.rel = "stylesheet", n.href = r.src, document.body.appendChild(n), n.onload = function() {
49
+ c({});
50
+ }, n.onerror = function() {
51
+ n.remove(), o({});
38
52
  };
39
53
  })
40
54
  );
41
- }), Promise.all(e);
42
- }, "loadCss"), y = /* @__PURE__ */ o((t = []) => {
43
- t.forEach((e) => {
44
- const n = document.getElementById(e.id);
45
- n && n.remove();
55
+ }), Promise.all(t);
56
+ }, "loadCss"), g = /* @__PURE__ */ s((e = []) => {
57
+ e.forEach((t) => {
58
+ const r = document.getElementById(t.id);
59
+ r && r.remove();
46
60
  });
47
61
  }, "removeCss");
48
- function c(t, e) {
49
- return Number((Math.ceil(t * 100) / 100).toFixed(e || 1));
62
+ function m() {
63
+ return `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`;
50
64
  }
51
- o(c, "numberFixed");
52
- function m(t, e, n) {
53
- const s = t, u = e;
54
- n = n || 0, t = c(t, n), e = c(e, n);
55
- let r = c((t - e) / 2, n);
56
- r = r == 0 ? 0.1 : r;
57
- let l = Math.ceil((t - e) / r);
58
- l = l == 0 ? 1 : l, e < r && (e = 0);
59
- let i = c(r * l + e, n);
60
- return i <= s && (i = c(i + r, n)), {
61
- aMax: i,
62
- aMin: e == 0 || e < u ? e : c(e - r, n),
63
- aInterval: r
65
+ s(m, "getRandomHexColor");
66
+ function u(e, t) {
67
+ return Number((Math.ceil(e * 100) / 100).toFixed(t || 1));
68
+ }
69
+ s(u, "numberFixed");
70
+ function C(e, t, r) {
71
+ const c = e, o = t;
72
+ r = r || 0, e = u(e, r), t = u(t, r);
73
+ let n = u((e - t) / 2, r);
74
+ n = n == 0 ? 0.1 : n;
75
+ let i = Math.ceil((e - t) / n);
76
+ i = i == 0 ? 1 : i, t < n && (t = 0);
77
+ let l = u(n * i + t, r);
78
+ return l <= c && (l = u(l + n, r)), {
79
+ aMax: l,
80
+ aMin: t == 0 || t < o ? t : u(t - n, r),
81
+ aInterval: n
64
82
  };
65
83
  }
66
- o(m, "formatChartAxis");
67
- function E(t) {
84
+ s(C, "formatChartAxis");
85
+ function w(e) {
68
86
  try {
69
- return t = JSON.parse(t), t !== null && typeof t == "object" ? t.constructor === Object : !1;
87
+ return e = JSON.parse(e), e !== null && typeof e == "object" ? e.constructor === Object : !1;
70
88
  } catch {
71
89
  return !1;
72
90
  }
73
91
  }
74
- o(E, "isValidJSON");
92
+ s(w, "isValidJSON");
93
+ function E(e) {
94
+ const t = e.reduce((n, i) => n + i.byteLength, 0), r = new ArrayBuffer(t), c = new Uint8Array(r);
95
+ let o = 0;
96
+ return e.forEach((n) => {
97
+ c.set(new Uint8Array(n.file), o), o += n.byteLength;
98
+ }), c;
99
+ }
100
+ s(E, "mergeBuffer");
101
+ function U(e) {
102
+ const t = window.atob(e), r = t.length, c = new Uint8Array(r);
103
+ for (let o = 0; o < r; o++)
104
+ c[o] = t.charCodeAt(o);
105
+ return new Uint8Array(c).buffer;
106
+ }
107
+ s(U, "fileToBuffer");
108
+ const M = {
109
+ isEmpty: f,
110
+ exportFile: d,
111
+ getExtension: h,
112
+ loadJs: b,
113
+ removeJs: p,
114
+ loadCss: y,
115
+ removeCss: g,
116
+ getRandomHexColor: m,
117
+ numberFixed: u,
118
+ isValidJSON: w,
119
+ mergeBuffer: E,
120
+ fileToBuffer: U
121
+ };
75
122
  export {
76
- m as formatChartAxis,
77
- d as isEmpty,
78
- E as isValidJSON,
79
- b as loadCss,
80
- p as loadJs,
81
- c as numberFixed,
82
- y as removeCss,
83
- h as removeJs
123
+ M as default,
124
+ d as exportFile,
125
+ U as fileToBuffer,
126
+ C as formatChartAxis,
127
+ h as getExtension,
128
+ m as getRandomHexColor,
129
+ f as isEmpty,
130
+ w as isValidJSON,
131
+ y as loadCss,
132
+ b as loadJs,
133
+ E as mergeBuffer,
134
+ u as numberFixed,
135
+ g as removeCss,
136
+ p as removeJs
84
137
  };
@@ -0,0 +1 @@
1
+ "use strict";var M=Object.defineProperty;var s=(d,m)=>M(d,"name",{value:m,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */const e=require("vue"),T=,/* empty css */C=,/* empty css */j=,/* empty css */I=e.defineComponent({name:"LSDownloadFile"}),O=e.defineComponent({...I,props:C.lsDownloadProp,emits:C.emitNames,setup(d,{expose:m,emit:w}){const D=T.useNamespace("download-file").b(),n=d,g=w,o=e.ref({strokeWidth:15,striped:!0,stripedFlow:!0,percentage:0,duration:10}),v=e.ref([]),i=e.ref([]),a=e.ref([]),h=e.ref([]),l=e.ref([]),r=e.ref(0),k=e.computed(()=>n.maxErrorNum<=a.value.length),x=e.computed(()=>i.value.length===n.chunkTotal);function y(){E()}s(y,"start");function b(){i.value=[],a.value=[],h.value=[],o.value.status="",l.value=[],r.value=0}s(b,"reset");function P(){l.value=Array.from({length:n.chunkTotal},(t,u)=>u+1)}s(P,"initChunkQueue");function _(){return Math.ceil(i.value.length/n.chunkTotal*100)}s(_,"setPercentage");async function E(){r.value==0&&(b(),P()),o.value.percentage=_(),N()}s(E,"initDownload");async function N(){if(a.value.length>0){const t=Math.max(...a.value),u=n.initRequstNum-a.value.length||0;l.value=a.value.concat(Array.from({length:u},(f,p)=>p+t+1))}l.value.forEach(t=>{q(t)})}s(N,"downloadChunk");async function q(t){r.value++;const u=t-1;v.value[u]=new AbortController;const f=v.value[u].signal;return new Promise(async(p,R)=>{const A=n.chunkDataRequestParams?Object.assign(n.chunkDataRequestParams,{chunk:t}):{id:n.recordId,chunk:t};try{const c=await n.chunkDataRequest(Object.assign(A),n.chunkDataRequestConfig||{signal:f});r.value--,h.value[u]=c,i.value.includes(t)||i.value.push(t),o.value.percentage=_(),p(c)}catch(c){a.value.includes(t)||a.value.push(t),R(c)}finally{r.value===0&&a.value.length>0||k.value?(o.value.status="exception",g("onDownloadError",{errChunk:a.value}),n.cancelUploadInLimit&&v.value.forEach(c=>c.abort())):r.value!==0&&!k.value&&l.value.length!=n.chunkTotal?q(l.value.length):x.value&&(o.value.status="success",g("onDownloadSuccess",h.value))}})}return s(q,"chunkDataRequestFunc"),e.onUnmounted(()=>{v.value.forEach(t=>t.abort())}),m({start:y}),(t,u)=>{const f=j.ElProgress;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(D))},[e.createVNode(f,e.normalizeProps(e.guardReactiveProps(Object.assign(e.unref(o),t.$attrs))),null,16)],2)}}});exports.default=O;
@@ -0,0 +1,94 @@
1
+ var j = Object.defineProperty;
2
+ var o = (f, p) => j(f, "name", { value: p, configurable: !0 });
3
+ /* empty css */
4
+ /* empty css */
5
+ import { defineComponent as x, ref as s, computed as C, onUnmounted as F, openBlock as L, createElementBlock as M, normalizeClass as O, unref as D, createVNode as z, normalizeProps as B, guardReactiveProps as Q } from "vue";
6
+ import { useNamespace as S } from "../../_hooks/useNamespace/index.js";
7
+ import { lsDownloadProp as U, emitNames as V } from "../types/index.js";
8
+ import { ElProgress as W } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.5.13_typescript@5.5.4_/node_modules/element-plus/es/components/progress/index/index.js";
9
+ const $ = x({
10
+ name: "LSDownloadFile"
11
+ }), ae = /* @__PURE__ */ x({
12
+ ...$,
13
+ props: U,
14
+ emits: V,
15
+ setup(f, { expose: p, emit: y }) {
16
+ const E = S("download-file").b(), a = f, g = y, u = s({
17
+ strokeWidth: 15,
18
+ striped: !0,
19
+ stripedFlow: !0,
20
+ percentage: 0,
21
+ duration: 10
22
+ }), v = s([]), i = s([]), t = s([]), d = s([]), l = s([]), r = s(0), k = C(() => a.maxErrorNum <= t.value.length), P = C(() => i.value.length === a.chunkTotal);
23
+ function b() {
24
+ N();
25
+ }
26
+ o(b, "start");
27
+ function R() {
28
+ i.value = [], t.value = [], d.value = [], u.value.status = "", l.value = [], r.value = 0;
29
+ }
30
+ o(R, "reset");
31
+ function q() {
32
+ l.value = Array.from({ length: a.chunkTotal }, (e, n) => n + 1);
33
+ }
34
+ o(q, "initChunkQueue");
35
+ function _() {
36
+ return Math.ceil(i.value.length / a.chunkTotal * 100);
37
+ }
38
+ o(_, "setPercentage");
39
+ async function N() {
40
+ r.value == 0 && (R(), q()), u.value.percentage = _(), A();
41
+ }
42
+ o(N, "initDownload");
43
+ async function A() {
44
+ if (t.value.length > 0) {
45
+ const e = Math.max(...t.value), n = a.initRequstNum - t.value.length || 0;
46
+ l.value = t.value.concat(Array.from({ length: n }, (m, h) => h + e + 1));
47
+ }
48
+ l.value.forEach((e) => {
49
+ w(e);
50
+ });
51
+ }
52
+ o(A, "downloadChunk");
53
+ async function w(e) {
54
+ r.value++;
55
+ const n = e - 1;
56
+ v.value[n] = new AbortController();
57
+ const m = v.value[n].signal;
58
+ return new Promise(async (h, I) => {
59
+ const T = a.chunkDataRequestParams ? Object.assign(a.chunkDataRequestParams, { chunk: e }) : {
60
+ id: a.recordId,
61
+ chunk: e
62
+ };
63
+ try {
64
+ const c = await a.chunkDataRequest(
65
+ Object.assign(T),
66
+ a.chunkDataRequestConfig || {
67
+ signal: m
68
+ }
69
+ );
70
+ r.value--, d.value[n] = c, i.value.includes(e) || i.value.push(e), u.value.percentage = _(), h(c);
71
+ } catch (c) {
72
+ t.value.includes(e) || t.value.push(e), I(c);
73
+ } finally {
74
+ r.value === 0 && t.value.length > 0 || k.value ? (u.value.status = "exception", g("onDownloadError", {
75
+ errChunk: t.value
76
+ }), a.cancelUploadInLimit && v.value.forEach((c) => c.abort())) : r.value !== 0 && !k.value && l.value.length != a.chunkTotal ? w(l.value.length) : P.value && (u.value.status = "success", g("onDownloadSuccess", d.value));
77
+ }
78
+ });
79
+ }
80
+ return o(w, "chunkDataRequestFunc"), F(() => {
81
+ v.value.forEach((e) => e.abort());
82
+ }), p({ start: b }), (e, n) => {
83
+ const m = W;
84
+ return L(), M("div", {
85
+ class: O(D(E))
86
+ }, [
87
+ z(m, B(Q(Object.assign(D(u), e.$attrs))), null, 16)
88
+ ], 2);
89
+ };
90
+ }
91
+ });
92
+ export {
93
+ ae as default
94
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./index.cjs");exports.default=e.default;
@@ -0,0 +1,4 @@
1
+ import f from "./index.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../_utils/runtime/index.cjs"),t=e.buildProps({recordId:{type:[String,Number],default:""},chunkTotal:{type:Number,default:0},chunkDataRequest:{type:Function,default:null},chunkDataRequestParams:{type:Object,default:null},chunkDataRequestConfig:{type:Object,default:null},initRequstNum:{type:Number,default:10},maxErrorNum:{type:Number,default:6},cancelUploadInLimit:{type:Boolean,default:!0}}),u=["onDownloadSuccess","onDownloadError"];exports.emitNames=u;exports.lsDownloadProp=t;
@@ -0,0 +1,46 @@
1
+ import { buildProps as e } from "../../_utils/runtime/index.js";
2
+ const u = e({
3
+ // 数据记录id
4
+ recordId: {
5
+ type: [String, Number],
6
+ default: ""
7
+ },
8
+ // 下载分片总数量
9
+ chunkTotal: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ // 分片下载请求
14
+ chunkDataRequest: {
15
+ type: Function,
16
+ default: null
17
+ },
18
+ // 分片下载请求参数
19
+ chunkDataRequestParams: {
20
+ type: Object,
21
+ default: null
22
+ },
23
+ chunkDataRequestConfig: {
24
+ type: Object,
25
+ default: null
26
+ },
27
+ // 初始请求数量
28
+ initRequstNum: {
29
+ type: Number,
30
+ default: 10
31
+ },
32
+ // 最大异常请求数
33
+ maxErrorNum: {
34
+ type: Number,
35
+ default: 6
36
+ },
37
+ // 超出上限是否取消上传
38
+ cancelUploadInLimit: {
39
+ type: Boolean,
40
+ default: !0
41
+ }
42
+ }), a = ["onDownloadSuccess", "onDownloadError"];
43
+ export {
44
+ a as emitNames,
45
+ u as lsDownloadProp
46
+ };
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var o=(t,r)=>s(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("@element-plus/icons-vue"),i=require("../../../../button/index.cjs"),l=require("../../../../descriptions/index.cjs"),c=require("../../../../form/index.cjs"),d=require("../../../../table/index.cjs"),f=require("../../../../upload/index.cjs"),S=require("../../../../preview/index.cjs"),L=require("../../../../menu/index.cjs"),m=require("../../../../icon/index.cjs"),q=require("../../../../confirm/index.cjs"),p=require("../../../../chart/index.cjs"),b=require("../../../../breadcrumb/index.cjs"),v=require("../../../../bellMessage/index.cjs"),g=require("../../../../live/index.cjs"),P=require("../../../../tree/index.cjs"),w=require("../../../../print/index.cjs"),y=require("../../../../containerBox/index.cjs"),B=require("../../../../backTop/index.cjs"),_=require("../../../../map/index.cjs"),O=require("../../../../editor/index.cjs"),j=require("../../../../dialog/index.cjs"),x=require("../../../../layout/index.cjs"),M=require("../../../../list/index.cjs"),k=require("../../../../preview_image/index.cjs"),I=require("../../../../preview_docx/index.cjs"),T=require("../../../../preview_pdf/index.cjs"),D=require("../../../../preview_xlsx/index.cjs");function F(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:o(()=>t[e],"get")})}}return r.default=t,Object.freeze(r)}o(F,"_interopNamespaceDefault");const C=F(a),u={LSButtonGroup:i.LSButtonGroup,LSButton:i.LSButton,LSDescriptions:l.default,LSUpload:f.default,LSPreview:S.default,LSForm:c.LSForm,LSFormItem:c.LSFormItem,LSTable:d.default,LSMenu:L.default,LSIcon:m.default,LSConfirm:q.default,LSChart:p.default,LSBreadcrumb:b.default,LSBellMessage:v.default,LSLive:g.default,LSTree:P.default,LSPrint:w.default,LSContainerBox:y.default,LSBackTop:B.default,LSMap:_.default,LSEditor:O.default,LSDialog:j.default,LSLayout:x.default,LSList:M.default,LSPreviewImage:k.default,LSPreviewDocx:I.default,LSPreviewPdf:T.default,LSPreviewXlsx:D.default},E=o(t=>{for(const[r,e]of Object.entries(C))t.component(r,e);for(const r of Object.keys(u)){const e=u[r];t.component(e==null?void 0:e.name,e)}},"install"),h={...u,install:E};exports.default=h;
1
+ "use strict";var l=Object.defineProperty;var o=(t,r)=>l(t,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("@element-plus/icons-vue"),i=require("../../../../button/index.cjs"),a=require("../../../../descriptions/index.cjs"),c=require("../../../../form/index.cjs"),d=require("../../../../table/index.cjs"),f=require("../../../../upload/index.cjs"),S=require("../../../../preview/index.cjs"),L=require("../../../../menu/index.cjs"),q=require("../../../../icon/index.cjs"),m=require("../../../../confirm/index.cjs"),p=require("../../../../chart/index.cjs"),b=require("../../../../breadcrumb/index.cjs"),v=require("../../../../bellMessage/index.cjs"),g=require("../../../../live/index.cjs"),w=require("../../../../tree/index.cjs"),P=require("../../../../print/index.cjs"),y=require("../../../../containerBox/index.cjs"),B=require("../../../../backTop/index.cjs"),_=require("../../../../map/index.cjs"),O=require("../../../../editor/index.cjs"),j=require("../../../../dialog/index.cjs"),x=require("../../../../layout/index.cjs"),M=require("../../../../list/index.cjs"),k=require("../../../../preview_image/index.cjs"),D=require("../../../../preview_docx/index.cjs"),F=require("../../../../preview_pdf/index.cjs"),I=require("../../../../preview_xlsx/index.cjs"),T=require("../../../../downloadFile/index.cjs");function C(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:o(()=>t[e],"get")})}}return r.default=t,Object.freeze(r)}o(C,"_interopNamespaceDefault");const E=C(s),u={LSButtonGroup:i.LSButtonGroup,LSButton:i.LSButton,LSDescriptions:a.default,LSUpload:f.default,LSPreview:S.default,LSForm:c.LSForm,LSFormItem:c.LSFormItem,LSTable:d.default,LSMenu:L.default,LSIcon:q.default,LSConfirm:m.default,LSChart:p.default,LSBreadcrumb:b.default,LSBellMessage:v.default,LSLive:g.default,LSTree:w.default,LSPrint:P.default,LSContainerBox:y.default,LSBackTop:B.default,LSMap:_.default,LSEditor:O.default,LSDialog:j.default,LSLayout:x.default,LSList:M.default,LSPreviewImage:k.default,LSPreviewDocx:D.default,LSPreviewPdf:F.default,LSPreviewXlsx:I.default,LSDownloadFile:T.default},h=o(t=>{for(const[r,e]of Object.entries(E))t.component(r,e);for(const r of Object.keys(u)){const e=u[r];t.component(e==null?void 0:e.name,e)}},"install"),G={...u,install:h};exports.default=G;
@@ -9,24 +9,25 @@ import a from "../../../../upload/index.js";
9
9
  import l from "../../../../preview/index.js";
10
10
  import u from "../../../../menu/index.js";
11
11
  import P from "../../../../icon/index.js";
12
- import v from "../../../../confirm/index.js";
13
- import B from "../../../../chart/index.js";
14
- import b from "../../../../breadcrumb/index.js";
15
- import d from "../../../../bellMessage/index.js";
16
- import w from "../../../../live/index.js";
12
+ import d from "../../../../confirm/index.js";
13
+ import v from "../../../../chart/index.js";
14
+ import w from "../../../../breadcrumb/index.js";
15
+ import B from "../../../../bellMessage/index.js";
16
+ import b from "../../../../live/index.js";
17
17
  import k from "../../../../tree/index.js";
18
18
  import x from "../../../../print/index.js";
19
19
  import y from "../../../../containerBox/index.js";
20
- import I from "../../../../backTop/index.js";
21
- import g from "../../../../map/index.js";
22
- import C from "../../../../editor/index.js";
23
- import D from "../../../../dialog/index.js";
24
- import M from "../../../../layout/index.js";
25
- import T from "../../../../list/index.js";
26
- import j from "../../../../preview_image/index.js";
27
- import E from "../../../../preview_docx/index.js";
28
- import F from "../../../../preview_pdf/index.js";
20
+ import D from "../../../../backTop/index.js";
21
+ import I from "../../../../map/index.js";
22
+ import g from "../../../../editor/index.js";
23
+ import C from "../../../../dialog/index.js";
24
+ import F from "../../../../layout/index.js";
25
+ import M from "../../../../list/index.js";
26
+ import T from "../../../../preview_image/index.js";
27
+ import j from "../../../../preview_docx/index.js";
28
+ import E from "../../../../preview_pdf/index.js";
29
29
  import O from "../../../../preview_xlsx/index.js";
30
+ import h from "../../../../downloadFile/index.js";
30
31
  const t = {
31
32
  LSButtonGroup: p,
32
33
  LSButton: L,
@@ -38,35 +39,36 @@ const t = {
38
39
  LSTable: c,
39
40
  LSMenu: u,
40
41
  LSIcon: P,
41
- LSConfirm: v,
42
- LSChart: B,
43
- LSBreadcrumb: b,
44
- LSBellMessage: d,
45
- LSLive: w,
42
+ LSConfirm: d,
43
+ LSChart: v,
44
+ LSBreadcrumb: w,
45
+ LSBellMessage: B,
46
+ LSLive: b,
46
47
  LSTree: k,
47
48
  LSPrint: x,
48
49
  LSContainerBox: y,
49
- LSBackTop: I,
50
- LSMap: g,
51
- LSEditor: C,
52
- LSDialog: D,
53
- LSLayout: M,
54
- LSList: T,
55
- LSPreviewImage: j,
56
- LSPreviewDocx: E,
57
- LSPreviewPdf: F,
58
- LSPreviewXlsx: O
59
- }, h = /* @__PURE__ */ i((m) => {
50
+ LSBackTop: D,
51
+ LSMap: I,
52
+ LSEditor: g,
53
+ LSDialog: C,
54
+ LSLayout: F,
55
+ LSList: M,
56
+ LSPreviewImage: T,
57
+ LSPreviewDocx: j,
58
+ LSPreviewPdf: E,
59
+ LSPreviewXlsx: O,
60
+ LSDownloadFile: h
61
+ }, G = /* @__PURE__ */ i((m) => {
60
62
  for (const [r, o] of Object.entries(f))
61
63
  m.component(r, o);
62
64
  for (const r of Object.keys(t)) {
63
65
  const o = t[r];
64
66
  m.component(o == null ? void 0 : o.name, o);
65
67
  }
66
- }, "install"), So = {
68
+ }, "install"), so = {
67
69
  ...t,
68
- install: h
70
+ install: G
69
71
  };
70
72
  export {
71
- So as default
73
+ so as default
72
74
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const u=,/* empty css */t=u.default(e.default,[["__scopeId","data-v-036d116b"]]);exports.default=t;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const u=,/* empty css */t=u.default(e.default,[["__scopeId","data-v-c1d172e8"]]);exports.default=t;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-036d116b"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c1d172e8"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var k=Object.defineProperty;var i=(o,r)=>k(o,"name",{value:r,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),M=,/* empty css */m=,/* empty css */q=,/* empty css */C=,/* empty css */y=,/* empty css */S=e.defineComponent({name:"LSMenu"}),g=e.defineComponent({...S,props:m.lsMenuProps,emits:m.lsEmitNames,setup(o,{emit:r}){e.useCssVars(n=>({a288ab0c:n.hoverColor}));const{currentRouter:s}=q.default(),p=M.useNamespace("menu").b(),l=o,d=r,c=e.ref(!1),a=e.ref(""),f=e.ref();e.watch(()=>l.permissionList,n=>{l.needPermission&&n&&n.length>0&&u()},{immediate:!0,deep:!0}),e.watch(()=>s.value,()=>{u()},{immediate:!0,deep:!0});function u(){if(!c.value)return;const{meta:n}=(s==null?void 0:s.value)||{};a.value=(n==null?void 0:n.key)||"1"}i(u,"initMenuSider");function _(n){d("onJump",n)}return i(_,"onJump"),e.onMounted(()=>{c.value=!0,u()}),(n,B)=>{const v=y.ElMenu;return e.openBlock(),e.createBlock(v,e.mergeProps({ref_key:"lsComMenu",ref:f},n.$attrs,{class:e.unref(p),"default-active":e.unref(a)}),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menuConfigList,t=>(e.openBlock(),e.createBlock(C.default,{key:t.key,item:t,"permission-list":n.permissionList,"need-permission":n.needPermission,onOnJump:_},{[t.iconSlot]:e.withCtx(()=>[e.renderSlot(n.$slots,t.iconSlot,{},void 0,!0)]),_:2},1032,["item","permission-list","need-permission"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=g;
1
+ "use strict";var g=Object.defineProperty;var o=(c,l)=>g(c,"name",{value:l,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("vue"),N=,/* empty css */S=,/* empty css */w=,/* empty css */B=,/* empty css */E=,/* empty css */D=s.defineComponent({name:"LSMenu"}),P=s.defineComponent({...D,props:S.lsMenuProps,emits:S.lsEmitNames,setup(c,{expose:l,emit:h}){s.useCssVars(e=>({"0dc576c6":e.hoverColor}));const{currentRouter:r}=w.default(),y=N.useNamespace("menu").b(),C=c,a=h,q=s.useAttrs(),k=s.ref(!1),_=s.ref(""),u=s.ref();s.watch(()=>C.permissionList,e=>{C.needPermission&&e&&e.length>0&&m()},{immediate:!0,deep:!0}),s.watch(()=>r.value,()=>{m()},{immediate:!0,deep:!0}),s.watch(()=>q["default-active"],async e=>{e&&(await s.nextTick(),f(e.toString()))},{immediate:!0,deep:!0});function m(){if(!k.value)return;const{meta:e}=(r==null?void 0:r.value)||{};_.value=(e==null?void 0:e.key)||"1"}o(m,"initMenuSider");function L(e){a("onJump",e)}o(L,"onJump");function M(e,i){f(e),a("defineSubClick",e,i)}o(M,"defineSubClickFunc");function b(e,i){f(e),a("defineChildClick",e,i)}o(b,"defineChildClickFunc");function f(e){if(u.value){let i=!1;const d=u.value.$el.querySelectorAll(".el-sub-menu"),n=u.value.$el.querySelectorAll(".el-menu-item"),p="is-sub-active",v="is-active";n.forEach(t=>{Array.from(t.classList).includes(v)&&t.classList.remove(v),e===t.dataset.index&&(i=!0,t.classList.add(v))}),d.forEach(t=>{Array.from(t.classList).includes(p)&&t.classList.remove(p),!i&&e===t.dataset.index&&t.classList.add(p)})}}return o(f,"removeActiveClass"),s.onMounted(()=>{k.value=!0,m()}),l({lsComMenuRef:u}),(e,i)=>{const d=E.ElMenu;return s.openBlock(),s.createBlock(d,s.mergeProps({ref_key:"lsComMenuRef",ref:u},e.$attrs,{class:s.unref(y),"default-active":s.unref(_)}),{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.menuConfigList,n=>(s.openBlock(),s.createBlock(B.default,{key:n.key,item:n,"permission-list":e.permissionList,"need-permission":e.needPermission,"is-define-click":e.isDefineClick,onOnJump:L,onDefineSubClick:M,onDefineChildClick:b},{[n.iconSlot]:s.withCtx(()=>[s.renderSlot(e.$slots,n.iconSlot,{},void 0,!0)]),_:2},1032,["item","permission-list","need-permission","is-define-click"]))),128))]),_:3},16,["class","default-active"])}}});exports.default=P;