@lingshugroup/web-plus 1.3.0 → 1.3.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.
Files changed (177) hide show
  1. package/lib/index.css +1 -1
  2. package/lib/index.css.br +0 -0
  3. package/lib/index.css.gz +0 -0
  4. package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx/index.cjs +38 -0
  5. package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx/index.js +21633 -0
  6. package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx/index.js.br +0 -0
  7. package/lib/node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx/index.js.gz +0 -0
  8. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.cjs +1 -1
  9. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js +38 -37
  10. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js.br +0 -0
  11. package/lib/packages/ls-components/components/_hooks/useRouterHook/index.js.gz +0 -0
  12. package/lib/packages/ls-components/components/preview/components/Image.vue/index.cjs +1 -1
  13. package/lib/packages/ls-components/components/preview/components/Image.vue/index.js +2 -2
  14. package/lib/packages/ls-components/components/preview/components/Image.vue/index2.cjs +1 -1
  15. package/lib/packages/ls-components/components/preview/components/Image.vue/index2.js +43 -42
  16. package/lib/packages/ls-components/components/preview/components/Image.vue/index2.js.br +0 -0
  17. package/lib/packages/ls-components/components/preview/components/Image.vue/index2.js.gz +0 -0
  18. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.cjs +1 -1
  19. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js +1 -1
  20. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.br +0 -0
  21. package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.gz +0 -0
  22. package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
  23. package/lib/packages/ls-components/components/upload/Index.vue/index.js +3 -3
  24. package/lib/types/components/_constants/aria.d.ts +17 -0
  25. package/lib/types/components/_constants/index.d.ts +2 -0
  26. package/lib/types/components/_constants/previewType.d.ts +22 -0
  27. package/lib/types/components/_constants/token.d.ts +1 -0
  28. package/lib/types/components/_directives/auth.d.ts +12 -0
  29. package/lib/types/components/_directives/index.d.ts +2 -0
  30. package/lib/types/components/_hooks/index.d.ts +6 -0
  31. package/lib/types/components/_hooks/useColorthiefHook.d.ts +3 -0
  32. package/lib/types/components/_hooks/useDelayLoader.d.ts +4 -0
  33. package/lib/types/components/_hooks/useGlobalConfig.d.ts +1 -0
  34. package/lib/types/components/_hooks/useNamespace.d.ts +20 -0
  35. package/lib/types/components/_hooks/useOptionHook.d.ts +14 -0
  36. package/lib/types/components/_hooks/usePreviewHook.d.ts +6 -0
  37. package/lib/types/components/_hooks/useRouterHook.d.ts +9376 -0
  38. package/lib/types/components/_hooks/useSelectOptionsHook.d.ts +3 -0
  39. package/lib/types/components/_hooks/useTableListHook.d.ts +23 -0
  40. package/lib/types/components/_hooks/useWSHook.d.ts +7 -0
  41. package/lib/types/components/_hooks/useZIndex.d.ts +5 -0
  42. package/lib/types/components/_types/index.d.ts +9 -0
  43. package/lib/types/components/_utils/check.d.ts +55 -0
  44. package/lib/types/components/_utils/config.d.ts +7 -0
  45. package/lib/types/components/_utils/dom.d.ts +2 -0
  46. package/lib/types/components/_utils/index.d.ts +3 -0
  47. package/lib/types/components/_utils/power.d.ts +1 -0
  48. package/lib/types/components/_utils/runtime.d.ts +31 -0
  49. package/lib/types/components/_utils/types.d.ts +149 -0
  50. package/lib/types/components/_utils/utils.d.ts +44 -0
  51. package/lib/types/components/_utils/validate.d.ts +96 -0
  52. package/lib/types/components/backTop/Index.vue.d.ts +27 -0
  53. package/lib/types/components/backTop/index.d.ts +34 -0
  54. package/lib/types/components/backTop/types.d.ts +4 -0
  55. package/lib/types/components/bellMessage/Index.vue.d.ts +26 -0
  56. package/lib/types/components/bellMessage/index.d.ts +61 -0
  57. package/lib/types/components/bellMessage/types.d.ts +24 -0
  58. package/lib/types/components/breadcrumb/Index.vue.d.ts +17 -0
  59. package/lib/types/components/breadcrumb/index.d.ts +43 -0
  60. package/lib/types/components/breadcrumb/types.d.ts +12 -0
  61. package/lib/types/components/button/Button.vue.d.ts +27 -0
  62. package/lib/types/components/button/ButtonGroup.vue.d.ts +31 -0
  63. package/lib/types/components/button/index.d.ts +79 -0
  64. package/lib/types/components/button/types.d.ts +10 -0
  65. package/lib/types/components/chart/Index.vue.d.ts +30 -0
  66. package/lib/types/components/chart/config/base.d.ts +36 -0
  67. package/lib/types/components/chart/config/index.d.ts +12 -0
  68. package/lib/types/components/chart/config/template/bar.d.ts +1 -0
  69. package/lib/types/components/chart/config/template/line.d.ts +1 -0
  70. package/lib/types/components/chart/config/template/pie.d.ts +2 -0
  71. package/lib/types/components/chart/index.d.ts +69 -0
  72. package/lib/types/components/chart/types.d.ts +54 -0
  73. package/lib/types/components/confirm/Index.vue.d.ts +87 -0
  74. package/lib/types/components/confirm/index.d.ts +182 -0
  75. package/lib/types/components/confirm/types.d.ts +28 -0
  76. package/lib/types/components/containerBox/Index.vue.d.ts +30 -0
  77. package/lib/types/components/containerBox/index.d.ts +40 -0
  78. package/lib/types/components/containerBox/types.d.ts +5 -0
  79. package/lib/types/components/descriptions/Index.vue.d.ts +38 -0
  80. package/lib/types/components/descriptions/index.d.ts +51 -0
  81. package/lib/types/components/descriptions/types.d.ts +22 -0
  82. package/lib/types/components/dialog/Index.vue.d.ts +387 -0
  83. package/lib/types/components/dialog/index.d.ts +159 -0
  84. package/lib/types/components/dialog/types.d.ts +35 -0
  85. package/lib/types/components/editor/Index.vue.d.ts +37 -0
  86. package/lib/types/components/editor/index.d.ts +88 -0
  87. package/lib/types/components/editor/types.d.ts +15 -0
  88. package/lib/types/components/form/Form.vue.d.ts +667 -0
  89. package/lib/types/components/form/FormItem.vue.d.ts +1367 -0
  90. package/lib/types/components/form/index.d.ts +2635 -0
  91. package/lib/types/components/form/types.d.ts +112 -0
  92. package/lib/types/components/icon/Index.vue.d.ts +46 -0
  93. package/lib/types/components/icon/index.d.ts +76 -0
  94. package/lib/types/components/icon/types.d.ts +54 -0
  95. package/lib/types/components/index.d.ts +4 -0
  96. package/lib/types/components/jsonEditor/Index.vue.d.ts +13 -0
  97. package/lib/types/components/jsonEditor/index.d.ts +36 -0
  98. package/lib/types/components/jsonEditor/types.d.ts +4 -0
  99. package/lib/types/components/layout/Index.vue.d.ts +54 -0
  100. package/lib/types/components/layout/components/CommandList.vue.d.ts +103 -0
  101. package/lib/types/components/layout/components/Header.vue.d.ts +119 -0
  102. package/lib/types/components/layout/index.d.ts +81 -0
  103. package/lib/types/components/layout/types.d.ts +55 -0
  104. package/lib/types/components/list/List.vue.d.ts +1630 -0
  105. package/lib/types/components/list/index.d.ts +617 -0
  106. package/lib/types/components/list/types.d.ts +141 -0
  107. package/lib/types/components/live/Index.vue.d.ts +22 -0
  108. package/lib/types/components/live/index.d.ts +54 -0
  109. package/lib/types/components/live/types.d.ts +7 -0
  110. package/lib/types/components/map/Index.vue.d.ts +137 -0
  111. package/lib/types/components/map/index.d.ts +241 -0
  112. package/lib/types/components/map/types.d.ts +61 -0
  113. package/lib/types/components/menu/Index.vue.d.ts +193 -0
  114. package/lib/types/components/menu/MenuItem.vue.d.ts +59 -0
  115. package/lib/types/components/menu/index.d.ts +141 -0
  116. package/lib/types/components/menu/types.d.ts +100 -0
  117. package/lib/types/components/preview/Index.vue.d.ts +67 -0
  118. package/lib/types/components/preview/components/Docx.vue.d.ts +12 -0
  119. package/lib/types/components/preview/components/Image.vue.d.ts +63 -0
  120. package/lib/types/components/preview/components/Pdf.vue.d.ts +16 -0
  121. package/lib/types/components/preview/components/Xlsx.vue.d.ts +21 -0
  122. package/lib/types/components/preview/components/pdfs/Annotation.vue.d.ts +22 -0
  123. package/lib/types/components/preview/components/pdfs/PdfItem.vue.d.ts +58 -0
  124. package/lib/types/components/preview/components/pdfs/Text.vue.d.ts +17 -0
  125. package/lib/types/components/preview/components/pdfs/XFA.vue.d.ts +13 -0
  126. package/lib/types/components/preview/components/pdfs/annotations.d.ts +5 -0
  127. package/lib/types/components/preview/components/pdfs/destination.d.ts +7 -0
  128. package/lib/types/components/preview/components/pdfs/highlight.d.ts +6 -0
  129. package/lib/types/components/preview/components/pdfs/linkService.d.ts +71 -0
  130. package/lib/types/components/preview/components/pdfs/miscellaneous.d.ts +3 -0
  131. package/lib/types/components/preview/composable.d.ts +30 -0
  132. package/lib/types/components/preview/index.d.ts +130 -0
  133. package/lib/types/components/preview/types.d.ts +143 -0
  134. package/lib/types/components/preview_docx/Docx.vue.d.ts +12 -0
  135. package/lib/types/components/preview_docx/Index.vue.d.ts +61 -0
  136. package/lib/types/components/preview_docx/index.d.ts +121 -0
  137. package/lib/types/components/preview_docx/types.d.ts +5 -0
  138. package/lib/types/components/preview_image/Image.vue.d.ts +64 -0
  139. package/lib/types/components/preview_image/Index.vue.d.ts +76 -0
  140. package/lib/types/components/preview_image/index.d.ts +125 -0
  141. package/lib/types/components/preview_image/types.d.ts +25 -0
  142. package/lib/types/components/preview_pdf/Index.vue.d.ts +61 -0
  143. package/lib/types/components/preview_pdf/Pdf.vue.d.ts +16 -0
  144. package/lib/types/components/preview_pdf/composable.d.ts +30 -0
  145. package/lib/types/components/preview_pdf/index.d.ts +121 -0
  146. package/lib/types/components/preview_pdf/pdfs/Annotation.vue.d.ts +22 -0
  147. package/lib/types/components/preview_pdf/pdfs/PdfItem.vue.d.ts +58 -0
  148. package/lib/types/components/preview_pdf/pdfs/Text.vue.d.ts +17 -0
  149. package/lib/types/components/preview_pdf/pdfs/XFA.vue.d.ts +13 -0
  150. package/lib/types/components/preview_pdf/pdfs/annotations.d.ts +5 -0
  151. package/lib/types/components/preview_pdf/pdfs/destination.d.ts +7 -0
  152. package/lib/types/components/preview_pdf/pdfs/highlight.d.ts +6 -0
  153. package/lib/types/components/preview_pdf/pdfs/linkService.d.ts +71 -0
  154. package/lib/types/components/preview_pdf/pdfs/miscellaneous.d.ts +3 -0
  155. package/lib/types/components/preview_pdf/types.d.ts +79 -0
  156. package/lib/types/components/preview_xlsx/Index.vue.d.ts +61 -0
  157. package/lib/types/components/preview_xlsx/Xlsx.vue.d.ts +24 -0
  158. package/lib/types/components/preview_xlsx/config.d.ts +66 -0
  159. package/lib/types/components/preview_xlsx/index.d.ts +121 -0
  160. package/lib/types/components/preview_xlsx/types.d.ts +21 -0
  161. package/lib/types/components/print/Index.vue.d.ts +34 -0
  162. package/lib/types/components/print/index.d.ts +52 -0
  163. package/lib/types/components/print/types.d.ts +10 -0
  164. package/lib/types/components/table/Table.vue.d.ts +640 -0
  165. package/lib/types/components/table/index.d.ts +343 -0
  166. package/lib/types/components/table/types.d.ts +63 -0
  167. package/lib/types/components/tree/Index.vue.d.ts +83 -0
  168. package/lib/types/components/tree/index.d.ts +159 -0
  169. package/lib/types/components/tree/types.d.ts +35 -0
  170. package/lib/types/components/upload/Index.vue.d.ts +456 -0
  171. package/lib/types/components/upload/index.d.ts +3 -0
  172. package/lib/types/components/upload/types.d.ts +54 -0
  173. package/package.json +2 -1
  174. package/lib/node_modules/.pnpm/xlsx@https___cdn.sheetjs.com_xlsx-0.20.3_xlsx-0.20.3.tgz/node_modules/xlsx/xlsx/index.cjs +0 -63
  175. package/lib/node_modules/.pnpm/xlsx@https___cdn.sheetjs.com_xlsx-0.20.3_xlsx-0.20.3.tgz/node_modules/xlsx/xlsx/index.js +0 -20945
  176. package/lib/node_modules/.pnpm/xlsx@https___cdn.sheetjs.com_xlsx-0.20.3_xlsx-0.20.3.tgz/node_modules/xlsx/xlsx/index.js.br +0 -0
  177. package/lib/node_modules/.pnpm/xlsx@https___cdn.sheetjs.com_xlsx-0.20.3_xlsx-0.20.3.tgz/node_modules/xlsx/xlsx/index.js.gz +0 -0
