@lingshugroup/web-plus 1.7.10 → 1.7.11
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/chart/config/template/bar/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js +89 -65
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/line/index.js +102 -85
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_pdf/composable/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js +37 -35
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.gz +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js +25 -25
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js +35 -31
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/types/components/chart/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { numberFixed as
|
|
4
|
-
import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as
|
|
5
|
-
const D = /* @__PURE__ */
|
|
6
|
-
const { name:
|
|
7
|
-
return ` ${
|
|
8
|
-
}, "setTooltipFormat"), R = /* @__PURE__ */
|
|
9
|
-
let { legend: e, legendIcon: t, tooltip: n = "shadow", theme:
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
let
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
var M = Object.defineProperty;
|
|
2
|
+
var f = (o, e) => M(o, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { numberFixed as A, formatChartAxis as $ } from "../../../../_utils/utils/index.js";
|
|
4
|
+
import { BG_COLOR_MAP as k, DEF_THEME as l, BAR_COLOR_MAP as I, TOOLTIP_COLOR_MAP as O, FONT_COLOR_MAP as w, BG_BAR_COLOR_MAP as _, SPLIT_LINE_COLOR as C } from "../../base/index.js";
|
|
5
|
+
const D = /* @__PURE__ */ f((o, e, t, n, r, a, m) => {
|
|
6
|
+
const { name: c, seriesName: u, value: s, color: p } = o, i = n == 0 ? `<div class="name">${c}</div>` : "", d = e && s !== "-" && u !== "temp" ? `<span class="serise-name">${e ? u : ""}</span>` : "", h = s !== "-" && u !== "temp" ? `<span class="value">${a ? a(s, m) : s || s == 0 ? s : "-"}</span>` : "", x = s !== "-" && u !== "temp" ? `<div class="content-badge ${t}" style="background-color: ${typeof p == "string" ? p : r};"></div>` : "";
|
|
7
|
+
return ` ${i} <div class="content"> <div class="serise-wrap"> ${x} ${d} </div> ${h} </div> `;
|
|
8
|
+
}, "setTooltipFormat"), R = /* @__PURE__ */ f((o) => {
|
|
9
|
+
let { legend: e, legendIcon: t, tooltip: n = "shadow", theme: r, tooltipFormatter: a, barColorList: m, tooltipValueFormatter: c } = o;
|
|
10
|
+
const u = m || I[r || l][0];
|
|
11
|
+
return a = a || function(s) {
|
|
12
|
+
let p = `<div class="ls-bar-tooltip-wrap ${r}">`;
|
|
13
|
+
return s.forEach((i, d) => {
|
|
14
|
+
p += D(
|
|
15
|
+
i,
|
|
16
|
+
!!e,
|
|
17
|
+
t,
|
|
18
|
+
d,
|
|
19
|
+
u,
|
|
20
|
+
c,
|
|
21
|
+
i.dataIndex
|
|
22
|
+
);
|
|
23
|
+
}), p + "</div>";
|
|
16
24
|
}, n ? {
|
|
17
25
|
trigger: "axis",
|
|
18
26
|
axisPointer: {
|
|
19
27
|
type: n,
|
|
20
28
|
z: 1,
|
|
21
29
|
label: {
|
|
22
|
-
color:
|
|
30
|
+
color: O[r || l].color
|
|
23
31
|
}
|
|
24
32
|
},
|
|
25
33
|
textStyle: {
|
|
26
|
-
color:
|
|
34
|
+
color: w[r || l]
|
|
27
35
|
},
|
|
28
36
|
padding: 12,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
extraCssText: `box-shadow: ${
|
|
31
|
-
formatter:
|
|
37
|
+
backgroundColor: O[r || l].bgColor,
|
|
38
|
+
extraCssText: `box-shadow: ${O[r || l].shadowColor};`,
|
|
39
|
+
formatter: a
|
|
32
40
|
} : null;
|
|
33
|
-
}, "setTooltip"),
|
|
41
|
+
}, "setTooltip"), F = /* @__PURE__ */ f((o) => {
|
|
34
42
|
const { legend: e, legendIcon: t = "rect", theme: n } = o;
|
|
35
43
|
return {
|
|
36
44
|
type: "scroll",
|
|
@@ -39,7 +47,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
39
47
|
itemWidth: 12,
|
|
40
48
|
itemHeight: 10,
|
|
41
49
|
textStyle: {
|
|
42
|
-
color:
|
|
50
|
+
color: w[n || l],
|
|
43
51
|
fontSize: 12,
|
|
44
52
|
height: 10,
|
|
45
53
|
rich: {
|
|
@@ -49,7 +57,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
59
|
};
|
|
52
|
-
}, "setLegend"),
|
|
60
|
+
}, "setLegend"), H = /* @__PURE__ */ f((o) => {
|
|
53
61
|
const { dataZoom: e } = o, t = {
|
|
54
62
|
left: "3%",
|
|
55
63
|
right: "3%",
|
|
@@ -58,19 +66,19 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
58
66
|
containLabel: !0
|
|
59
67
|
};
|
|
60
68
|
return e === "vertical" && delete t.right, e === "horizontal" && delete t.bottom, t;
|
|
61
|
-
}, "setGrid"),
|
|
62
|
-
const { axisData: n, seriesData:
|
|
63
|
-
let
|
|
69
|
+
}, "setGrid"), B = /* @__PURE__ */ f((o, e, t) => {
|
|
70
|
+
const { axisData: n, seriesData: r } = o, { axis: a = "x", theme: m, lineBar: c, dynamicAxis: u, type: s } = e;
|
|
71
|
+
let p = [
|
|
64
72
|
{
|
|
65
|
-
type:
|
|
73
|
+
type: a == t ? "category" : "value",
|
|
66
74
|
axisTick: {
|
|
67
75
|
show: !1
|
|
68
76
|
},
|
|
69
77
|
axisLine: {
|
|
70
|
-
show:
|
|
78
|
+
show: a == t,
|
|
71
79
|
lineStyle: {
|
|
72
80
|
width: 1,
|
|
73
|
-
color:
|
|
81
|
+
color: w[m || l]
|
|
74
82
|
}
|
|
75
83
|
},
|
|
76
84
|
axisLabel: {
|
|
@@ -79,19 +87,19 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
79
87
|
splitLine: {
|
|
80
88
|
lineStyle: {
|
|
81
89
|
type: "dashed",
|
|
82
|
-
color:
|
|
90
|
+
color: C[m || l]
|
|
83
91
|
}
|
|
84
92
|
},
|
|
85
|
-
data:
|
|
93
|
+
data: a == t ? n : []
|
|
86
94
|
}
|
|
87
95
|
];
|
|
88
|
-
if (
|
|
96
|
+
if (a !== t && (c && (p = a == "x" ? [
|
|
89
97
|
{
|
|
90
98
|
type: "value",
|
|
91
99
|
splitLine: {
|
|
92
100
|
show: !1,
|
|
93
101
|
lineStyle: {
|
|
94
|
-
color:
|
|
102
|
+
color: C[m || l]
|
|
95
103
|
}
|
|
96
104
|
}
|
|
97
105
|
},
|
|
@@ -99,7 +107,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
99
107
|
type: "value",
|
|
100
108
|
splitLine: {
|
|
101
109
|
lineStyle: {
|
|
102
|
-
color:
|
|
110
|
+
color: C[m || l],
|
|
103
111
|
type: "dashed",
|
|
104
112
|
width: 2,
|
|
105
113
|
dashOffset: 2
|
|
@@ -111,17 +119,17 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
111
119
|
type: "value"
|
|
112
120
|
}
|
|
113
121
|
]), u)) {
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
var
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
return
|
|
122
|
+
let i = [];
|
|
123
|
+
s === "multiple" && (!c || a == "y" && c) && (i = (r || []).reduce((d, h) => d.concat(h.data), [])), p.map((d, h) => {
|
|
124
|
+
var b;
|
|
125
|
+
s === "multiple" ? c && a == "x" && (i = (((b = (r || [])[h]) == null ? void 0 : b.data) || []).map((S) => A(S))) : i = (r || []).map((S) => A(S)), i = i.filter((S) => S > 0);
|
|
126
|
+
const x = Math.max(...i), y = Math.min(...i), { aInterval: g, aMax: v, aMin: L } = $(x, y);
|
|
127
|
+
return d.min = L, d.max = v, d.interval = g, d;
|
|
120
128
|
});
|
|
121
129
|
}
|
|
122
|
-
return
|
|
123
|
-
}, "setAxis"), T = /* @__PURE__ */
|
|
124
|
-
const { dataZoom: e, dataZoomColorOut: t, dataZoomColorIn: n, theme:
|
|
130
|
+
return p;
|
|
131
|
+
}, "setAxis"), T = /* @__PURE__ */ f((o) => {
|
|
132
|
+
const { dataZoom: e, dataZoomColorOut: t, dataZoomColorIn: n, theme: r } = o;
|
|
125
133
|
return e ? [
|
|
126
134
|
{
|
|
127
135
|
show: !0,
|
|
@@ -143,7 +151,7 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
143
151
|
// },
|
|
144
152
|
// borderColor: null,
|
|
145
153
|
textStyle: {
|
|
146
|
-
color:
|
|
154
|
+
color: w[r || l]
|
|
147
155
|
}
|
|
148
156
|
},
|
|
149
157
|
{
|
|
@@ -159,79 +167,88 @@ const D = /* @__PURE__ */ p((o, e, t, n, a) => {
|
|
|
159
167
|
showDataShadow: !0
|
|
160
168
|
}
|
|
161
169
|
] : null;
|
|
162
|
-
}, "setDataZoom"), Z = /* @__PURE__ */
|
|
170
|
+
}, "setDataZoom"), Z = /* @__PURE__ */ f((o, e) => {
|
|
163
171
|
const { seriesData: t } = o, {
|
|
164
172
|
type: n = "simple",
|
|
165
|
-
showBarFont:
|
|
166
|
-
labelPosition:
|
|
167
|
-
smooth:
|
|
168
|
-
areaStyle:
|
|
173
|
+
showBarFont: r = !0,
|
|
174
|
+
labelPosition: a = "inside",
|
|
175
|
+
smooth: m = !0,
|
|
176
|
+
areaStyle: c = void 0,
|
|
169
177
|
showBackground: u,
|
|
170
|
-
theme:
|
|
171
|
-
name:
|
|
172
|
-
lineBar:
|
|
173
|
-
axis:
|
|
174
|
-
symbol:
|
|
178
|
+
theme: s,
|
|
179
|
+
name: p,
|
|
180
|
+
lineBar: i,
|
|
181
|
+
axis: d,
|
|
182
|
+
symbol: h = "circle",
|
|
183
|
+
seriesLabelFormatter: x
|
|
175
184
|
} = e;
|
|
176
|
-
return n === "multiple" ? (t || []).map((
|
|
177
|
-
const
|
|
178
|
-
name:
|
|
179
|
-
type:
|
|
180
|
-
symbol:
|
|
181
|
-
emphasis:
|
|
185
|
+
return n === "multiple" ? (t || []).map((y, g) => {
|
|
186
|
+
const v = {
|
|
187
|
+
name: y.name,
|
|
188
|
+
type: y.type,
|
|
189
|
+
symbol: h,
|
|
190
|
+
emphasis: y.emphasis || {
|
|
182
191
|
focus: "series"
|
|
183
192
|
},
|
|
184
|
-
smooth:
|
|
185
|
-
areaStyle:
|
|
193
|
+
smooth: m,
|
|
194
|
+
areaStyle: c || null,
|
|
186
195
|
label: {
|
|
187
|
-
show:
|
|
188
|
-
position:
|
|
196
|
+
show: r,
|
|
197
|
+
position: a,
|
|
198
|
+
formatter: x || function(L) {
|
|
199
|
+
const b = L.value;
|
|
200
|
+
return b !== 0 ? b : "";
|
|
201
|
+
}
|
|
189
202
|
},
|
|
190
203
|
showBackground: u,
|
|
191
204
|
backgroundStyle: {
|
|
192
|
-
color:
|
|
205
|
+
color: _[s || l]
|
|
193
206
|
},
|
|
194
|
-
itemStyle:
|
|
195
|
-
data:
|
|
207
|
+
itemStyle: y.itemStyle || {},
|
|
208
|
+
data: y.data || []
|
|
196
209
|
};
|
|
197
|
-
return
|
|
210
|
+
return i && (d !== "y" && g === 1 ? v.yAxisIndex = g : v.yAxisIndex && delete v.yAxisIndex), v;
|
|
198
211
|
}) : [
|
|
199
212
|
{
|
|
200
|
-
name:
|
|
213
|
+
name: p,
|
|
201
214
|
label: {
|
|
202
|
-
show:
|
|
203
|
-
position:
|
|
215
|
+
show: r,
|
|
216
|
+
position: a,
|
|
217
|
+
formatter: x || function(y) {
|
|
218
|
+
const g = y.value;
|
|
219
|
+
return g !== 0 ? g : "";
|
|
220
|
+
}
|
|
204
221
|
},
|
|
205
222
|
showBackground: u,
|
|
206
223
|
backgroundStyle: {
|
|
207
|
-
color:
|
|
224
|
+
color: _[s || l]
|
|
208
225
|
},
|
|
209
226
|
data: t || [],
|
|
210
|
-
smooth:
|
|
211
|
-
symbol:
|
|
227
|
+
smooth: m,
|
|
228
|
+
symbol: h,
|
|
212
229
|
// 设置填充透明度
|
|
213
|
-
areaStyle:
|
|
230
|
+
areaStyle: c || null,
|
|
214
231
|
type: "line"
|
|
215
232
|
}
|
|
216
233
|
];
|
|
217
|
-
}, "setSeries"), E = /* @__PURE__ */
|
|
218
|
-
const { theme: t, barColorList: n } = e,
|
|
234
|
+
}, "setSeries"), E = /* @__PURE__ */ f((o, e) => {
|
|
235
|
+
const { theme: t, barColorList: n } = e, r = {
|
|
219
236
|
textStyle: {},
|
|
220
237
|
backgroundColor: k[t || l],
|
|
221
|
-
color: n ||
|
|
222
|
-
legend:
|
|
223
|
-
grid:
|
|
224
|
-
xAxis:
|
|
225
|
-
yAxis:
|
|
238
|
+
color: n || I[t || l],
|
|
239
|
+
legend: F(e),
|
|
240
|
+
grid: H(e),
|
|
241
|
+
xAxis: B(o, e, "x"),
|
|
242
|
+
yAxis: B(o, e, "y"),
|
|
226
243
|
series: Z(o, e),
|
|
227
244
|
dataZoom: T(e)
|
|
228
|
-
},
|
|
229
|
-
return
|
|
245
|
+
}, a = R(e);
|
|
246
|
+
return a && (r.tooltip = a), r;
|
|
230
247
|
}, "setOption");
|
|
231
248
|
function P(o = {}, e = {}) {
|
|
232
249
|
return E(o, e);
|
|
233
250
|
}
|
|
234
|
-
|
|
251
|
+
f(P, "dealOption");
|
|
235
252
|
export {
|
|
236
253
|
P as dealOption
|
|
237
254
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var N=Object.defineProperty;var
|
|
1
|
+
"use strict";var N=Object.defineProperty;var l=(s,g)=>N(s,"name",{value:g,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("pdfjs-dist"),O=require("../../../../../node_modules/.pnpm/pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.worker.min/index.cjs"),f=require("vue"),P=require("../pdfs/destination/index.cjs"),I=require("../pdfs/miscellaneous/index.cjs");function q(s){b.GlobalWorkerOptions.workerSrc=s}l(q,"configWorker");function A(s,g,i={onProgress:void 0,onPassword:void 0,onError:void 0,password:""}){var S;(S=b.GlobalWorkerOptions)!=null&&S.workerSrc||q(O.default);const D=f.shallowRef(),u=f.shallowRef(),k=f.shallowRef(0),R=f.shallowRef({});function v(c){u.value&&u.value.destroy();const o=b.getDocument(g?{url:c,cMapUrl:g,cMapPacked:!0}:c);if(i.onProgress&&(o.onProgress=i.onProgress),i.onPassword)o.onPassword=i.onPassword;else if(i.password){const e=l(r=>{r(i.password??"")},"onPassword");o.onPassword=e}return o.promise.then(async e=>{u.value=e,D.value=e.loadingTask,k.value=e.numPages;const r=await e.getMetadata(),a=await e.getAttachments(),n=await e.getJSActions(),d=await e.getOutline();R.value={metadata:r,attachments:a,javascript:n,outline:d}},e=>{typeof i.onError=="function"&&i.onError(e)})}l(v,"processLoadingTask");async function x(c){var t;const o=await((t=D.value)==null?void 0:t.promise);if(!o)return null;const e=await P.getDestinationArray(o,c),r=await P.getDestinationRef(o,e);if(!r||!e)return null;const a=await o.getPageIndex(r),n=e[1].name,d=e.slice(2),p=P.isSpecLike(d)?P.getLocation(n,d):null;return{pageIndex:a,location:p??{type:"Fit",spec:[]}}}l(x,"getPDFDestination");async function E(c="filename"){var n;if(!u.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const o=await((n=u.value)==null?void 0:n.saveDocument()),e=new Blob([o],{type:"application/pdf"}),r=URL.createObjectURL(e),a=document.createElement("a");document.body.appendChild(a),a.href=r,a.download=c,a.style.display="none",a.click(),setTimeout(()=>{URL.revokeObjectURL(r),document.body.removeChild(a)},10)}l(E,"download");async function F(c=150,o="filename"){var C,T;if(!u.value)throw new Error("Current PDFDocumentProxy have not loaded yet");const e=await((C=u.value)==null?void 0:C.saveDocument()),a=await b.getDocument(e.buffer).promise,n=c/72,d=96/72,p=await I.createIframe(),t=p.contentWindow;t.document.title=o;const U=[...Array(a.numPages).keys()].map(y=>y+1);for(const y of U){const h=await a.getPage(y),m=h.getViewport({scale:1});y===1&&I.addStylesToIframe(t,m.width*n/d,m.height*n/d);const w=document.createElement("canvas");w.width=m.width*n,w.height=m.height*n;const L=w.cloneNode();t==null||t.document.body.appendChild(L),await(h==null?void 0:h.render({canvasContext:w.getContext("2d"),intent:"print",transform:[n,0,0,n,0,0],viewport:m}).promise),(T=L.getContext("2d"))==null||T.drawImage(w,0,0)}t==null||t.focus(),t==null||t.print(),document.body.removeChild(p)}return l(F,"print"),f.isRef(s)?(s.value&&v(s.value),f.watch(s,()=>{s.value&&v(s.value)})):s&&v(s),{pdf:D,pages:k,info:R,print:F,download:E,getPDFDestination:x,processLoadingTask:v}}l(A,"usePDF");exports.usePDF=A;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var F = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var d = (r, w) => F(r, "name", { value: w, configurable: !0 });
|
|
3
3
|
import { GlobalWorkerOptions as T, getDocument as S } from "pdfjs-dist";
|
|
4
4
|
import N from "../../../../../node_modules/.pnpm/pdfjs-dist@4.8.69/node_modules/pdfjs-dist/build/pdf.worker.min/index.js";
|
|
5
|
-
import { shallowRef as
|
|
6
|
-
import { getDestinationArray as j, getDestinationRef as
|
|
5
|
+
import { shallowRef as h, isRef as A, watch as O } from "vue";
|
|
6
|
+
import { getDestinationArray as j, getDestinationRef as B, isSpecLike as M, getLocation as _ } from "../pdfs/destination/index.js";
|
|
7
7
|
import { createIframe as G, addStylesToIframe as J } from "../pdfs/miscellaneous/index.js";
|
|
8
8
|
function V(r) {
|
|
9
9
|
T.workerSrc = r;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
function Y(r,
|
|
11
|
+
d(V, "configWorker");
|
|
12
|
+
function Y(r, w, i = {
|
|
13
13
|
onProgress: void 0,
|
|
14
14
|
onPassword: void 0,
|
|
15
15
|
onError: void 0,
|
|
@@ -17,18 +17,20 @@ function Y(r, h, i = {
|
|
|
17
17
|
}) {
|
|
18
18
|
var k;
|
|
19
19
|
(k = T) != null && k.workerSrc || V(N);
|
|
20
|
-
const P =
|
|
21
|
-
function
|
|
20
|
+
const P = h(), l = h(), b = h(0), D = h({});
|
|
21
|
+
function g(c) {
|
|
22
22
|
l.value && l.value.destroy();
|
|
23
|
-
const o = S(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const o = S(
|
|
24
|
+
w ? {
|
|
25
|
+
url: c,
|
|
26
|
+
cMapUrl: w,
|
|
27
|
+
cMapPacked: !0
|
|
28
|
+
} : c
|
|
29
|
+
);
|
|
28
30
|
if (i.onProgress && (o.onProgress = i.onProgress), i.onPassword)
|
|
29
31
|
o.onPassword = i.onPassword;
|
|
30
32
|
else if (i.password) {
|
|
31
|
-
const e = /* @__PURE__ */
|
|
33
|
+
const e = /* @__PURE__ */ d((s) => {
|
|
32
34
|
s(i.password ?? "");
|
|
33
35
|
}, "onPassword");
|
|
34
36
|
o.onPassword = e;
|
|
@@ -49,34 +51,34 @@ function Y(r, h, i = {
|
|
|
49
51
|
}
|
|
50
52
|
);
|
|
51
53
|
}
|
|
52
|
-
|
|
53
|
-
async function x(
|
|
54
|
+
d(g, "processLoadingTask");
|
|
55
|
+
async function x(c) {
|
|
54
56
|
var t;
|
|
55
57
|
const o = await ((t = P.value) == null ? void 0 : t.promise);
|
|
56
58
|
if (!o) return null;
|
|
57
|
-
const e = await j(o,
|
|
59
|
+
const e = await j(o, c), s = await B(o, e);
|
|
58
60
|
if (!s || !e) return null;
|
|
59
|
-
const a = await o.getPageIndex(s), n = e[1].name, u = e.slice(2),
|
|
60
|
-
return { pageIndex: a, location:
|
|
61
|
+
const a = await o.getPageIndex(s), n = e[1].name, u = e.slice(2), v = M(u) ? _(n, u) : null;
|
|
62
|
+
return { pageIndex: a, location: v ?? { type: "Fit", spec: [] } };
|
|
61
63
|
}
|
|
62
|
-
|
|
63
|
-
async function I(
|
|
64
|
+
d(x, "getPDFDestination");
|
|
65
|
+
async function I(c = "filename") {
|
|
64
66
|
var n;
|
|
65
67
|
if (!l.value) throw new Error("Current PDFDocumentProxy have not loaded yet");
|
|
66
68
|
const o = await ((n = l.value) == null ? void 0 : n.saveDocument()), e = new Blob([o], { type: "application/pdf" }), s = URL.createObjectURL(e), a = document.createElement("a");
|
|
67
|
-
document.body.appendChild(a), a.href = s, a.download =
|
|
69
|
+
document.body.appendChild(a), a.href = s, a.download = c, a.style.display = "none", a.click(), setTimeout(() => {
|
|
68
70
|
URL.revokeObjectURL(s), document.body.removeChild(a);
|
|
69
71
|
}, 10);
|
|
70
72
|
}
|
|
71
|
-
|
|
72
|
-
async function
|
|
73
|
+
d(I, "download");
|
|
74
|
+
async function E(c = 150, o = "filename") {
|
|
73
75
|
var C, L;
|
|
74
76
|
if (!l.value) throw new Error("Current PDFDocumentProxy have not loaded yet");
|
|
75
|
-
const e = await ((C = l.value) == null ? void 0 : C.saveDocument()), a = await S(e.buffer).promise, n =
|
|
77
|
+
const e = await ((C = l.value) == null ? void 0 : C.saveDocument()), a = await S(e.buffer).promise, n = c / 72, u = 96 / 72, v = await G(), t = v.contentWindow;
|
|
76
78
|
t.document.title = o;
|
|
77
|
-
const
|
|
78
|
-
for (const p of
|
|
79
|
-
const
|
|
79
|
+
const U = [...Array(a.numPages).keys()].map((p) => p + 1);
|
|
80
|
+
for (const p of U) {
|
|
81
|
+
const y = await a.getPage(p), m = y.getViewport({ scale: 1 });
|
|
80
82
|
p === 1 && J(
|
|
81
83
|
t,
|
|
82
84
|
m.width * n / u,
|
|
@@ -85,28 +87,28 @@ function Y(r, h, i = {
|
|
|
85
87
|
const f = document.createElement("canvas");
|
|
86
88
|
f.width = m.width * n, f.height = m.height * n;
|
|
87
89
|
const R = f.cloneNode();
|
|
88
|
-
t == null || t.document.body.appendChild(R), await (
|
|
90
|
+
t == null || t.document.body.appendChild(R), await (y == null ? void 0 : y.render({
|
|
89
91
|
canvasContext: f.getContext("2d"),
|
|
90
92
|
intent: "print",
|
|
91
93
|
transform: [n, 0, 0, n, 0, 0],
|
|
92
94
|
viewport: m
|
|
93
95
|
}).promise), (L = R.getContext("2d")) == null || L.drawImage(f, 0, 0);
|
|
94
96
|
}
|
|
95
|
-
t == null || t.focus(), t == null || t.print(), document.body.removeChild(
|
|
97
|
+
t == null || t.focus(), t == null || t.print(), document.body.removeChild(v);
|
|
96
98
|
}
|
|
97
|
-
return
|
|
98
|
-
r.value &&
|
|
99
|
-
})) : r &&
|
|
99
|
+
return d(E, "print"), A(r) ? (r.value && g(r.value), O(r, () => {
|
|
100
|
+
r.value && g(r.value);
|
|
101
|
+
})) : r && g(r), {
|
|
100
102
|
pdf: P,
|
|
101
103
|
pages: b,
|
|
102
104
|
info: D,
|
|
103
|
-
print:
|
|
105
|
+
print: E,
|
|
104
106
|
download: I,
|
|
105
107
|
getPDFDestination: x,
|
|
106
|
-
processLoadingTask:
|
|
108
|
+
processLoadingTask: g
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
|
-
|
|
111
|
+
d(Y, "usePDF");
|
|
110
112
|
export {
|
|
111
113
|
Y as usePDF
|
|
112
114
|
};
|
|
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-11f81900"]]);exports.default=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../../../_virtual/_plugin-vue_export-helper/index.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-11f81900"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var y=Object.defineProperty;var u=(l,o)=>y(l,"name",{value:o,configurable:!0});Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});;/* empty css */;/* empty css */;/* empty css */const e=require("vue"),S=,/* empty css */v=,/* empty css */a=,/* empty css */w=,/* empty css */_=e.defineComponent({name:"LSTooltip"}),C=e.defineComponent({..._,props:v.lsTooltipProps,setup(l){const o=l,p=S.useNamespace("tooltip").b(),r=e.ref(!1),s=e.ref(),d=e.useAttrs(),c=e.computed(()=>{const t=o.width.toString();let n="100%";return(t.endsWith("%")||t.endsWith("px"))&&!a.isEmpty(parseInt(t))?n=t:a.isEmpty(Number(t))||(n=`${t}px`),{width:n}}),f=e.computed(()=>d.content||""),m=e.computed(()=>{const t=o.lineClamp>1?Object.assign({height:"auto"},c.value):{width:"auto",height:0},n=o.fontSize;n&&(t.fontSize=`${n}px`);const i=o.lineHeight;return i&&(t.lineHeight=`${i}px`),t});function h(){g()}u(h,"onMouseEnter");async function g(){if(await e.nextTick(),s.value){const t=s.value.getBoundingClientRect(),n=s.value.querySelector(".temp-content").getBoundingClientRect();o.lineClamp<=1?r.value=n.width>t.width:r.value=n.height>t.height}}return u(g,"updateTooltip"),(t,n)=>{const i=w.ElTooltip;return e.openBlock(),e.createElementBlock("div",{ref_key:"lsTooltipRef",ref:s,class:e.normalizeClass(e.unref(p)),style:e.normalizeStyle(e.unref(c)),onMouseenter:h},[e.createElementVNode("div",{class:"temp-content",style:e.normalizeStyle(e.unref(m))},e.toDisplayString(e.unref(f)),5),e.createVNode(i,e.mergeProps({disabled:!e.unref(r)},t.$attrs),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),content:e.withCtx(()=>[e.renderSlot(t.$slots,"content",{},void 0,!0)]),_:3},16,["disabled"])],38)}}});exports.default=C;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var c = (l, o) => T(l, "name", { value: o, configurable: !0 });
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { defineComponent as g, ref as
|
|
6
|
+
import { defineComponent as g, ref as m, useAttrs as B, computed as p, openBlock as $, createElementBlock as b, normalizeClass as x, unref as n, normalizeStyle as u, createElementVNode as z, toDisplayString as E, createVNode as k, mergeProps as N, withCtx as f, renderSlot as d, nextTick as R } from "vue";
|
|
7
7
|
import { useNamespace as W } from "../../_hooks/useNamespace/index.js";
|
|
8
8
|
import { lsTooltipProps as H } from "../types/index.js";
|
|
9
9
|
import { isEmpty as h } from "../../_utils/utils/index.js";
|
|
@@ -13,52 +13,52 @@ const P = g({
|
|
|
13
13
|
}), J = /* @__PURE__ */ g({
|
|
14
14
|
...P,
|
|
15
15
|
props: H,
|
|
16
|
-
setup(
|
|
17
|
-
const o =
|
|
18
|
-
const t = o.width;
|
|
16
|
+
setup(l) {
|
|
17
|
+
const o = l, w = W("tooltip").b(), r = m(!1), i = m(), y = B(), a = p(() => {
|
|
18
|
+
const t = o.width.toString();
|
|
19
19
|
let e = "100%";
|
|
20
20
|
return (t.endsWith("%") || t.endsWith("px")) && !h(parseInt(t)) ? e = t : h(Number(t)) || (e = `${t}px`), {
|
|
21
21
|
width: e
|
|
22
22
|
};
|
|
23
|
-
}),
|
|
23
|
+
}), v = p(() => y.content || ""), S = p(() => {
|
|
24
24
|
const t = o.lineClamp > 1 ? Object.assign(
|
|
25
25
|
{
|
|
26
26
|
height: "auto"
|
|
27
27
|
},
|
|
28
|
-
|
|
28
|
+
a.value
|
|
29
29
|
) : {
|
|
30
30
|
width: "auto",
|
|
31
31
|
height: 0
|
|
32
32
|
}, e = o.fontSize;
|
|
33
33
|
e && (t.fontSize = `${e}px`);
|
|
34
|
-
const
|
|
35
|
-
return
|
|
34
|
+
const s = o.lineHeight;
|
|
35
|
+
return s && (t.lineHeight = `${s}px`), t;
|
|
36
36
|
});
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function _() {
|
|
38
|
+
C();
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
async function
|
|
40
|
+
c(_, "onMouseEnter");
|
|
41
|
+
async function C() {
|
|
42
42
|
if (await R(), i.value) {
|
|
43
43
|
const t = i.value.getBoundingClientRect(), e = i.value.querySelector(".temp-content").getBoundingClientRect();
|
|
44
|
-
o.lineClamp <= 1 ? e.width > t.width
|
|
44
|
+
o.lineClamp <= 1 ? r.value = e.width > t.width : r.value = e.height > t.height;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
return
|
|
48
|
-
const
|
|
49
|
-
return
|
|
47
|
+
return c(C, "updateTooltip"), (t, e) => {
|
|
48
|
+
const s = M;
|
|
49
|
+
return $(), b("div", {
|
|
50
50
|
ref_key: "lsTooltipRef",
|
|
51
51
|
ref: i,
|
|
52
|
-
class:
|
|
53
|
-
style:
|
|
54
|
-
onMouseenter:
|
|
52
|
+
class: x(n(w)),
|
|
53
|
+
style: u(n(a)),
|
|
54
|
+
onMouseenter: _
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
z("div", {
|
|
57
57
|
class: "temp-content",
|
|
58
|
-
style:
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
disabled: !
|
|
58
|
+
style: u(n(S))
|
|
59
|
+
}, E(n(v)), 5),
|
|
60
|
+
k(s, N({
|
|
61
|
+
disabled: !n(r)
|
|
62
62
|
}, t.$attrs), {
|
|
63
63
|
default: f(() => [
|
|
64
64
|
d(t.$slots, "default", {}, void 0, !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-96110588"]]);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 m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-96110588"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|