@lingshugroup/web-plus 1.0.28 → 1.0.29
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/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min/index.js.gz +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js +2 -1
- package/lib/packages/ls-components/components/dialog/Index.vue/index.js.br +0 -0
- package/lib/packages/ls-components/components/dialog/Index.vue/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 +42 -34
- 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/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var N=Object.defineProperty;var l=(n,a)=>N(n,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */k=,/* empty css */s=,/* empty css */D=,/* empty css */x=,/* empty css */M=,/* empty css */P={key:1,class:"content-wrap"},$={class:"dialog-footer"},E=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(k.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(k.lsEmitNames,["update:modelValue"]),setup(n,{expose:a,emit:S}){const r=n,i=S,v=e.useSlots(),t=e.useModel(n,"modelValue"),y=_.useNamespace("dialog").b(),d=e.ref(),u=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3}),c=e.ref(0);e.watch(()=>t==null?void 0:t.value,o=>{o&&r.openScroll&&p()},{immediate:!0,deep:!0});const f=e.computed(()=>s.default({txt:"取消"},r.btnCancelConfig)),m=e.computed(()=>s.default({type:"primary",txt:"确认"},r.btnConfirmConfig));function g(){t.value=!1,i("onCancel")}l(g,"handleClose");function B(){i("onConfirm")}l(B,"handleConfirm");async function p(){await e.nextTick();const o=r.hasFooter?108:60;c.value=parseInt(getComputedStyle(d.value.querySelector(".el-dialog")).height)-o}return l(p,"updateHeight"),a({updateHeight:p}),(o,
|
|
1
|
+
"use strict";var N=Object.defineProperty;var l=(n,a)=>N(n,"name",{value:a,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),_=,/* empty css */k=,/* empty css */s=,/* empty css */D=,/* empty css */x=,/* empty css */M=,/* empty css */P={key:1,class:"content-wrap"},$={class:"dialog-footer"},E=e.defineComponent({name:"LSDialog",inheritAttrs:!1,__name:"Index",props:e.mergeModels(k.lsDialogProp,{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(k.lsEmitNames,["update:modelValue"]),setup(n,{expose:a,emit:S}){const r=n,i=S,v=e.useSlots(),t=e.useModel(n,"modelValue"),y=_.useNamespace("dialog").b(),d=e.ref(),u=e.ref({width:"50%",closeOnClickModal:!1,closeOnPressEscape:!1,zIndex:2e3,alignCenter:!0}),c=e.ref(0);e.watch(()=>t==null?void 0:t.value,o=>{o&&r.openScroll&&p()},{immediate:!0,deep:!0});const f=e.computed(()=>s.default({txt:"取消"},r.btnCancelConfig)),m=e.computed(()=>s.default({type:"primary",txt:"确认"},r.btnConfirmConfig));function g(){t.value=!1,i("onCancel")}l(g,"handleClose");function B(){i("onConfirm")}l(B,"handleConfirm");async function p(){await e.nextTick();const o=r.hasFooter?108:60;c.value=parseInt(getComputedStyle(d.value.querySelector(".el-dialog")).height)-o}return l(p,"updateHeight"),a({updateHeight:p}),(o,C)=>{const q=D.ElScrollbar,h=e.resolveComponent("LSButton"),w=x.ElDialog,V=M.vLoading;return e.openBlock(),e.createBlock(w,e.mergeProps({ref_key:"lsDialogRef",ref:d,class:e.unref(y),modelValue:t.value,"onUpdate:modelValue":C[0]||(C[0]=b=>t.value=b)},e.unref(s.default)(e.unref(u),o.$attrs),{"show-close":!o.loading,onClose:g}),e.createSlots({header:e.withCtx(()=>[e.renderSlot(o.$slots,"header")]),default:e.withCtx(()=>[o.openScroll?e.withDirectives((e.openBlock(),e.createBlock(q,e.mergeProps({key:0},e.unref(s.default)(e.unref(u),o.$attrs),{"max-height":e.unref(c)}),{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["max-height"])),[[V,o.contentLoading]]):(e.openBlock(),e.createElementBlock("div",P,[e.renderSlot(o.$slots,"default")]))]),_:2},[o.hasFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",$,[e.unref(v).footer?e.renderSlot(o.$slots,"footer",{key:0}):e.createCommentVNode("",!0),o.hasCancelBtn?(e.openBlock(),e.createBlock(h,e.mergeProps({key:1},e.unref(f),{disabled:o.loading,onClick:g}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f).txt),1)]),_:1},16,["disabled"])):e.createCommentVNode("",!0),e.createVNode(h,e.mergeProps(e.unref(m),{loading:o.loading,disabled:o.loading,onClick:B}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(m).txt),1)]),_:1},16,["loading","disabled"])])]),key:"0"}:void 0]),1040,["class","modelValue","show-close"])}}});exports.default=E;
|
|
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-a1aa0014"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const e = /* @__PURE__ */
|
|
3
|
+
import a from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
+
const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-a1aa0014"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
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,11 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var l = (s,
|
|
3
|
-
import { defineComponent as
|
|
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";
|
|
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";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
/* empty css */
|
|
10
|
+
import { ElMessage as F } from "../../../../../node_modules/.pnpm/element-plus@2.8.1_vue@3.4.38_typescript@5.5.4_/node_modules/element-plus/es/components/message/index/index.js";
|
|
11
|
+
import G from "../../../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge/index.js";
|
|
12
|
+
const ae = /* @__PURE__ */ P({
|
|
9
13
|
name: "LSPreview",
|
|
10
14
|
// components: {
|
|
11
15
|
// LSImage,
|
|
@@ -22,20 +26,21 @@ const Y = /* @__PURE__ */ y({
|
|
|
22
26
|
modelModifiers: {}
|
|
23
27
|
}),
|
|
24
28
|
emits: /* @__PURE__ */ x(["loadComplete", "loadError"], ["update:modelValue"]),
|
|
25
|
-
setup(s, { emit:
|
|
26
|
-
const p =
|
|
27
|
-
zoomSize:
|
|
29
|
+
setup(s, { emit: u }) {
|
|
30
|
+
const p = u, e = s, { type: o, zoomSize: M } = z(e), r = A(s, "modelValue"), f = T({
|
|
31
|
+
zoomSize: M,
|
|
28
32
|
source: ""
|
|
29
|
-
}),
|
|
33
|
+
}), B = $("preview").b(), t = V({
|
|
30
34
|
image: null,
|
|
31
35
|
docx: null,
|
|
32
36
|
xlsx: null,
|
|
33
37
|
pdf: null
|
|
34
|
-
}),
|
|
38
|
+
}), d = C(), v = _(() => (o == null ? void 0 : o.value) && t.value[o == null ? void 0 : o.value]), h = C("文件加载失败,请检查文件是否已损坏!");
|
|
39
|
+
let m = null;
|
|
35
40
|
k(
|
|
36
41
|
() => r == null ? void 0 : r.value,
|
|
37
|
-
(
|
|
38
|
-
|
|
42
|
+
(a) => {
|
|
43
|
+
a && g();
|
|
39
44
|
},
|
|
40
45
|
{
|
|
41
46
|
immediate: !0,
|
|
@@ -43,8 +48,8 @@ const Y = /* @__PURE__ */ y({
|
|
|
43
48
|
}
|
|
44
49
|
), k(
|
|
45
50
|
() => e.source,
|
|
46
|
-
(
|
|
47
|
-
f.source =
|
|
51
|
+
(a) => {
|
|
52
|
+
f.source = a;
|
|
48
53
|
},
|
|
49
54
|
{
|
|
50
55
|
immediate: !0,
|
|
@@ -52,44 +57,47 @@ const Y = /* @__PURE__ */ y({
|
|
|
52
57
|
}
|
|
53
58
|
);
|
|
54
59
|
function g() {
|
|
55
|
-
switch (
|
|
60
|
+
switch (e.needLoading && (d.value = q.service(e.loadingOption)), e.type) {
|
|
56
61
|
case "image":
|
|
57
|
-
|
|
62
|
+
t.value.image = i(() => import("../components/Image.vue/index.js"));
|
|
58
63
|
break;
|
|
59
64
|
case "docx":
|
|
60
|
-
|
|
65
|
+
t.value.docx = i(() => import("../components/Docx.vue/index.js"));
|
|
61
66
|
break;
|
|
62
67
|
case "xlsx":
|
|
63
|
-
|
|
68
|
+
t.value.xlsx = i(() => import("../components/Xlsx.vue/index.js"));
|
|
64
69
|
break;
|
|
65
70
|
case "pdf":
|
|
66
|
-
|
|
71
|
+
t.value.pdf = i(() => import("../components/Pdf.vue/index.js"));
|
|
67
72
|
break;
|
|
68
73
|
}
|
|
74
|
+
m = setTimeout(() => {
|
|
75
|
+
e.source || (F.error("文件加载超时,请检查文件是否存在!"), c(), r.value = !1), clearTimeout(m);
|
|
76
|
+
}, 6e3);
|
|
69
77
|
}
|
|
70
78
|
l(g, "openLoading");
|
|
71
|
-
const
|
|
72
|
-
e.needLoading &&
|
|
73
|
-
}, "closeLoading"),
|
|
74
|
-
|
|
75
|
-
}, "loadComplete"),
|
|
76
|
-
|
|
79
|
+
const c = /* @__PURE__ */ l(() => {
|
|
80
|
+
m && clearTimeout(m), e.needLoading && d.value && d.value.close();
|
|
81
|
+
}, "closeLoading"), w = /* @__PURE__ */ l(() => {
|
|
82
|
+
c(), p("loadComplete");
|
|
83
|
+
}, "loadComplete"), b = /* @__PURE__ */ l(() => {
|
|
84
|
+
c(), console.error(h.value), p("loadError");
|
|
77
85
|
}, "loadError");
|
|
78
86
|
return I(() => {
|
|
79
87
|
r.value && e.type && g();
|
|
80
88
|
}), N(() => {
|
|
81
|
-
|
|
82
|
-
}), (
|
|
89
|
+
c();
|
|
90
|
+
}), (a, J) => r.value ? (L(), R("div", {
|
|
83
91
|
key: 0,
|
|
84
|
-
class: S(n(
|
|
92
|
+
class: S(n(B))
|
|
85
93
|
}, [
|
|
86
|
-
n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(
|
|
87
|
-
onLoadComplete:
|
|
88
|
-
onLoadError:
|
|
89
|
-
}), null, 16)) :
|
|
90
|
-
], 2)) :
|
|
94
|
+
n(v) ? (L(), D(O(n(v)), U({ key: 0 }, n(G)(n(f), a.$attrs), {
|
|
95
|
+
onLoadComplete: w,
|
|
96
|
+
onLoadError: b
|
|
97
|
+
}), null, 16)) : E("", !0)
|
|
98
|
+
], 2)) : E("", !0);
|
|
91
99
|
}
|
|
92
100
|
});
|
|
93
101
|
export {
|
|
94
|
-
|
|
102
|
+
ae as default
|
|
95
103
|
};
|
|
Binary file
|
|
Binary file
|