@@ -1 +1 @@
1
- "use strict";var v=Object.defineProperty;var r=(o,c)=>v(o,"name",{value:c,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("vue-router"),M=require("vue");function b(){const o=p.useRouter(),c=p.useRoute(),i=M.ref(c),d=r((t,e)=>{const{name:u,query:n={},path:s}=t||{};e?s&&o.push({path:s,query:n}):u&&o.push({name:u,query:n})},"jumpRouteCom"),f=r(()=>c.query,"getRouteQuery");function l(t,e,u){t.bcList=u,t.children?(t.leaf&&e.push(t),t.children.forEach(n=>{const s=[...u,{title:t.title,name:t.name}];l(n,e,s)})):e.push(t)}r(l,"processMenuItems");const y=r(t=>{let e=[];return t.forEach(u=>l(u,e,[])),e},"getRouterConfig");function h(t,e,u,n){t.push({path:e.path,name:e.name,component:u[`${n}/${e.cpoPath}.vue`],meta:{key:e.key,title:e.title,bcList:(e.bcList||[]).concat({title:e.title})}})}return r(h,"addMenu"),{route:c,router:o,currentRouter:i,jumpRouteCom:d,getRouteQuery:f,getMenusByAuth:r((t,e,u,n)=>{const s=[];return y(t).forEach(a=>{if(n){const R=a.pCode.toString();n.includes(R)&&h(s,a,e,u)}else h(s,a,e,u)}),s},"getMenusByAuth")}}r(b,"useRouterHook");exports.default=b;
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,40 +1,40 @@
1
- var y = Object.defineProperty;
2
- var s = (r, c) => y(r, "name", { value: c, configurable: !0 });
3
- import { useRouter as R, useRoute as k } from "vue-router";
4
- import { ref as B } from "vue";
5
- function q() {
6
- const r = R(), c = k(), l = B(c), f = /* @__PURE__ */ s((t, e) => {
7
- const { name: u, query: n = {}, path: o } = t || {};
8
- e ? o && r.push({
9
- path: o,
10
- query: n
11
- }) : u && r.push({
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) => {
7
+ const { name: u, query: s = {}, path: r } = t || {};
8
+ e ? r && o.push({
9
+ path: r,
10
+ query: s
11
+ }) : u && o.push({
12
12
  name: u,
13
- query: n
13
+ query: s
14
14
  });
15
- }, "jumpRouteCom"), d = /* @__PURE__ */ s(() => c.query, "getRouteQuery");
15
+ }, "jumpRouteCom"), y = /* @__PURE__ */ n(() => a.query, "getRouteQuery");
16
16
  function p(t, e, u) {
17
- t.bcList = u, t.children ? (t.leaf && e.push(t), t.children.forEach((n) => {
18
- const o = [
17
+ t.bcList = u, t.children ? (t.leaf && e.push(t), t.children.forEach((s) => {
18
+ const r = [
19
19
  ...u,
20
20
  {
21
21
  title: t.title,
22
22
  name: t.name
23
23
  }
24
24
  ];
25
- p(n, e, o);
25
+ p(s, e, r);
26
26
  })) : e.push(t);
27
27
  }
28
- s(p, "processMenuItems");
29
- const i = /* @__PURE__ */ s((t) => {
28
+ n(p, "processMenuItems");
29
+ const R = /* @__PURE__ */ n((t) => {
30
30
  let e = [];
31
31
  return t.forEach((u) => p(u, e, [])), e;
32
32
  }, "getRouterConfig");
33
- function h(t, e, u, n) {
33
+ function h(t, e, u, s) {
34
34
  t.push({
35
- path: e.path,
35
+ path: e.path || "",
36
36
  name: e.name,
37
- component: u[`${n}/${e.cpoPath}.vue`],
37
+ component: u[`${s}/${e.cpoPath}.vue`],
38
38
  meta: {
39
39
  key: e.key,
40
40
  title: e.title,
@@ -44,25 +44,26 @@ function q() {
44
44
  }
45
45
  });
46
46
  }
47
- return s(h, "addMenu"), {
48
- route: c,
49
- router: r,
50
- currentRouter: l,
51
- jumpRouteCom: f,
52
- getRouteQuery: d,
53
- getMenusByAuth: /* @__PURE__ */ s((t, e, u, n) => {
54
- const o = [];
55
- return i(t).forEach((a) => {
56
- if (n) {
57
- const m = a.pCode.toString();
58
- n.includes(m) && h(o, a, e, u);
47
+ return n(h, "addMenu"), {
48
+ route: a,
49
+ router: o,
50
+ currentRouter: d,
51
+ jumpRouteCom: m,
52
+ getRouteQuery: y,
53
+ getMenusByAuth: /* @__PURE__ */ n((t, e, u, s) => {
54
+ const r = [];
55
+ return R(t).forEach((c) => {
56
+ var l;
57
+ if (s) {
58
+ const f = ((l = c == null ? void 0 : c.pCode) == null ? void 0 : l.toString()) || "";
59
+ s.includes(f) && h(r, c, e, u);
59
60
  } else
60
- h(o, a, e, u);
61
- }), o;
61
+ h(r, c, e, u);
62
+ }), r;
62
63
  }, "getMenusByAuth")
63
64
  };
64
65
  }
65
- s(q, "useRouterHook");
66
+ n(A, "useRouterHook");
66
67
  export {
67
- q as default
68
+ A as default
68
69
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-2f2651f2"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-41c0c421"]]);exports.default=u;
@@ -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 a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2f2651f2"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-41c0c421"]]);
5
5
  export {
6
- a as default
6
+ c as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var ne=Object.defineProperty;var r=(w,z)=>ne(w,"name",{value:z,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("../../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.cjs"),oe=require("../../../_hooks/useNamespace/index.cjs"),se=require("../../../_hooks/useZIndex/index.cjs"),k=require("../../../_constants/aria/index.cjs"),_=require("../../../_utils/check/index.cjs"),ae=require("../../../_utils/types/index.cjs"),X=require("../../types/index.cjs"),f=require("../../../icon/Index.vue/index.cjs"),O=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.cjs"),Y=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),re=["src"],le=e.defineComponent({name:"LSImage"}),ie=e.defineComponent({...le,props:X.imageViewerProps,emits:X.previewEmits,setup(w,{expose:z,emit:$}){const v={CONTAIN:{name:"FullScreen"},ORIGINAL:{name:"ScaleToOriginal"}},A=_.isFirefox()?"DOMMouseScroll":"mousewheel",l=w,h=$,s=oe.useNamespace("image"),{nextZIndex:B}=se.useZIndex(),I=e.ref(),y=e.ref([]),L=e.effectScope(),g=e.ref(!0),u=e.ref(l.initialIndex),N=e.shallowRef(v.CONTAIN),a=e.reactive({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"}),j=e.computed(()=>{const{source:t}=l;return t.length<=1}),D=e.computed(()=>u.value===0),S=e.computed(()=>u.value===l.source.length-1),Z=e.computed(()=>l.source[u.value]),H=e.computed(()=>{const{scale:t,deg:n,offsetX:o,offsetY:i,enableTransition:c,width:E,height:T,objectFit:C}=a;let m=o/t,p=i/t;switch(n%360){case 90:case-270:[m,p]=[p,-m];break;case 180:case-180:[m,p]=[-m,-p];break;case 270:case-90:[m,p]=[-p,m];break}const b={transform:`scale(${t}) rotate(${n}deg) translate(${m}px, ${p}px)`,transition:c?"transform .3s":""};return N.value.name===v.CONTAIN.name&&(b.maxWidth=b.maxHeight="100%"),b.width=E,b.height=T,b.objectFit=C,b}),P=e.computed(()=>_.isNumber(l.zIndex)?l.zIndex:B()),G=r(()=>{l.onClose&&l.onClose(),h("update:source",[])},"closeFunc");function V(){J(),G()}r(V,"hide");function W(){const t=O.default(o=>{switch(o.code){case k.EVENT_CODE.esc:l.closeOnPressEscape&&V();break;case k.EVENT_CODE.space:M();break;case k.EVENT_CODE.left:q();break;case k.EVENT_CODE.up:d("zoomIn");break;case k.EVENT_CODE.right:R();break;case k.EVENT_CODE.down:d("zoomOut");break}}),n=O.default(o=>{(o.wheelDelta?o.wheelDelta:-o.detail)>0?d("zoomIn",{zoomRate:1.2,enableTransition:!1}):d("zoomOut",{zoomRate:1.2,enableTransition:!1})});L.run(()=>{F.useEventListener(document,"keydown",t),F.useEventListener(document,A,n)})}r(W,"registerEventListener");function J(){L.stop()}r(J,"unregisterEventListener");function K(){g.value=!1,h("loadComplete")}r(K,"handleImgLoad");function Q(t){g.value=!1,t.target.alt="ls.image.error",h("loadError")}r(Q,"handleImgError");function U(t){if(g.value||t.button!==0||!I.value)return;a.enableTransition=!1;const{offsetX:n,offsetY:o}=a,i=t.pageX,c=t.pageY,E=O.default(C=>{a.offsetX=n+C.pageX-i,a.offsetY=o+C.pageY-c}),T=F.useEventListener(document,"mousemove",E);F.useEventListener(document,"mouseup",()=>{T()}),t.preventDefault()}r(U,"handleMouseDown");function ee(){Y.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"})}r(ee,"reset");function te(){Y.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"100%",height:"100%",objectFit:"cover"})}r(te,"fullScreen");function M(){if(g.value)return;const t=ae.keysOf(v),n=Object.values(v),o=N.value.name,c=(n.findIndex(E=>E.name===o)+1)%t.length;N.value=v[t[c]],o===v.CONTAIN.name?te():ee()}r(M,"toggleMode");function x(t){const n=l.source.length;u.value=(t+n)%n}r(x,"setActiveItem");function q(){D.value&&!l.infinite||x(u.value-1)}r(q,"prev");function R(){S.value&&!l.infinite||x(u.value+1)}r(R,"next");function d(t,n={}){if(g.value)return;const{zoomRate:o,rotateDeg:i,enableTransition:c}={zoomRate:1.4,rotateDeg:90,enableTransition:!0,...n};switch(t){case"zoomOut":a.scale>.2&&(a.scale=Number.parseFloat((a.scale/o).toFixed(3)));break;case"zoomIn":a.scale<7&&(a.scale=Number.parseFloat((a.scale*o).toFixed(3)));break;case"clockwise":a.deg+=i;break;case"anticlockwise":a.deg-=i;break}a.enableTransition=c}return r(d,"handleActions"),e.watch(Z,()=>{e.nextTick(()=>{const t=y.value[0];t!=null&&t.complete||(g.value=!0)})}),e.watch(u,t=>{h("switch",t)}),e.onMounted(()=>{var t,n;W(),(n=(t=I.value)==null?void 0:t.focus)==null||n.call(t)}),z({setActiveItem:x}),(t,n)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.teleported},[e.createVNode(e.Transition,{name:"viewer-fade",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapper",ref:I,tabindex:-1,class:e.normalizeClass(e.unref(s).e("wrapper")),style:e.normalizeStyle({zIndex:e.unref(P)})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("mask")),onClick:n[0]||(n[0]=e.withModifiers(o=>t.hideOnClickModal&&V(),["self"]))},null,2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("close")]),onClick:V},[e.createVNode(f.default,{name:"Close",size:24,color:"#FFF"})],2),e.unref(j)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("prev"),e.unref(s).is("disabled",!t.infinite&&e.unref(D))]),onClick:q},[e.createVNode(f.default,{name:"ArrowLeft",size:24,color:"#FFF"})],2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("next"),e.unref(s).is("disabled",!t.infinite&&e.unref(S))]),onClick:R},[e.createVNode(f.default,{name:"ArrowRight",size:24,color:"#FFF"})],2)],64)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("actions")])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("actions__inner"))},[e.createVNode(f.default,{name:"ZoomOut",size:24,color:"#FFF",onClick:n[1]||(n[1]=o=>d("zoomOut"))}),e.createVNode(f.default,{name:"ZoomIn",size:24,color:"#FFF",onClick:n[2]||(n[2]=o=>d("zoomIn"))}),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(f.default,{name:e.unref(N).name,size:24,color:"#FFF",onClick:M},null,8,["name"]),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(f.default,{name:"RefreshLeft",size:24,color:"#FFF",onClick:n[3]||(n[3]=o=>d("anticlockwise"))}),e.createVNode(f.default,{name:"RefreshRight",size:24,color:"#FFF",onClick:n[4]||(n[4]=o=>d("clockwise"))})],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("canvas"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.source,(o,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("img",{ref_for:!0,ref:r(c=>e.unref(y)[i]=c,"ref"),key:o,src:o,style:e.normalizeStyle(e.unref(H)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:K,onError:Q,onMousedown:U},null,46,re)),[[e.vShow,i===e.unref(u)]])),128))],2),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)]),_:3})],8,["disabled"]))}});exports.default=ie;
1
+ "use strict";var ne=Object.defineProperty;var r=(w,z)=>ne(w,"name",{value:z,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),F=require("../../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.cjs"),oe=require("../../../_hooks/useNamespace/index.cjs"),se=require("../../../_hooks/useZIndex/index.cjs"),k=require("../../../_constants/aria/index.cjs"),_=require("../../../_utils/check/index.cjs"),ae=require("../../../_utils/types/index.cjs"),X=require("../../types/index.cjs"),f=require("../../../icon/Index.vue/index.cjs"),O=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle/index.cjs"),Y=require("../../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.cjs"),re=["src"],le=e.defineComponent({name:"LSImage"}),ie=e.defineComponent({...le,props:X.imageViewerProps,emits:X.previewEmits,setup(w,{expose:z,emit:$}){const v={CONTAIN:{name:"FullScreen"},ORIGINAL:{name:"ScaleToOriginal"}},A=_.isFirefox()?"DOMMouseScroll":"mousewheel",l=w,h=$,s=oe.useNamespace("image"),{nextZIndex:B}=se.useZIndex(),I=e.ref(),y=e.ref([]),L=e.effectScope(),g=e.ref(!0),u=e.ref(l.initialIndex),N=e.shallowRef(v.CONTAIN),a=e.reactive({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"}),j=e.computed(()=>{const{source:t}=l;return t?t.length<=1:!0}),D=e.computed(()=>u.value===0),S=e.computed(()=>l.source?u.value===l.source.length-1:!1),Z=e.computed(()=>l.source?l.source[u.value]:null),H=e.computed(()=>{const{scale:t,deg:n,offsetX:o,offsetY:i,enableTransition:c,width:E,height:T,objectFit:C}=a;let m=o/t,p=i/t;switch(n%360){case 90:case-270:[m,p]=[p,-m];break;case 180:case-180:[m,p]=[-m,-p];break;case 270:case-90:[m,p]=[-p,m];break}const b={transform:`scale(${t}) rotate(${n}deg) translate(${m}px, ${p}px)`,transition:c?"transform .3s":""};return N.value.name===v.CONTAIN.name&&(b.maxWidth=b.maxHeight="100%"),b.width=E,b.height=T,b.objectFit=C,b}),P=e.computed(()=>_.isNumber(l.zIndex)?l.zIndex:B()),G=r(()=>{l.onClose&&l.onClose(),h("update:source",[])},"closeFunc");function V(){J(),G()}r(V,"hide");function W(){const t=O.default(o=>{switch(o.code){case k.EVENT_CODE.esc:l.closeOnPressEscape&&V();break;case k.EVENT_CODE.space:M();break;case k.EVENT_CODE.left:q();break;case k.EVENT_CODE.up:d("zoomIn");break;case k.EVENT_CODE.right:R();break;case k.EVENT_CODE.down:d("zoomOut");break}}),n=O.default(o=>{(o.wheelDelta?o.wheelDelta:-o.detail)>0?d("zoomIn",{zoomRate:1.2,enableTransition:!1}):d("zoomOut",{zoomRate:1.2,enableTransition:!1})});L.run(()=>{F.useEventListener(document,"keydown",t),F.useEventListener(document,A,n)})}r(W,"registerEventListener");function J(){L.stop()}r(J,"unregisterEventListener");function K(){g.value=!1,h("loadComplete")}r(K,"handleImgLoad");function Q(t){g.value=!1,t.target.alt="ls.image.error",h("loadError")}r(Q,"handleImgError");function U(t){if(g.value||t.button!==0||!I.value)return;a.enableTransition=!1;const{offsetX:n,offsetY:o}=a,i=t.pageX,c=t.pageY,E=O.default(C=>{a.offsetX=n+C.pageX-i,a.offsetY=o+C.pageY-c}),T=F.useEventListener(document,"mousemove",E);F.useEventListener(document,"mouseup",()=>{T()}),t.preventDefault()}r(U,"handleMouseDown");function ee(){Y.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"auto",height:"auto",objectFit:"none"})}r(ee,"reset");function te(){Y.default(a,{scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1,width:"100%",height:"100%",objectFit:"cover"})}r(te,"fullScreen");function M(){if(g.value)return;const t=ae.keysOf(v),n=Object.values(v),o=N.value.name,c=(n.findIndex(E=>E.name===o)+1)%t.length;N.value=v[t[c]],o===v.CONTAIN.name?te():ee()}r(M,"toggleMode");function x(t){var o;const n=((o=l.source)==null?void 0:o.length)??0;u.value=(t+n)%n}r(x,"setActiveItem");function q(){D.value&&!l.infinite||x(u.value-1)}r(q,"prev");function R(){S.value&&!l.infinite||x(u.value+1)}r(R,"next");function d(t,n={}){if(g.value)return;const{zoomRate:o,rotateDeg:i,enableTransition:c}={zoomRate:1.4,rotateDeg:90,enableTransition:!0,...n};switch(t){case"zoomOut":a.scale>.2&&(a.scale=Number.parseFloat((a.scale/o).toFixed(3)));break;case"zoomIn":a.scale<7&&(a.scale=Number.parseFloat((a.scale*o).toFixed(3)));break;case"clockwise":a.deg+=i;break;case"anticlockwise":a.deg-=i;break}a.enableTransition=c}return r(d,"handleActions"),e.watch(Z,()=>{e.nextTick(()=>{const t=y.value[0];t!=null&&t.complete||(g.value=!0)})}),e.watch(u,t=>{h("switch",t)}),e.onMounted(()=>{var t,n;W(),(n=(t=I.value)==null?void 0:t.focus)==null||n.call(t)}),z({setActiveItem:x}),(t,n)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!t.teleported},[e.createVNode(e.Transition,{name:"viewer-fade",appear:""},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"wrapper",ref:I,tabindex:-1,class:e.normalizeClass(e.unref(s).e("wrapper")),style:e.normalizeStyle({zIndex:e.unref(P)})},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("mask")),onClick:n[0]||(n[0]=e.withModifiers(o=>t.hideOnClickModal&&V(),["self"]))},null,2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("close")]),onClick:V},[e.createVNode(f.default,{name:"Close",size:24,color:"#FFF"})],2),e.unref(j)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("prev"),e.unref(s).is("disabled",!t.infinite&&e.unref(D))]),onClick:q},[e.createVNode(f.default,{name:"ArrowLeft",size:24,color:"#FFF"})],2),e.createElementVNode("span",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("next"),e.unref(s).is("disabled",!t.infinite&&e.unref(S))]),onClick:R},[e.createVNode(f.default,{name:"ArrowRight",size:24,color:"#FFF"})],2)],64)),e.createElementVNode("div",{class:e.normalizeClass([e.unref(s).e("btn"),e.unref(s).e("actions")])},[e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("actions__inner"))},[e.createVNode(f.default,{name:"ZoomOut",size:24,color:"#FFF",onClick:n[1]||(n[1]=o=>d("zoomOut"))}),e.createVNode(f.default,{name:"ZoomIn",size:24,color:"#FFF",onClick:n[2]||(n[2]=o=>d("zoomIn"))}),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(f.default,{name:e.unref(N).name,size:24,color:"#FFF",onClick:M},null,8,["name"]),e.createElementVNode("i",{class:e.normalizeClass(e.unref(s).e("actions__divider"))},null,2),e.createVNode(f.default,{name:"RefreshLeft",size:24,color:"#FFF",onClick:n[3]||(n[3]=o=>d("anticlockwise"))}),e.createVNode(f.default,{name:"RefreshRight",size:24,color:"#FFF",onClick:n[4]||(n[4]=o=>d("clockwise"))})],2)],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(s).e("canvas"))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.source,(o,i)=>e.withDirectives((e.openBlock(),e.createElementBlock("img",{ref_for:!0,ref:r(c=>e.unref(y)[i]=c,"ref"),key:o,src:o,style:e.normalizeStyle(e.unref(H)),class:e.normalizeClass(e.unref(s).e("img")),onLoad:K,onError:Q,onMousedown:U},null,46,re)),[[e.vShow,i===e.unref(u)]])),128))],2),e.renderSlot(t.$slots,"default",{},void 0,!0)],6)]),_:3})],8,["disabled"]))}});exports.default=ie;
@@ -1,6 +1,6 @@
1
1
  var me = Object.defineProperty;
