@lingshugroup/web-plus 1.0.38 → 1.0.40

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 (60) 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/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
  5. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +58 -56
  6. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
  7. package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
  8. package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
  9. package/lib/packages/ls-components/components/form/Form.vue/index.js +1 -1
  10. package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
  11. package/lib/packages/ls-components/components/form/Form.vue/index2.js +102 -107
  12. package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
  13. package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
  14. package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
  15. package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
  16. package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
  17. package/lib/packages/ls-components/components/form/types/index.js +5 -9
  18. package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
  19. package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
  20. package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
  21. package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
  22. package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
  23. package/lib/packages/ls-components/components/list/List.vue/index2.js +144 -138
  24. package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
  25. package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
  26. package/lib/packages/ls-components/components/list/types/index.cjs +1 -1
  27. package/lib/packages/ls-components/components/list/types/index.js +8 -2
  28. package/lib/packages/ls-components/components/list/types/index.js.br +0 -0
  29. package/lib/packages/ls-components/components/list/types/index.js.gz +0 -0
  30. package/lib/packages/ls-components/components/preview/Index.vue/index.cjs +1 -1
  31. package/lib/packages/ls-components/components/preview/Index.vue/index.js +2 -2
  32. package/lib/packages/ls-components/components/preview/Index.vue/index2.cjs +1 -1
  33. package/lib/packages/ls-components/components/preview/Index.vue/index2.js +26 -26
  34. package/lib/packages/ls-components/components/preview/Index.vue/index2.js.br +0 -0
  35. package/lib/packages/ls-components/components/preview/Index.vue/index2.js.gz +0 -0
  36. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
  37. package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
  38. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
  39. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +22 -22
  40. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
  41. package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
  42. package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
  43. package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +3 -3
  44. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
  45. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +21 -21
  46. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
  47. package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
  48. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
  49. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +3 -3
  50. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
  51. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +21 -21
  52. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
  53. package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
  54. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
  55. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +2 -2
  56. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
  57. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +21 -21
  58. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
  59. package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";var l=Object.defineProperty;var t=(e,a)=>l(e,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({listApi:{type:Function},dealParams:{type:Function},dealData:{type:Function},listHookConfig:{type:Object},delApi:{type:Function},dealDelParams:{type:Function},switchApi:{type:Function},dealSwitchParams:{type:Function},showForm:{type:Boolean,default:!0},formClass:{type:String,default:""},formData:{type:Object,default:t(()=>({}),"default")},formItems:{type:Array,default:t(()=>[],"default")},formAttrs:{type:Object,default:t(()=>{},"default")},queryFn:{type:Function},tableColumn:{type:Array,default:t(()=>[],"default")},tableRowKey:{type:String,default:"id"},tableAttrs:{type:Object,default:t(()=>{},"default")},tableListeners:{type:Object,default:t(()=>{},"default")},showOperate:{type:Boolean,default:!0},showOperateDivider:{type:Boolean,default:!0},operateClass:{type:String,default:""},showAdd:{type:Boolean,default:!0},disabledAddBtn:{type:Boolean,default:!1},addBtnText:{type:String,default:"添加"},addFn:{type:Function},showTableSwitch:{type:Boolean,default:!1},switchProp:{type:String,default:"status"},tableSwitchColumn:{type:Object,default:t(()=>{},"default")},disabledTableSwitch:{type:[Boolean,Function],default:!1},showTableOperate:{type:Boolean,default:!0},tableOperateColumn:{type:Object,default:t(()=>{},"default")},tableDetailFn:{type:Function},tableEditFn:{type:Function},showTableDetail:{type:[Boolean,Function],default:!0},disabledTableDetail:{type:[Boolean,Function],default:!1},showTableEdit:{type:[Boolean,Function],default:!0},disabledTableEdit:{type:[Boolean,Function],default:!1},showTableDel:{type:[Boolean,Function],default:!0},disabledTableDel:{type:[Boolean,Function],default:!1},addRoutePath:{type:String,default:""},detailRoutePath:{type:String,default:""},editRoutePath:{type:String,default:""},tableDetailText:{type:String,default:"查看"},tableEditText:{type:String,default:"编辑"},tableDelText:{type:String,default:"删除"},skeletonAttrs:{type:Object,default:t(()=>{},"default")},showSkeleton:{type:Boolean,default:!0}});exports.lsListProps=n;
