@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.
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.cjs +1 -1
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js +58 -56
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.br +0 -0
- package/lib/packages/ls-components/components/_hooks/useTableListHook/index.js.gz +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index.js +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/Form.vue/index2.js +102 -107
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/Form.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index.js +2 -2
- package/lib/packages/ls-components/components/form/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/form/types/index.js +5 -9
- package/lib/packages/ls-components/components/form/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/form/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index.js +2 -2
- package/lib/packages/ls-components/components/list/List.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/list/List.vue/index2.js +144 -138
- package/lib/packages/ls-components/components/list/List.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/list/List.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/list/types/index.cjs +1 -1
- package/lib/packages/ls-components/components/list/types/index.js +8 -2
- package/lib/packages/ls-components/components/list/types/index.js.br +0 -0
- package/lib/packages/ls-components/components/list/types/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js +26 -26
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js +22 -22
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_docx/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js +21 -21
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_image/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index.js +3 -3
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js +21 -21
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js +21 -21
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Index.vue/index2.js.gz +0 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -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
|
|
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
|
-
|
|
241
|
+
u as lsListProps
|
|
236
242
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
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
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-921f4053"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var k=Object.defineProperty;var
|
|
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
|
|
3
|
-
import { defineComponent as P, mergeModels as x, toRefs as
|
|
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(
|
|
30
|
-
const p = u, e =
|
|
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(),
|
|
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) &&
|
|
39
|
-
let
|
|
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
|
-
(
|
|
43
|
-
|
|
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
|
-
(
|
|
52
|
-
f.source =
|
|
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
|
-
|
|
62
|
+
a.value.image = i(() => import("../components/Image.vue/index.js"));
|
|
63
63
|
break;
|
|
64
64
|
case "docx":
|
|
65
|
-
|
|
65
|
+
a.value.docx = i(() => import("../components/Docx.vue/index.js"));
|
|
66
66
|
break;
|
|
67
67
|
case "xlsx":
|
|
68
|
-
|
|
68
|
+
a.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
|
|
69
69
|
break;
|
|
70
70
|
case "pdf":
|
|
71
|
-
|
|
71
|
+
a.value.pdf = i(() => import("../components/Pdf.vue/index.js"));
|
|
72
72
|
break;
|
|
73
73
|
}
|
|
74
|
-
|
|
75
|
-
e.source || (F.error("
|
|
76
|
-
},
|
|
74
|
+
l = setTimeout(() => {
|
|
75
|
+
e.source || (F.error("加载超时,请检查网络后重试!"), c(), r.value = !1), clearTimeout(l);
|
|
76
|
+
}, 2e4);
|
|
77
77
|
}
|
|
78
|
-
|
|
79
|
-
const c = /* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
}, "closeLoading"), w = /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
}), (
|
|
90
|
+
}), (t, J) => r.value ? (L(), R("div", {
|
|
91
91
|
key: 0,
|
|
92
|
-
class: S(
|
|
92
|
+
class: S(s(B))
|
|
93
93
|
}, [
|
|
94
|
-
|
|
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)
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
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
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fd59c692"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var
|
|
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
|
|
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
|
|
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(
|
|
30
|
-
const c = l, e =
|
|
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
|
|
34
|
+
let t = null;
|
|
35
35
|
f(
|
|
36
36
|
() => o == null ? void 0 : o.value,
|
|
37
37
|
(r) => {
|
|
38
|
-
r &&
|
|
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
|
-
|
|
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
|
|
55
|
-
e.needLoading && (s.value = I.service(e.loadingOption)),
|
|
56
|
-
e.source || (O.error("
|
|
57
|
-
},
|
|
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
|
-
|
|
60
|
-
const m = /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
}, "closeLoading"), E = /* @__PURE__ */
|
|
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__ */
|
|
64
|
+
}, "loadComplete"), B = /* @__PURE__ */ n(() => {
|
|
65
65
|
m(), c("loadError");
|
|
66
66
|
}, "loadError");
|
|
67
67
|
return S(() => {
|
|
68
|
-
o.value &&
|
|
69
|
-
}),
|
|
68
|
+
o.value && d();
|
|
69
|
+
}), T(() => {
|
|
70
70
|
m();
|
|
71
|
-
}), (r, b) => o.value ? (
|
|
71
|
+
}), (r, b) => o.value ? (V(), h("div", {
|
|
72
72
|
key: 0,
|
|
73
|
-
class:
|
|
73
|
+
class: k(i(C))
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
z(v, D(i(R)(i(u), r.$attrs), {
|
|
76
76
|
onLoadComplete: E,
|
|
77
77
|
onLoadError: B
|
|
78
78
|
}), null, 16)
|
|
79
|
-
], 2)) :
|
|
79
|
+
], 2)) : N("", !0);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export {
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
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
|
|
4
|
-
const
|
|
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
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var
|
|
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
|
|
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
|
|
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(
|
|
30
|
-
const c = l, e =
|
|
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
|
|
34
|
+
let t = null;
|
|
35
35
|
f(
|
|
36
36
|
() => o == null ? void 0 : o.value,
|
|
37
37
|
(r) => {
|
|
38
|
-
r &&
|
|
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
|
-
|
|
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
|
|
55
|
-
e.needLoading && (s.value = O.service(e.loadingOption)),
|
|
56
|
-
e.source || (R.error("
|
|
57
|
-
},
|
|
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
|
-
|
|
60
|
-
const n = /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
}, "closeLoading"), E = /* @__PURE__ */
|
|
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__ */
|
|
64
|
+
}, "loadComplete"), B = /* @__PURE__ */ a(() => {
|
|
65
65
|
n(), c("loadError");
|
|
66
66
|
}, "loadError");
|
|
67
67
|
return S(() => {
|
|
68
|
-
o.value &&
|
|
69
|
-
}),
|
|
68
|
+
o.value && d();
|
|
69
|
+
}), T(() => {
|
|
70
70
|
n();
|
|
71
|
-
}), (r, j) => o.value ? (
|
|
71
|
+
}), (r, j) => o.value ? (V(), h("div", {
|
|
72
72
|
key: 0,
|
|
73
|
-
class:
|
|
73
|
+
class: k(i(C))
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
z(g, N(i(U)(i(u), r.$attrs), {
|
|
76
76
|
onLoadComplete: E,
|
|
77
77
|
onLoadError: B
|
|
78
78
|
}), null, 16)
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
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
|
|
4
|
-
const
|
|
3
|
+
import f from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const _ = /* @__PURE__ */ f(o, [["__scopeId", "data-v-f10f09e9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var q=Object.defineProperty;var
|
|
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
|
|
3
|
-
import { defineComponent as g, mergeModels as p, toRefs as M, useModel as _, reactive as w, ref as S, watch as f, onBeforeMount as
|
|
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(
|
|
30
|
-
const
|
|
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
|
|
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
|
-
|
|
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)),
|
|
56
|
-
e.source || (R.error("
|
|
57
|
-
},
|
|
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
|
-
|
|
60
|
-
const m = /* @__PURE__ */
|
|
61
|
-
|
|
62
|
-
}, "closeLoading"), P = /* @__PURE__ */
|
|
63
|
-
m(),
|
|
64
|
-
}, "loadComplete"), E = /* @__PURE__ */
|
|
65
|
-
m(),
|
|
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
|
|
67
|
+
return T(() => {
|
|
68
68
|
o.value && u();
|
|
69
|
-
}),
|
|
69
|
+
}), V(() => {
|
|
70
70
|
m();
|
|
71
|
-
}), (r, j) => o.value ? (
|
|
71
|
+
}), (r, j) => o.value ? (h(), k("div", {
|
|
72
72
|
key: 0,
|
|
73
|
-
class:
|
|
73
|
+
class: z(i(C))
|
|
74
74
|
}, [
|
|
75
|
-
|
|
75
|
+
N(v, y(i(U)(i(d), r.$attrs), {
|
|
76
76
|
onLoadComplete: P,
|
|
77
77
|
onLoadError: E
|
|
78
78
|
}), null, 16)
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
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
|
|
4
|
+
const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0d81aa26"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var L=Object.defineProperty;var
|
|
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;
|