2
2
  var r = (L, y) => me(L, "name", { value: y, configurable: !0 });
3
- import { defineComponent as q, ref as T, effectScope as fe, shallowRef as de, reactive as pe, computed as w, watch as B, nextTick as ve, onMounted as ge, openBlock as O, createBlock as be, Teleport as he, createVNode as f, Transition as ke, withCtx as Fe, createElementVNode as u, normalizeClass as c, unref as o, normalizeStyle as P, withModifiers as we, createElementBlock as Y, Fragment as G, createCommentVNode as Ie, renderList as ze, withDirectives as xe, vShow as Ce, renderSlot as Ne } from "vue";
3
+ import { defineComponent as q, ref as T, effectScope as fe, shallowRef as de, reactive as pe, computed as w, watch as B, nextTick as ve, onMounted as ge, openBlock as O, createBlock as be, Teleport as he, createVNode as f, Transition as ke, withCtx as Fe, createElementVNode as u, normalizeClass as c, unref as n, normalizeStyle as P, withModifiers as we, createElementBlock as Y, Fragment as G, createCommentVNode as Ie, renderList as ze, withDirectives as xe, vShow as Ce, renderSlot as Ne } from "vue";
4
4
  import { useEventListener as E } from "../../../../../../node_modules/.pnpm/@vueuse_core@12.0.0_typescript@5.5.4/node_modules/@vueuse/core/index/index.js";