1
+ "use strict";var l=Object.defineProperty;var t=(e,a)=>l(e,"name",{value:a,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../_utils/runtime/index.cjs"),n=o.buildProps({listApi:{type:Function},dealParams:{type:Function},dealData:{type:Function},listHookConfig:{type:Object},delApi:{type:Function},dealDelParams:{type:Function},switchApi:{type:Function},dealSwitchParams:{type:Function},showForm:{type:Boolean,default:!0},formClass:{type:String,default:""},formData:{type:Object,default:t(()=>({}),"default")},formItems:{type:Array,default:t(()=>[],"default")},formAttrs:{type:Object,default:t(()=>{},"default")},queryFn:{type:Function},tableColumn:{type:Array,default:t(()=>[],"default")},tableRowKey:{type:String,default:"id"},tableAttrs:{type:Object,default:t(()=>{},"default")},tableListeners:{type:Object,default:t(()=>{},"default")},showOperate:{type:Boolean,default:!0},showOperateDivider:{type:Boolean,default:!0},operateClass:{type:String,default:""},showAdd:{type:Boolean,default:!0},disabledAddBtn:{type:Boolean,default:!1},addBtnText:{type:String,default:"添加"},addFn:{type:Function},addBtnAttrs:{type:Object,default:t(()=>{},"default")},showTableSwitch:{type:Boolean,default:!1},switchProp:{type:String,default:"status"},tableSwitchColumn:{type:Object,default:t(()=>{},"default")},disabledTableSwitch:{type:[Boolean,Function],default:!1},showTableOperate:{type:Boolean,default:!0},tableOperateColumn:{type:Object,default:t(()=>{},"default")},tableDetailFn:{type:Function},tableEditFn:{type:Function},showTableDetail:{type:[Boolean,Function],default:!0},disabledTableDetail:{type:[Boolean,Function],default:!1},showTableEdit:{type:[Boolean,Function],default:!0},disabledTableEdit:{type:[Boolean,Function],default:!1},showTableDel:{type:[Boolean,Function],default:!0},disabledTableDel:{type:[Boolean,Function],default:!1},addRoutePath:{type:String,default:""},detailRoutePath:{type:String,default:""},editRoutePath:{type:String,default:""},tableDetailText:{type:String,default:"查看"},tableEditText:{type:String,default:"编辑"},tableDelText:{type:String,default:"删除"},skeletonAttrs:{type:Object,default:t(()=>{},"default")},showSkeleton:{type:Boolean,default:!0}});exports.lsListProps=n;
@@ -1,7 +1,7 @@
1
1
  var l = Object.defineProperty;
2
2
  var t = (e, a) => l(e, "name", { value: a, configurable: !0 });
3
3
  import { buildProps as o } from "../../_utils/runtime/index.js";
4
- const d = o({
4
+ const u = o({
5
5
  // 列表api
6
6
  listApi: {
7
7
  type: Function
@@ -119,6 +119,12 @@ const d = o({
119
119
  addFn: {
120
120
  type: Function
121
121
  },
122
+ // 添加按钮配置项
123
+ addBtnAttrs: {
124
+ type: Object,
125
+ default: /* @__PURE__ */ t(() => {
126
+ }, "default")
127
+ },
122
128
  // 是否显示表格开关切换
123
129
  showTableSwitch: {
124
130
  type: Boolean,
@@ -232,5 +238,5 @@ const d = o({
232
238
  }
233
239
  });
234
240
  export {
235
- d as lsListProps
241
+ u as lsListProps
236
242
  };
@@ -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-c140ca81"]]);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-921f4053"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c140ca81"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-921f4053"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var k=Object.defineProperty;var l=(a,i)=>k(a,"name",{value:i,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=,/* empty css */P=,/* empty css */y=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const L=,/* empty css */B=,/* empty css */E=e.defineComponent({name:"LSPreview",inheritAttrs:!1,__name:"Index",props:e.mergeModels(P.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:i}){const d=i,o=a,{type:r,zoomSize:g}=e.toRefs(o),n=e.useModel(a,"modelValue"),p=e.reactive({zoomSize:g,source:""}),C=M.useNamespace("preview").b(),t=e.shallowRef({image:null,docx:null,xlsx:null,pdf:null}),m=e.ref(),f=e.computed(()=>(r==null?void 0:r.value)&&t.value[r==null?void 0:r.value]),q=e.ref("文件加载失败,请检查文件是否已损坏!");let u=null;e.watch(()=>n==null?void 0:n.value,s=>{s&&v()},{immediate:!0,deep:!0}),e.watch(()=>o.source,s=>{p.source=s},{immediate:!0,deep:!0});function v(){switch(o.needLoading&&(m.value=y.ElLoading.service(o.loadingOption)),o.type){case"image":t.value.image=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Image.vue/index.cjs")));break;case"docx":t.value.docx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Docx.vue/index.cjs")));break;case"xlsx":t.value.xlsx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Xlsx.vue/index.cjs")));break;case"pdf":t.value.pdf=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Pdf.vue/index.cjs")));break}u=setTimeout(()=>{o.source||(L.ElMessage.error("文件加载超时,请检查文件是否存在!"),c(),n.value=!1),clearTimeout(u)},6e3)}l(v,"openLoading");const c=l(()=>{u&&clearTimeout(u),o.needLoading&&m.value&&m.value.close()},"closeLoading"),x=l(()=>{c(),d("loadComplete")},"loadComplete"),h=l(()=>{c(),console.error(q.value),d("loadError")},"loadError");return e.onBeforeMount(()=>{n.value&&o.type&&v()}),e.onBeforeUnmount(()=>{c()}),(s,w)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(C))},[e.unref(f)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),e.mergeProps({key:0},e.unref(B.default)(e.unref(p),s.$attrs),{onLoadComplete:x,onLoadError:h}),null,16)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}});exports.default=E;
1
+ "use strict";var k=Object.defineProperty;var a=(u,i)=>k(u,"name",{value:i,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),M=,/* empty css */P=,/* empty css */y=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const L=,/* empty css */B=,/* empty css */E=e.defineComponent({name:"LSPreview",inheritAttrs:!1,__name:"Index",props:e.mergeModels(P.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(u,{emit:i}){const d=i,o=u,{type:r,zoomSize:g}=e.toRefs(o),n=e.useModel(u,"modelValue"),p=e.reactive({zoomSize:g,source:""}),C=M.useNamespace("preview").b(),s=e.shallowRef({image:null,docx:null,xlsx:null,pdf:null}),m=e.ref(),f=e.computed(()=>(r==null?void 0:r.value)&&s.value[r==null?void 0:r.value]),q=e.ref("文件加载失败,请检查文件是否已损坏!");let l=null;e.watch(()=>n==null?void 0:n.value,t=>{t&&v()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{p.source=t,t&&clearTimeout(l)},{immediate:!0,deep:!0});function v(){switch(o.needLoading&&(m.value=y.ElLoading.service(o.loadingOption)),o.type){case"image":s.value.image=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Image.vue/index.cjs")));break;case"docx":s.value.docx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Docx.vue/index.cjs")));break;case"xlsx":s.value.xlsx=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Xlsx.vue/index.cjs")));break;case"pdf":s.value.pdf=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("../components/Pdf.vue/index.cjs")));break}l=setTimeout(()=>{o.source||(L.ElMessage.error("加载超时,请检查网络后重试!"),c(),n.value=!1),clearTimeout(l)},2e4)}a(v,"openLoading");const c=a(()=>{l&&clearTimeout(l),o.needLoading&&m.value&&m.value.close()},"closeLoading"),x=a(()=>{c(),d("loadComplete")},"loadComplete"),h=a(()=>{c(),console.error(q.value),d("loadError")},"loadError");return e.onBeforeMount(()=>{n.value&&o.type&&v()}),e.onBeforeUnmount(()=>{c()}),(t,w)=>n.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(C))},[e.unref(f)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(f)),e.mergeProps({key:0},e.unref(B.default)(e.unref(p),t.$attrs),{onLoadComplete:x,onLoadError:h}),null,16)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0)}});exports.default=E;
@@ -1,6 +1,6 @@
1
1
  var y = Object.defineProperty;
2
- var l = (s, u) => y(s, "name", { value: u, configurable: !0 });
3
- import { defineComponent as P, mergeModels as x, toRefs as z, useModel as A, reactive as T, shallowRef as V, ref as C, computed as _, watch as k, defineAsyncComponent as i, onBeforeMount as I, onBeforeUnmount as N, openBlock as L, createElementBlock as R, normalizeClass as S, unref as n, createBlock as D, resolveDynamicComponent as O, mergeProps as U, createCommentVNode as E } from "vue";
2
+ var n = (m, u) => y(m, "name", { value: u, configurable: !0 });
3
+ import { defineComponent as P, mergeModels as x, toRefs as T, useModel as z, reactive as A, shallowRef as V, ref as C, computed as _, watch as k, defineAsyncComponent as i, onBeforeMount as I, onBeforeUnmount as N, openBlock as L, createElementBlock as R, normalizeClass as S, unref as s, createBlock as D, resolveDynamicComponent as O, mergeProps as U, createCommentVNode as E } from "vue";
4
4
  import { useNamespace as $ } from "../../_hooks/useNamespace/index.js";
5
5
  import { lsPreviewProp as j } from "../types/index.js";
6
6
  import { ElLoading as q } from "element-plus";
@@ -26,21 +26,21 @@ const ae = /* @__PURE__ */ P({
26
26
  modelModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ x(["loadComplete", "loadError"], ["update:modelValue"]),
29
- setup(s, { emit: u }) {
30
- const p = u, e = s, { type: o, zoomSize: M } = z(e), r = A(s, "modelValue"), f = T({
29
+ setup(m, { emit: u }) {
30
+ const p = u, e = m, { type: o, zoomSize: M } = T(e), r = z(m, "modelValue"), f = A({
31
31
  zoomSize: M,
32
32
  source: ""
33
- }), B = $("preview").b(), t = V({
33
+ }), B = $("preview").b(), a = V({
34
34
  image: null,
35
35
  docx: null,
36
36
  xlsx: null,
37
37
  pdf: null
38
- }), d = C(), v = _(() => (o == null ? void 0 : o.value) && t.value[o == null ? void 0 : o.value]), h = C("文件加载失败,请检查文件是否已损坏!");
39
- let m = null;
38
+ }), d = C(), v = _(() => (o == null ? void 0 : o.value) && a.value[o == null ? void 0 : o.value]), h = C("文件加载失败,请检查文件是否已损坏!");
39
+ let l = null;
40
40
  k(
41
41
  () => r == null ? void 0 : r.value,
42
- (a) => {
43
- a && g();
42
+ (t) => {
43
+ t && g();
44
44
  },
45
45
  {
46
46
  immediate: !0,
@@ -48,8 +48,8 @@ const ae = /* @__PURE__ */ P({
48
48
  }
49
49
  ), k(
50
50
  () => e.source,
51
- (a) => {
52
- f.source = a;
51
+ (t) => {
52
+ f.source = t, t && clearTimeout(l);
53
53
  },
54
54
  {
55
55
  immediate: !0,
@@ -59,39 +59,39 @@ const ae = /* @__PURE__ */ P({
59
59
  function g() {
60
60
  switch (e.needLoading && (d.value = q.service(e.loadingOption)), e.type) {
61
61
  case "image":
62
- t.value.image = i(() => import("../components/Image.vue/index.js"));
62
+ a.value.image = i(() => import("../components/Image.vue/index.js"));
63
63
  break;
64
64
  case "docx":
65
- t.value.docx = i(() => import("../components/Docx.vue/index.js"));
65
+ a.value.docx = i(() => import("../components/Docx.vue/index.js"));
66
66
  break;
67
67
  case "xlsx":
68
- t.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
68
+ a.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
69
69
  break;
70
70
  case "pdf":
71
- t.value.pdf = i(() => import("../components/Pdf.vue/index.js"));
71
+ a.value.pdf = i(() => import("../components/Pdf.vue/index.js"));
72
72
  break;
73
73
  }
74
- m = setTimeout(() => {
75
- e.source || (F.error("文件加载超时,请检查文件是否存在!"), c(), r.value = !1), clearTimeout(m);
76
- }, 6e3);
74
+ l = setTimeout(() => {
75
+ e.source || (F.error("加载超时,请检查网络后重试!"), c(), r.value = !1), clearTimeout(l);
76
+ }, 2e4);
77
77
  }
78
- l(g, "openLoading");
79
- const c = /* @__PURE__ */ l(() => {
80
- m && clearTimeout(m), e.needLoading && d.value && d.value.close();
81
- }, "closeLoading"), w = /* @__PURE__ */ l(() => {
78
+ n(g, "openLoading");
79
+ const c = /* @__PURE__ */ n(() => {
80
+ l && clearTimeout(l), e.needLoading && d.value && d.value.close();
81
+ }, "closeLoading"), w = /* @__PURE__ */ n(() => {
82
82
  c(), p("loadComplete");
83
- }, "loadComplete"), b = /* @__PURE__ */ l(() => {
83
+ }, "loadComplete"), b = /* @__PURE__ */ n(() => {
84
84
  c(), console.error(h.value), p("loadError");
85
85
  }, "loadError");
86
86
  return I(() => {
87
87
  r.value && e.type && g();
88
88
  }), N(() => {
89
89
  c();
90
- }), (a, J) => r.value ? (L(), R("div", {
90
+ }), (t, J) => r.value ? (L(), R("div", {
91
91
  key: 0,
92
- class: S(n(B))
92
+ class: S(s(B))
93
93
  }, [
94
- n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(G)(n(f), a.$attrs), {
94
+ s(v) ? (L(), D(O(s(v)), U({ key: 0 }, s(G)(s(f), t.$attrs), {
95
95
  onLoadComplete: w,
96
96
  onLoadError: b
97
97
  }), null, 16)) : E("", !0)
@@ -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-5fd3b66d"]]);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-fd59c692"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5fd3b66d"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fd59c692"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var L=Object.defineProperty;var n=(s,u)=>L(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewDocx"}),w=e.defineComponent({...S,name:"LSPreviewDocx",components:{LSDocx:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const i=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=C.useNamespace("preview").b(),c=e.ref();let a=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),a=setTimeout(()=>{o.source||(P.ElMessage.error("文件加载超时,请检查文件是否存在!"),l(),r.value=!1),clearTimeout(a)},6e3)}n(m,"openLoading");const l=n(()=>{a&&clearTimeout(a),o.needLoading&&c.value&&c.value.close()},"closeLoading"),g=n(()=>{l(),i("loadComplete")},"loadComplete"),q=n(()=>{l(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,B)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
1
+ "use strict";var L=Object.defineProperty;var s=(a,u)=>L(a,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewDocx"}),w=e.defineComponent({...S,name:"LSPreviewDocx",components:{LSDocx:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:u}){const i=u,o=a,{zoomSize:p}=e.toRefs(o),r=e.useModel(a,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=C.useNamespace("preview").b(),c=e.ref();let n=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t,t&&clearTimeout(n)},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),n=setTimeout(()=>{o.source||(P.ElMessage.error("加载超时,请检查网络后重试!"),l(),r.value=!1),clearTimeout(n)},2e4)}s(m,"openLoading");const l=s(()=>{n&&clearTimeout(n),o.needLoading&&c.value&&c.value.close()},"closeLoading"),g=s(()=>{l(),i("loadComplete")},"loadComplete"),q=s(()=>{l(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,B)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
@@ -1,6 +1,6 @@
1
1
  var M = Object.defineProperty;
2
- var t = (n, l) => M(n, "name", { value: l, configurable: !0 });
3
- import { defineComponent as g, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as x, watch as f, onBeforeMount as S, onBeforeUnmount as V, openBlock as h, createElementBlock as k, normalizeClass as z, unref as i, createVNode as D, mergeProps as N, createCommentVNode as T } from "vue";
2
+ var n = (a, l) => M(a, "name", { value: l, configurable: !0 });
3
+ import { defineComponent as g, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as x, watch as f, onBeforeMount as S, onBeforeUnmount as T, openBlock as V, createElementBlock as h, normalizeClass as k, unref as i, createVNode as z, mergeProps as D, createCommentVNode as N } from "vue";
4
4
  import { useNamespace as y } from "../../_hooks/useNamespace/index.js";
5
5
  import v from "../Docx.vue/index.js";
6
6
  import { lsPreviewProp as A } from "../types/index.js";
@@ -26,16 +26,16 @@ const U = g({
26
26
  modelModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ p(["loadComplete", "loadError"], ["update:modelValue"]),
29
- setup(n, { emit: l }) {
30
- const c = l, e = n, { zoomSize: L } = P(e), o = _(n, "modelValue"), d = w({
29
+ setup(a, { emit: l }) {
30
+ const c = l, e = a, { zoomSize: L } = P(e), o = _(a, "modelValue"), u = w({
31
31
  zoomSize: L,
32
32
  source: ""
33
33
  }), C = y("preview").b(), s = x();
34
- let a = null;
34
+ let t = null;
35
35
  f(
36
36
  () => o == null ? void 0 : o.value,
37
37
  (r) => {
38
- r && u();
38
+ r && d();
39
39
  },
40
40
  {
41
41
  immediate: !0,
@@ -44,39 +44,39 @@ const U = g({
44
44
  ), f(
45
45
  () => e.source,
46
46
  (r) => {
47
- d.source = r;
47
+ u.source = r, r && clearTimeout(t);
48
48
  },
49
49
  {
50
50
  immediate: !0,
51
51
  deep: !0
52
52
  }
53
53
  );
54
- function u() {
55
- e.needLoading && (s.value = I.service(e.loadingOption)), a = setTimeout(() => {
56
- e.source || (O.error("文件加载超时,请检查文件是否存在!"), m(), o.value = !1), clearTimeout(a);
57
- }, 6e3);
54
+ function d() {
55
+ e.needLoading && (s.value = I.service(e.loadingOption)), t = setTimeout(() => {
56
+ e.source || (O.error("加载超时,请检查网络后重试!"), m(), o.value = !1), clearTimeout(t);
57
+ }, 2e4);
58
58
  }
59
- t(u, "openLoading");
60
- const m = /* @__PURE__ */ t(() => {
61
- a && clearTimeout(a), e.needLoading && s.value && s.value.close();
62
- }, "closeLoading"), E = /* @__PURE__ */ t(() => {
59
+ n(d, "openLoading");
60
+ const m = /* @__PURE__ */ n(() => {
61
+ t && clearTimeout(t), e.needLoading && s.value && s.value.close();
62
+ }, "closeLoading"), E = /* @__PURE__ */ n(() => {
63
63
  m(), c("loadComplete");
64
- }, "loadComplete"), B = /* @__PURE__ */ t(() => {
64
+ }, "loadComplete"), B = /* @__PURE__ */ n(() => {
65
65
  m(), c("loadError");
66
66
  }, "loadError");
67
67
  return S(() => {
68
- o.value && u();
69
- }), V(() => {
68
+ o.value && d();
69
+ }), T(() => {
70
70
  m();
71
- }), (r, b) => o.value ? (h(), k("div", {
71
+ }), (r, b) => o.value ? (V(), h("div", {
72
72
  key: 0,
73
- class: z(i(C))
73
+ class: k(i(C))
74
74
  }, [
75
- D(v, N(i(R)(i(d), r.$attrs), {
75
+ z(v, D(i(R)(i(u), r.$attrs), {
76
76
  onLoadComplete: E,
77
77
  onLoadError: B
78
78
  }), null, 16)
79
- ], 2)) : T("", !0);
79
+ ], 2)) : N("", !0);
80
80
  }
81
81
  });
82
82
  export {
@@ -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-2258e153"]]);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-53c2adae"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import e from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const _ = /* @__PURE__ */ e(o, [["__scopeId", "data-v-2258e153"]]);
3
+ import a from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-53c2adae"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var L=Object.defineProperty;var n=(a,u)=>L(a,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewImage"}),w=e.defineComponent({...S,name:"LSPreviewImage",components:{LSImage:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:u}){const i=u,o=a,{zoomSize:p}=e.toRefs(o),r=e.useModel(a,"modelValue"),d=e.reactive({zoomSize:p,source:""}),g=C.useNamespace("preview").b(),c=e.ref();let s=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),s=setTimeout(()=>{o.source||(P.ElMessage.error("文件加载超时,请检查文件是否存在!"),l(),r.value=!1),clearTimeout(s)},6e3)}n(m,"openLoading");const l=n(()=>{s&&clearTimeout(s),o.needLoading&&c.value&&c.value.close()},"closeLoading"),v=n(()=>{l(),i("loadComplete")},"loadComplete"),q=n(()=>{l(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,I)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(g))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:v,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
1
+ "use strict";var L=Object.defineProperty;var a=(s,u)=>L(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewImage"}),w=e.defineComponent({...S,name:"LSPreviewImage",components:{LSImage:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const c=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),d=e.reactive({zoomSize:p,source:""}),g=C.useNamespace("preview").b(),i=e.ref();let n=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t,t&&clearTimeout(n)},{immediate:!0,deep:!0});function m(){o.needLoading&&(i.value=E.ElLoading.service(o.loadingOption)),n=setTimeout(()=>{o.source||(P.ElMessage.error("加载超时,请检查网络后重试!"),l(),r.value=!1),clearTimeout(n)},2e4)}a(m,"openLoading");const l=a(()=>{n&&clearTimeout(n),o.needLoading&&i.value&&i.value.close()},"closeLoading"),v=a(()=>{l(),c("loadComplete")},"loadComplete"),q=a(()=>{l(),c("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,I)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(g))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:v,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
@@ -1,6 +1,6 @@
1
1
  var M = Object.defineProperty;
2
- var t = (a, l) => M(a, "name", { value: l, configurable: !0 });
3
- import { defineComponent as v, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as I, watch as f, onBeforeMount as S, onBeforeUnmount as V, openBlock as h, createElementBlock as k, normalizeClass as z, unref as i, createVNode as N, mergeProps as T, createCommentVNode as y } from "vue";
2
+ var a = (m, l) => M(m, "name", { value: l, configurable: !0 });
3
+ import { defineComponent as v, mergeModels as p, toRefs as P, useModel as _, reactive as w, ref as I, watch as f, onBeforeMount as S, onBeforeUnmount as T, openBlock as V, createElementBlock as h, normalizeClass as k, unref as i, createVNode as z, mergeProps as N, createCommentVNode as y } from "vue";
4
4
  import { useNamespace as A } from "../../_hooks/useNamespace/index.js";
5
5
  import g from "../Image.vue/index.js";
6
6
  import { lsPreviewProp as x } from "../types/index.js";
@@ -26,16 +26,16 @@ const $ = v({
26
26
  modelModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ p(["loadComplete", "loadError"], ["update:modelValue"]),
29
- setup(a, { emit: l }) {
30
- const c = l, e = a, { zoomSize: L } = P(e), o = _(a, "modelValue"), d = w({
29
+ setup(m, { emit: l }) {
30
+ const c = l, e = m, { zoomSize: L } = P(e), o = _(m, "modelValue"), u = w({
31
31
  zoomSize: L,
32
32
  source: ""
33
33
  }), C = A("preview").b(), s = I();
34
- let m = null;
34
+ let t = null;
35
35
  f(
36
36
  () => o == null ? void 0 : o.value,
37
37
  (r) => {
38
- r && u();
38
+ r && d();
39
39
  },
40
40
  {
41
41
  immediate: !0,
@@ -44,35 +44,35 @@ const $ = v({
44
44
  ), f(
45
45
  () => e.source,
46
46
  (r) => {
47
- d.source = r;
47
+ u.source = r, r && clearTimeout(t);
48
48
  },
49
49
  {
50
50
  immediate: !0,
51
51
  deep: !0
52
52
  }
53
53
  );
54
- function u() {
55
- e.needLoading && (s.value = O.service(e.loadingOption)), m = setTimeout(() => {
56
- e.source || (R.error("文件加载超时,请检查文件是否存在!"), n(), o.value = !1), clearTimeout(m);
57
- }, 6e3);
54
+ function d() {
55
+ e.needLoading && (s.value = O.service(e.loadingOption)), t = setTimeout(() => {
56
+ e.source || (R.error("加载超时,请检查网络后重试!"), n(), o.value = !1), clearTimeout(t);
57
+ }, 2e4);
58
58
  }
59
- t(u, "openLoading");
60
- const n = /* @__PURE__ */ t(() => {
61
- m && clearTimeout(m), e.needLoading && s.value && s.value.close();
62
- }, "closeLoading"), E = /* @__PURE__ */ t(() => {
59
+ a(d, "openLoading");
60
+ const n = /* @__PURE__ */ a(() => {
61
+ t && clearTimeout(t), e.needLoading && s.value && s.value.close();
62
+ }, "closeLoading"), E = /* @__PURE__ */ a(() => {
63
63
  n(), c("loadComplete");
64
- }, "loadComplete"), B = /* @__PURE__ */ t(() => {
64
+ }, "loadComplete"), B = /* @__PURE__ */ a(() => {
65
65
  n(), c("loadError");
66
66
  }, "loadError");
67
67
  return S(() => {
68
- o.value && u();
69
- }), V(() => {
68
+ o.value && d();
69
+ }), T(() => {
70
70
  n();
71
- }), (r, j) => o.value ? (h(), k("div", {
71
+ }), (r, j) => o.value ? (V(), h("div", {
72
72
  key: 0,
73
- class: z(i(C))
73
+ class: k(i(C))
74
74
  }, [
75
- N(g, T(i(U)(i(d), r.$attrs), {
75
+ z(g, N(i(U)(i(u), r.$attrs), {
76
76
  onLoadComplete: E,
77
77
  onLoadError: B
78
78
  }), null, 16)
@@ -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-d1962326"]]);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-f10f09e9"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
- import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d1962326"]]);
3
+ import f from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
+ const _ = /* @__PURE__ */ f(o, [["__scopeId", "data-v-f10f09e9"]]);
5
5
  export {
6
- f as default
6
+ _ as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var q=Object.defineProperty;var n=(s,u)=>q(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=,/* empty css */f=,/* empty css */C=,/* empty css */M=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const E=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewPdf"}),w=e.defineComponent({...S,name:"LSPreviewPdf",components:{LSPdf:f.default},inheritAttrs:!1,props:e.mergeModels(C.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const d=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),i=e.reactive({zoomSize:p,source:""}),v=L.useNamespace("preview").b(),c=e.ref();let a=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{i.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=M.ElLoading.service(o.loadingOption)),a=setTimeout(()=>{o.source||(E.ElMessage.error("文件加载超时,请检查文件是否存在!"),l(),r.value=!1),clearTimeout(a)},6e3)}n(m,"openLoading");const l=n(()=>{a&&clearTimeout(a),o.needLoading&&c.value&&c.value.close()},"closeLoading"),g=n(()=>{l(),d("loadComplete")},"loadComplete"),P=n(()=>{l(),d("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,h)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(i),t.$attrs),{onLoadComplete:g,onLoadError:P}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
1
+ "use strict";var q=Object.defineProperty;var s=(a,u)=>q(a,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),L=,/* empty css */f=,/* empty css */C=,/* empty css */M=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const E=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewPdf"}),w=e.defineComponent({...S,name:"LSPreviewPdf",components:{LSPdf:f.default},inheritAttrs:!1,props:e.mergeModels(C.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(a,{emit:u}){const c=u,o=a,{zoomSize:p}=e.toRefs(o),r=e.useModel(a,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=L.useNamespace("preview").b(),i=e.ref();let n=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t,t&&clearTimeout(n)},{immediate:!0,deep:!0});function m(){o.needLoading&&(i.value=M.ElLoading.service(o.loadingOption)),n=setTimeout(()=>{o.source||(E.ElMessage.error("加载超时,请检查网络后重试!"),l(),r.value=!1),clearTimeout(n)},2e4)}s(m,"openLoading");const l=s(()=>{n&&clearTimeout(n),o.needLoading&&i.value&&i.value.close()},"closeLoading"),g=s(()=>{l(),c("loadComplete")},"loadComplete"),P=s(()=>{l(),c("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{l()}),(t,T)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:P}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
@@ -1,6 +1,6 @@
1
1
  var B = Object.defineProperty;
2
- var t = (n, l) => B(n, "name", { value: l, configurable: !0 });
3
- import { defineComponent as g, mergeModels as p, toRefs as M, useModel as _, reactive as w, ref as S, watch as f, onBeforeMount as V, onBeforeUnmount as h, openBlock as k, createElementBlock as z, normalizeClass as N, unref as i, createVNode as T, mergeProps as y, createCommentVNode as A } from "vue";
2
+ var n = (a, l) => B(a, "name", { value: l, configurable: !0 });
3
+ import { defineComponent as g, mergeModels as p, toRefs as M, useModel as _, reactive as w, ref as S, watch as f, onBeforeMount as T, onBeforeUnmount as V, openBlock as h, createElementBlock as k, normalizeClass as z, unref as i, createVNode as N, mergeProps as y, createCommentVNode as A } from "vue";
4
4
  import { useNamespace as x } from "../../_hooks/useNamespace/index.js";
5
5
  import v from "../Pdf.vue/index.js";
6
6
  import { lsPreviewProp as I } from "../types/index.js";
@@ -26,12 +26,12 @@ const $ = g({
26
26
  modelModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ p(["loadComplete", "loadError"], ["update:modelValue"]),
29
- setup(n, { emit: l }) {
30
- const d = l, e = n, { zoomSize: L } = M(e), o = _(n, "modelValue"), c = w({
29
+ setup(a, { emit: l }) {
30
+ const c = l, e = a, { zoomSize: L } = M(e), o = _(a, "modelValue"), d = w({
31
31
  zoomSize: L,
32
32
  source: ""
33
33
  }), C = x("preview").b(), s = S();
34
- let a = null;
34
+ let t = null;
35
35
  f(
36
36
  () => o == null ? void 0 : o.value,
37
37
  (r) => {
@@ -44,7 +44,7 @@ const $ = g({
44
44
  ), f(
45
45
  () => e.source,
46
46
  (r) => {
47
- c.source = r;
47
+ d.source = r, r && clearTimeout(t);
48
48
  },
49
49
  {
50
50
  immediate: !0,
@@ -52,27 +52,27 @@ const $ = g({
52
52
  }
53
53
  );
54
54
  function u() {
55
- e.needLoading && (s.value = O.service(e.loadingOption)), a = setTimeout(() => {
56
- e.source || (R.error("文件加载超时,请检查文件是否存在!"), m(), o.value = !1), clearTimeout(a);
57
- }, 6e3);
55
+ e.needLoading && (s.value = O.service(e.loadingOption)), t = setTimeout(() => {
56
+ e.source || (R.error("加载超时,请检查网络后重试!"), m(), o.value = !1), clearTimeout(t);
57
+ }, 2e4);
58
58
  }
59
- t(u, "openLoading");
60
- const m = /* @__PURE__ */ t(() => {
61
- a && clearTimeout(a), e.needLoading && s.value && s.value.close();
62
- }, "closeLoading"), P = /* @__PURE__ */ t(() => {
63
- m(), d("loadComplete");
64
- }, "loadComplete"), E = /* @__PURE__ */ t(() => {
65
- m(), d("loadError");
59
+ n(u, "openLoading");
60
+ const m = /* @__PURE__ */ n(() => {
61
+ t && clearTimeout(t), e.needLoading && s.value && s.value.close();
62
+ }, "closeLoading"), P = /* @__PURE__ */ n(() => {
63
+ m(), c("loadComplete");
64
+ }, "loadComplete"), E = /* @__PURE__ */ n(() => {
65
+ m(), c("loadError");
66
66
  }, "loadError");
67
- return V(() => {
67
+ return T(() => {
68
68
  o.value && u();
69
- }), h(() => {
69
+ }), V(() => {
70
70
  m();
71
- }), (r, j) => o.value ? (k(), z("div", {
71
+ }), (r, j) => o.value ? (h(), k("div", {
72
72
  key: 0,
73
- class: N(i(C))
73
+ class: z(i(C))
74
74
  }, [
75
- T(v, y(i(U)(i(c), r.$attrs), {
75
+ N(v, y(i(U)(i(d), r.$attrs), {
76
76
  onLoadComplete: P,
77
77
  onLoadError: E
78
78
  }), null, 16)
@@ -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-78a6f94e"]]);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-0d81aa26"]]);exports.default=u;
@@ -1,7 +1,7 @@
1
1
  import o from "./index2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-78a6f94e"]]);
4
+ const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0d81aa26"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";var L=Object.defineProperty;var n=(s,u)=>L(s,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewXlsx"}),w=e.defineComponent({...S,name:"LSPreviewXlsx",components:{LSXlsx:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(s,{emit:u}){const i=u,o=s,{zoomSize:p}=e.toRefs(o),r=e.useModel(s,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=C.useNamespace("preview").b(),c=e.ref();let l=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t},{immediate:!0,deep:!0});function m(){o.needLoading&&(c.value=E.ElLoading.service(o.loadingOption)),l=setTimeout(()=>{o.source||(P.ElMessage.error("文件加载超时,请检查文件是否存在!"),a(),r.value=!1),clearTimeout(l)},6e3)}n(m,"openLoading");const a=n(()=>{l&&clearTimeout(l),o.needLoading&&c.value&&c.value.close()},"closeLoading"),g=n(()=>{a(),i("loadComplete")},"loadComplete"),q=n(()=>{a(),i("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{a()}),(t,B)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;
1
+ "use strict";var L=Object.defineProperty;var s=(l,u)=>L(l,"name",{value:u,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=,/* empty css */f=,/* empty css */M=,/* empty css */E=require("element-plus");;/* empty css */;/* empty css */;/* empty css */const P=,/* empty css */_=,/* empty css */S=e.defineComponent({name:"LSPreviewXlsx"}),w=e.defineComponent({...S,name:"LSPreviewXlsx",components:{LSXlsx:f.default},inheritAttrs:!1,props:e.mergeModels(M.lsPreviewProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["loadComplete","loadError"],["update:modelValue"]),setup(l,{emit:u}){const c=u,o=l,{zoomSize:p}=e.toRefs(o),r=e.useModel(l,"modelValue"),d=e.reactive({zoomSize:p,source:""}),v=C.useNamespace("preview").b(),i=e.ref();let n=null;e.watch(()=>r==null?void 0:r.value,t=>{t&&m()},{immediate:!0,deep:!0}),e.watch(()=>o.source,t=>{d.source=t,t&&clearTimeout(n)},{immediate:!0,deep:!0});function m(){o.needLoading&&(i.value=E.ElLoading.service(o.loadingOption)),n=setTimeout(()=>{o.source||(P.ElMessage.error("加载超时,请检查网络后重试!"),a(),r.value=!1),clearTimeout(n)},2e4)}s(m,"openLoading");const a=s(()=>{n&&clearTimeout(n),o.needLoading&&i.value&&i.value.close()},"closeLoading"),g=s(()=>{a(),c("loadComplete")},"loadComplete"),q=s(()=>{a(),c("loadError")},"loadError");return e.onBeforeMount(()=>{r.value&&m()}),e.onBeforeUnmount(()=>{a()}),(t,B)=>r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(v))},[e.createVNode(f.default,e.mergeProps(e.unref(_.default)(e.unref(d),t.$attrs),{onLoadComplete:g,onLoadError:q}),null,16)],2)):e.createCommentVNode("",!0)}});exports.default=w;