5
5
  import { useNamespace as Te } from "../../../_hooks/useNamespace/index.js";
6
6
  import { useZIndex as Oe } from "../../../_hooks/useZIndex/index.js";
@@ -36,10 +36,10 @@ const Me = ["src"], Xe = q({
36
36
  objectFit: "none"
37
37
  }), U = w(() => {
38
38
  const { source: e } = i;
39
- return e.length <= 1;
40
- }), j = w(() => d.value === 0), V = w(() => d.value === i.source.length - 1), ee = w(() => i.source[d.value]), te = w(() => {
41
- const { scale: e, deg: t, offsetX: n, offsetY: l, enableTransition: m, width: z, height: X, objectFit: N } = a;
42
- let g = n / e, b = l / e;
39
+ return e ? e.length <= 1 : !0;
40
+ }), j = w(() => d.value === 0), V = w(() => i.source ? d.value === i.source.length - 1 : !1), ee = w(() => i.source ? i.source[d.value] : null), te = w(() => {
41
+ const { scale: e, deg: t, offsetX: o, offsetY: l, enableTransition: m, width: z, height: X, objectFit: N } = a;
42
+ let g = o / e, b = l / e;
43
43
  switch (t % 360) {
44
44
  case 90:
45
45
  case -270:
@@ -67,8 +67,8 @@ const Me = ["src"], Xe = q({
67
67
  }
68
68
  r(R, "hide");
69
69
  function se() {
70
- const e = A((n) => {
71
- switch (n.code) {
70
+ const e = A((o) => {
71
+ switch (o.code) {
72
72
  case I.esc:
73
73
  i.closeOnPressEscape && R();
74
74
  break;
@@ -88,8 +88,8 @@ const Me = ["src"], Xe = q({
88
88
  p("zoomOut");
89
89
  break;
90
90
  }
91
- }), t = A((n) => {
92
- (n.wheelDelta ? n.wheelDelta : -n.detail) > 0 ? p("zoomIn", {
91
+ }), t = A((o) => {
92
+ (o.wheelDelta ? o.wheelDelta : -o.detail) > 0 ? p("zoomIn", {
93
93
  zoomRate: 1.2,
94
94
  enableTransition: !1
95
95
  }) : p("zoomOut", {
@@ -117,8 +117,8 @@ const Me = ["src"], Xe = q({
117
117
  function le(e) {
118
118
  if (k.value || e.button !== 0 || !S.value) return;
119
119
  a.enableTransition = !1;
120
- const { offsetX: t, offsetY: n } = a, l = e.pageX, m = e.pageY, z = A((N) => {
121
- a.offsetX = t + N.pageX - l, a.offsetY = n + N.pageY - m;
120
+ const { offsetX: t, offsetY: o } = a, l = e.pageX, m = e.pageY, z = A((N) => {
121
+ a.offsetX = t + N.pageX - l, a.offsetY = o + N.pageY - m;
122
122
  }), X = E(document, "mousemove", z);
123
123
  E(document, "mouseup", () => {
124
124
  X();
@@ -153,12 +153,13 @@ const Me = ["src"], Xe = q({
153
153
  r(ue, "fullScreen");
154
154
  function Z() {
155
155
  if (k.value) return;
156
- const e = ye(h), t = Object.values(h), n = C.value.name, m = (t.findIndex((z) => z.name === n) + 1) % e.length;
157
- C.value = h[e[m]], n === h.CONTAIN.name ? ue() : ce();
156
+ const e = ye(h), t = Object.values(h), o = C.value.name, m = (t.findIndex((z) => z.name === o) + 1) % e.length;
157
+ C.value = h[e[m]], o === h.CONTAIN.name ? ue() : ce();
158
158
  }
159
159
  r(Z, "toggleMode");
160
160
  function M(e) {
161
- const t = i.source.length;
161
+ var o;
162
+ const t = ((o = i.source) == null ? void 0 : o.length) ?? 0;
162
163
  d.value = (e + t) % t;
163
164
  }
164
165
  r(M, "setActiveItem");
@@ -172,7 +173,7 @@ const Me = ["src"], Xe = q({
172
173
  r(_, "next");
173
174
  function p(e, t = {}) {
174
175
  if (k.value) return;
175
- const { zoomRate: n, rotateDeg: l, enableTransition: m } = {
176
+ const { zoomRate: o, rotateDeg: l, enableTransition: m } = {
176
177
  zoomRate: 1.4,
177
178
  rotateDeg: 90,
178
179
  enableTransition: !0,
@@ -180,10 +181,10 @@ const Me = ["src"], Xe = q({
180
181
  };
181
182
  switch (e) {
182
183
  case "zoomOut":
183
- a.scale > 0.2 && (a.scale = Number.parseFloat((a.scale / n).toFixed(3)));
184
+ a.scale > 0.2 && (a.scale = Number.parseFloat((a.scale / o).toFixed(3)));
184
185
  break;
185
186
  case "zoomIn":
186
- a.scale < 7 && (a.scale = Number.parseFloat((a.scale * n).toFixed(3)));
187
+ a.scale < 7 && (a.scale = Number.parseFloat((a.scale * o).toFixed(3)));
187
188
  break;
188
189
  case "clockwise":
189
190
  a.deg += l;
@@ -220,15 +221,15 @@ const Me = ["src"], Xe = q({
220
221
  ref_key: "wrapper",
221
222
  ref: S,
222
223
  tabindex: -1,
223
- class: c(o(s).e("wrapper")),
224
- style: P({ zIndex: o(oe) })
224
+ class: c(n(s).e("wrapper")),
225
+ style: P({ zIndex: n(oe) })
225
226
  }, [
226
227
  u("div", {
227
- class: c(o(s).e("mask")),
228
- onClick: t[0] || (t[0] = we((n) => e.hideOnClickModal && R(), ["self"]))
228
+ class: c(n(s).e("mask")),
229
+ onClick: t[0] || (t[0] = we((o) => e.hideOnClickModal && R(), ["self"]))
229
230
  }, null, 2),
230
231
  u("span", {
231
- class: c([o(s).e("btn"), o(s).e("close")]),
232
+ class: c([n(s).e("btn"), n(s).e("close")]),
232
233
  onClick: R
233
234
  }, [
234
235
  f(v, {
@@ -237,9 +238,9 @@ const Me = ["src"], Xe = q({
237
238
  color: "#FFF"
238
239
  })
239
240
  ], 2),
240
- o(U) ? Ie("", !0) : (O(), Y(G, { key: 0 }, [
241
+ n(U) ? Ie("", !0) : (O(), Y(G, { key: 0 }, [
241
242
  u("span", {
242
- class: c([o(s).e("btn"), o(s).e("prev"), o(s).is("disabled", !e.infinite && o(j))]),
243
+ class: c([n(s).e("btn"), n(s).e("prev"), n(s).is("disabled", !e.infinite && n(j))]),
243
244
  onClick: H
244
245
  }, [
245
246
  f(v, {
@@ -249,7 +250,7 @@ const Me = ["src"], Xe = q({
249
250
  })
250
251
  ], 2),
251
252
  u("span", {
252
- class: c([o(s).e("btn"), o(s).e("next"), o(s).is("disabled", !e.infinite && o(V))]),
253
+ class: c([n(s).e("btn"), n(s).e("next"), n(s).is("disabled", !e.infinite && n(V))]),
253
254
  onClick: _
254
255
  }, [
255
256
  f(v, {
@@ -260,64 +261,64 @@ const Me = ["src"], Xe = q({
260
261
  ], 2)
261
262
  ], 64)),
262
263
  u("div", {
263
- class: c([o(s).e("btn"), o(s).e("actions")])
264
+ class: c([n(s).e("btn"), n(s).e("actions")])
264
265
  }, [
265
266
  u("div", {
266
- class: c(o(s).e("actions__inner"))
267
+ class: c(n(s).e("actions__inner"))
267
268
  }, [
268
269
  f(v, {
269
270
  name: "ZoomOut",
270
271
  size: 24,
271
272
  color: "#FFF",
272
- onClick: t[1] || (t[1] = (n) => p("zoomOut"))
273
+ onClick: t[1] || (t[1] = (o) => p("zoomOut"))
273
274
  }),
274
275
  f(v, {
275
276
  name: "ZoomIn",
276
277
  size: 24,
277
278
  color: "#FFF",
278
- onClick: t[2] || (t[2] = (n) => p("zoomIn"))
279
+ onClick: t[2] || (t[2] = (o) => p("zoomIn"))
279
280
  }),
280
281
  u("i", {
281
- class: c(o(s).e("actions__divider"))
282
+ class: c(n(s).e("actions__divider"))
282
283
  }, null, 2),
283
284
  f(v, {
284
- name: o(C).name,
285
+ name: n(C).name,
285
286
  size: 24,
286
287
  color: "#FFF",
287
288
  onClick: Z
288
289
  }, null, 8, ["name"]),
289
290
  u("i", {
290
- class: c(o(s).e("actions__divider"))
291
+ class: c(n(s).e("actions__divider"))
291
292
  }, null, 2),
292
293
  f(v, {
293
294
  name: "RefreshLeft",
294
295
  size: 24,
295
296
  color: "#FFF",
296
- onClick: t[3] || (t[3] = (n) => p("anticlockwise"))
297
+ onClick: t[3] || (t[3] = (o) => p("anticlockwise"))
297
298
  }),
298
299
  f(v, {
299
300
  name: "RefreshRight",
300
301
  size: 24,
301
302
  color: "#FFF",
302
- onClick: t[4] || (t[4] = (n) => p("clockwise"))
303
+ onClick: t[4] || (t[4] = (o) => p("clockwise"))
303
304
  })
304
305
  ], 2)
305
306
  ], 2),
306
307
  u("div", {
307
- class: c(o(s).e("canvas"))
308
+ class: c(n(s).e("canvas"))
308
309
  }, [
309
- (O(!0), Y(G, null, ze(e.source, (n, l) => xe((O(), Y("img", {
310
+ (O(!0), Y(G, null, ze(e.source, (o, l) => xe((O(), Y("img", {
310
311
  ref_for: !0,
311
- ref: /* @__PURE__ */ r((m) => o(D)[l] = m, "ref"),
312
- key: n,
313
- src: n,
314
- style: P(o(te)),
315
- class: c(o(s).e("img")),
312
+ ref: /* @__PURE__ */ r((m) => n(D)[l] = m, "ref"),
313
+ key: o,
314
+ src: o,
315
+ style: P(n(te)),
316
+ class: c(n(s).e("img")),
316
317
  onLoad: re,
317
318
  onError: ie,
318
319
  onMousedown: le
319
320
  }, null, 46, Me)), [
320
- [Ce, l === o(d)]
321
+ [Ce, l === n(d)]
321
322
  ])), 128))
322
323
  ], 2),
323
324
  Ne(e.$slots, "default", {}, void 0, !0)
@@ -1 +1 @@
1
- "use strict";var U=Object.defineProperty;var o=(S,L)=>U(S,"name",{value:L,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),$=,/* empty css */G=,/* empty css */H=,/* empty css */C=,/* empty css */J=,/* empty css */F=,/* empty css */K=require("luckyexcel"),r=;/* empty css */;/* empty css */;/* empty css */;/* empty css */const Q=,/* empty css */W=s.defineComponent({name:"LSXlsx"}),Y=s.defineComponent({...W,props:G.xlsxProps,emits:H.previewEmits,setup(S,{emit:L}){const x=$.useNamespace("xlsx"),M=x.b(),f=S,l=L;s.watch(()=>f.source,e=>{const{size:t}=e||{};t/1024/1024<=r.fileSizeLimit?j(e):f.hasPagination?A(e):(Q.ElMessage.error(`文件大小超过 ${r.fileSizeLimit} MB,加载失败!`),l("loadComplete"))},{immediate:!0,deep:!0});const v=s.ref(!1);function P(){const e=document.scripts;for(let t=0;t<e.length;t++)if(e[t].src.includes("luckysheet"))return!0;return!1}o(P,"isLuckySheet");const I=o(()=>{f.onClose&&f.onClose(),l("update:source",[])},"closeFunc");async function j(e){if(_(e))try{K.transformExcelToLucky(e,function(t){t.sheets!=null&&(window.luckysheet.destroy(),window.luckysheet.create({data:t.sheets,title:t.info.name,...r.luckysheetConfig}))}),l("loadComplete")}catch{l("loadError")}}o(j,"initXlsx");function R(e){const t=Math.min(0+r.rowsPerBatch,e.length),d=e.slice(0,t);let u=0;const n=[[]];return window.luckysheet.transToCellData(d).forEach(a=>{const{r:h}=a;u!==h&&(u=h,n[u]=[]),n[u].push(a)}),n}o(R,"getSheetData");async function A(e){if(await s.nextTick(),!!_(e))try{const t=new FileReader;t.onload=async function(d){var D,T;const u=F.read(d.target.result,{type:"binary",dense:!0});let n=0;const a=(u.SheetNames||[]).map(c=>({name:c,data:F.utils.sheet_to_json(u.Sheets[c],{header:1})})),h=s.ref((D=a[n])==null?void 0:D.name),m=s.ref((T=a[n])==null?void 0:T.data);let p=m.value.length,q=0;const X=(a||[]).map((c,y)=>({name:c.name,index:y+1,status:"1",order:y,data:R(c.data)}));function b(){if(q*r.rowsPerBatch>=p)return;const c=q*r.rowsPerBatch,y=Math.min(c+r.rowsPerBatch,p),O=m.value.slice(c,y);let w=0;const B=[[]];if(window.luckysheet.transToCellData(O).forEach(k=>{const{r:i}=k;w!==i&&(w=i,B[w]=[]),B[w].push(k)}),v.value)window.luckysheet.updataSheet({data:[{name:h,index:n+1,status:"1",order:n,data:B}]});else{window.luckysheet.destroy();const k={...r.luckysheetConfig,hook:{sheetActivate(i){var g,N,z;if(n!=i){n=i-1,h.value=(g=a[n])==null?void 0:g.name,m.value=((N=a[n])==null?void 0:N.data)||[],p=m.value.length;const E=(z=document.getElementById("luckysheet"))==null?void 0:z.querySelector('.spage-number button[data-page="1"]');E==null||E.click()}},onTogglePager(i){const{page:g}=i;q=g-1,b()}}};window.luckysheet.create({data:X,pager:{pageIndex:1,total:p,pageSize:r.rowsPerBatch,showTotal:!0,showSkip:!0,showPN:!0,prevPage:"",nextPage:"",totalTxt:""},...k}),v.value=!0}l("loadComplete")}o(b,"loadBatch"),b()},t.readAsArrayBuffer(e)}catch{l("loadError")}}o(A,"initXlsxLarge");async function _(e){return!e||!J.isFile(e)?!1:(P()||(await C.loadCss(r.cssList),await C.loadJs(r.jsList)),!0)}o(_,"initLuckySheet");function V(){v.value&&window.luckysheet.destroy(),P()&&(C.removeCss(r.cssList),C.removeJs(r.jsList))}return o(V,"resetLuckySheet"),s.onBeforeUnmount(()=>{V()}),(e,t)=>{const d=s.resolveComponent("LSIcon");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(M))},[s.createElementVNode("span",{class:s.normalizeClass([s.unref(x).e("btn"),s.unref(x).e("close")]),onClick:I},[s.createVNode(d,{name:"Close",size:24,color:"#FFF"})],2),t[0]||(t[0]=s.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1))],2)}}});exports.default=Y;
1
+ "use strict";var U=Object.defineProperty;var o=(S,L)=>U(S,"name",{value:L,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),$=,/* empty css */G=,/* empty css */H=,/* empty css */C=,/* empty css */J=,/* empty css */F=,/* empty css */K=require("luckyexcel"),r=;/* empty css */;/* empty css */;/* empty css */;/* empty css */const Q=,/* empty css */W=s.defineComponent({name:"LSXlsx"}),Y=s.defineComponent({...W,props:G.xlsxProps,emits:H.previewEmits,setup(S,{emit:L}){const x=$.useNamespace("xlsx"),M=x.b(),f=S,l=L;s.watch(()=>f.source,e=>{const{size:t}=e||{};t/1024/1024<=r.fileSizeLimit?j(e):f.hasPagination?A(e):(Q.ElMessage.error(`文件大小超过 ${r.fileSizeLimit} MB,加载失败!`),l("loadComplete"))},{immediate:!0,deep:!0});const v=s.ref(!1);function P(){const e=document.scripts;for(let t=0;t<e.length;t++)if(e[t].src.includes("luckysheet"))return!0;return!1}o(P,"isLuckySheet");const I=o(()=>{f.onClose&&f.onClose(),l("update:source",[])},"closeFunc");async function j(e){if(_(e))try{K.transformExcelToLucky(e,function(t){t.sheets!=null&&(window.luckysheet.destroy(),window.luckysheet.create({data:t.sheets,title:t.info.name,...r.luckysheetConfig}))}),l("loadComplete")}catch{l("loadError")}}o(j,"initXlsx");function R(e){const t=Math.min(0+r.rowsPerBatch,e.length),d=e.slice(0,t);let u=0;const n=[[]];return window.luckysheet.transToCellData(d).forEach(a=>{const{r:h}=a;u!==h&&(u=h,n[u]=[]),n[u].push(a)}),n}o(R,"getSheetData");async function A(e){if(await s.nextTick(),!!_(e))try{const t=new FileReader;t.onload=async function(d){var D,T;const u=F.read(d.target.result,{type:"binary",dense:!0});let n=0;const a=(u.SheetNames||[]).map(c=>({name:c,data:F.utils.sheet_to_json(u.Sheets[c],{header:1})})),h=s.ref((D=a[n])==null?void 0:D.name),m=s.ref((T=a[n])==null?void 0:T.data);let p=m.value.length,q=0;const X=(a||[]).map((c,y)=>({name:c.name,index:y+1,status:"1",order:y,data:R(c.data)}));function b(){if(q*r.rowsPerBatch>=p)return;const c=q*r.rowsPerBatch,y=Math.min(c+r.rowsPerBatch,p),O=m.value.slice(c,y);let w=0;const B=[[]];if(window.luckysheet.transToCellData(O).forEach(k=>{const{r:i}=k;w!==i&&(w=i,B[w]=[]),B[w].push(k)}),v.value)window.luckysheet.updataSheet({data:[{name:h,index:n+1,status:"1",order:n,data:B}]});else{window.luckysheet.destroy();const k={...r.luckysheetConfig,hook:{sheetActivate(i){var g,N,z;if(n!=i){n=i-1,h.value=(g=a[n])==null?void 0:g.name,m.value=((N=a[n])==null?void 0:N.data)||[],p=m.value.length;const E=(z=document.getElementById("luckysheet"))==null?void 0:z.querySelector('.spage-number button[data-page="1"]');E==null||E.click()}},onTogglePager(i){const{page:g}=i;q=g-1,b()}}};window.luckysheet.create({data:X,pager:{pageIndex:1,total:p,pageSize:r.rowsPerBatch,showTotal:!0,showSkip:!0,showPN:!0,prevPage:"",nextPage:"",totalTxt:""},...k}),v.value=!0}l("loadComplete")}o(b,"loadBatch"),b()},t.readAsArrayBuffer(e)}catch{l("loadError")}}o(A,"initXlsxLarge");async function _(e){return!e||!J.isFile(e)?!1:(P()||(await C.loadCss(r.cssList),await C.loadJs(r.jsList)),!0)}o(_,"initLuckySheet");function V(){v.value&&window.luckysheet.destroy(),P()&&(C.removeCss(r.cssList),C.removeJs(r.jsList))}return o(V,"resetLuckySheet"),s.onBeforeUnmount(()=>{V()}),(e,t)=>{const d=s.resolveComponent("LSIcon");return s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(s.unref(M))},[s.createElementVNode("span",{class:s.normalizeClass([s.unref(x).e("btn"),s.unref(x).e("close")]),onClick:I},[s.createVNode(d,{name:"Close",size:24,color:"#FFF"})],2),t[0]||(t[0]=s.createElementVNode("div",{id:"luckysheet",class:"luckysheet-wrap"},null,-1))],2)}}});exports.default=Y;
@@ -6,7 +6,7 @@ import { xlsxProps as ae } from "../types/index.js";
6
6
  import { previewEmits as ne } from "../../_constants/previewType/index.js";
7
7
  import { loadCss as ce, loadJs as le, removeCss as ie, removeJs as ue } from "../../_utils/utils/index.js";
8
8
  import { isFile as me } from "../../_utils/check/index.js";
9
- import { read as de, utils as fe } from "../../../../../node_modules/.pnpm/xlsx@https___cdn.sheetjs.com_xlsx-0.20.3_xlsx-0.20.3.tgz/node_modules/xlsx/xlsx/index.js";
9
+ import { read as de, utils as fe } from "../../../../../node_modules/.pnpm/xlsx@0.18.5/node_modules/xlsx/xlsx/index.js";
10
10
  import he from "luckyexcel";
11
11
  import { fileSizeLimit as R, luckysheetConfig as A, rowsPerBatch as m, cssList as X, jsList as j } from "../config/index.js";
12
12
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-9c179e27"]]);exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=;/* empty css */;/* empty css */const t=,/* empty css */u=t.default(e.default,[["__scopeId","data-v-3ef9bffd"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9c179e27"]]);
3
+ import f from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const _ = /* @__PURE__ */ f(o, [["__scopeId", "data-v-3ef9bffd"]]);
5
5
  export {
6
- a as default
6
+ _ as default
7
7
  };
@@ -0,0 +1,17 @@
1
+ export declare const EVENT_CODE: {
2
+ tab: string;
3
+ enter: string;
4
+ space: string;
5
+ left: string;
6
+ up: string;
7
+ right: string;
8
+ down: string;
9
+ esc: string;
10
+ delete: string;
11
+ backspace: string;
12
+ numpadEnter: string;
13
+ pageUp: string;
14
+ pageDown: string;
15
+ home: string;
16
+ end: string;
17
+ };
@@ -0,0 +1,2 @@
1
+ export * from './aria';
2
+ export * from './token';
@@ -0,0 +1,22 @@
1
+ import { EpPropFinalized } from '../_utils/types';
2
+ export declare const previewEmits: string[];
3
+ export type PreviewEmits = typeof previewEmits;
4
+ export declare const lsPreviewProp: {
5
+ source: {
6
+ readonly type: globalThis.PropType<{
7
+ type: unknown;
8
+ required: true;
9
+ }>;
10
+ readonly required: false;
11
+ readonly validator: ((val: unknown) => boolean) | undefined;
12
+ __epPropKey: true;
13
+ };
14
+ zoomSize: EpPropFinalized<(NumberConstructor | StringConstructor)[], unknown, unknown, number, boolean>;
15
+ needLoading: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
16
+ loadingOption: EpPropFinalized<ObjectConstructor, unknown, unknown, () => {
17
+ text: string;
18
+ background: string;
19
+ }, boolean>;
20
+ hasDownload: EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
21
+ downloadData: EpPropFinalized<ObjectConstructor, unknown, unknown, () => {}, boolean>;
22
+ };
@@ -0,0 +1 @@
1
+ export declare const lsBtnKey: unique symbol;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * permissions 为权限编码列表
3
+ * code 为权限编码
4
+ * show 为是否显示
5
+ */
6
+ declare const _default: {
7
+ permissions: (string | number)[];
8
+ mounted(el: any, binding: any): void;
9
+ updated(el: any, binding: any): void;
10
+ unmounted(el: any): void;
11
+ };
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { default as vAuth } from './auth';
2
+ export { vAuth };
@@ -0,0 +1,6 @@
1
+ import { default as useRouterHook } from './useRouterHook';
2
+ import { default as useColorthiefHook } from './useColorthiefHook';
3
+ import { default as useWSHook } from './useWSHook';
4
+ import { default as useOptionHook } from './useOptionHook';
5
+ import { default as useTableListHook } from './useTableListHook';
6
+ export { useRouterHook, useColorthiefHook, useWSHook, useOptionHook, useTableListHook };
@@ -0,0 +1,3 @@
1
+ export default function (): {
2
+ getColorthief: (imgPath: string) => Promise<unknown>;
3
+ };
@@ -0,0 +1,4 @@
1
+ export default function useDelayLoader<T = any>(minDisplayTime: number | undefined, callback: (data: T | undefined) => void): {
2
+ loading: globalThis.Ref<boolean, boolean>;
3
+ loadData: (asyncFunction: () => Promise<any>) => Promise<void>;
4
+ };
@@ -0,0 +1 @@
1
+ export declare function useGlobalConfig(defaultValue?: string): globalThis.ComputedRef<string>;
@@ -0,0 +1,20 @@
1
+ export declare const defNamespace = "ls";
2
+ export declare const useNamespace: (block: string) => {
3
+ namespace: globalThis.ComputedRef<string>;
4
+ b: (blockSuffix?: string) => string;
5
+ e: (element?: string) => string;
6
+ m: (modifier?: string) => string;
7
+ be: (blockSuffix?: string, element?: string) => string;
8
+ em: (element?: string, modifier?: string) => string;
9
+ bm: (blockSuffix?: string, modifier?: string) => string;
10
+ bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
11
+ is: {
12
+ (name: string, state: boolean | undefined): string;
13
+ (name: string): string;
14
+ };
15
+ cssVar: (object: Record<string, string>) => Record<string, string>;
16
+ cssVarName: (name: string) => string;
17
+ cssVarBlock: (object: Record<string, string>) => Record<string, string>;
18
+ cssVarBlockName: (name: string) => string;
19
+ };
20
+ export type UseNamespaceReturn = ReturnType<typeof useNamespace>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 获取select、radio标签使用的option
3
+ * apiFunc 请求接口
4
+ * params: {
5
+ * labelKey,
6
+ * valueKey,
7
+ * 分页参数, 注意分页接口返回之需用records作为数组字段
8
+ * }
9
+ * @returns
10
+ */
11
+ export default function (): {
12
+ getSelOption: (apiFunc: any, params?: any, all?: Array<OptionType>) => Promise<any>;
13
+ remoteSearchSelOption: (apiFunc: Promise<any>, params: any, selId: string, selVal: string, keyword: string | undefined) => Promise<any>;
14
+ };
@@ -0,0 +1,6 @@
1
+ export default function (props: any, previewVisible: any): {
2
+ previewVisible: any;
3
+ comClass: string;
4
+ defAttrs: any;
5
+ closeLoading: () => void;
6
+ };