@lingshugroup/web-plus 1.3.1 → 1.3.3
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 +12 -12
- 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 +1 -1
- 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/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/FormItem.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js +85 -81
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/form/FormItem.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index.js +2 -2
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js +37 -37
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/Xlsx.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/config/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_xlsx/config/index.js +3 -0
- package/lib/packages/ls-components/components/preview_xlsx/config/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_xlsx/config/index.js.gz +0 -0
- package/lib/types/components/preview_xlsx/config.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Q = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
import { defineComponent as V, watch as W, ref as D, nextTick as Y, onBeforeUnmount as Z, resolveComponent as ee, openBlock as te, createElementBlock as oe, normalizeClass as I, unref as _, createElementVNode as M, createVNode as
|
|
4
|
-
import { useNamespace as
|
|
5
|
-
import { xlsxProps as
|
|
2
|
+
var a = (g, C) => Q(g, "name", { value: C, configurable: !0 });
|
|
3
|
+
import { defineComponent as V, watch as W, ref as D, nextTick as Y, onBeforeUnmount as Z, resolveComponent as ee, openBlock as te, createElementBlock as oe, normalizeClass as I, unref as _, createElementVNode as M, createVNode as ae } from "vue";
|
|
4
|
+
import { useNamespace as re } from "../../_hooks/useNamespace/index.js";
|
|
5
|
+
import { xlsxProps as se } from "../types/index.js";
|
|
6
6
|
import { previewEmits as ne } from "../../_constants/previewType/index.js";
|
|
7
7
|
import { loadCss as ce, loadJs as le, removeCss as ie, removeJs as ue } from "../../_utils/utils/index.js";
|
|
8
8
|
import { isFile as me } from "../../_utils/check/index.js";
|
|
@@ -17,10 +17,10 @@ const ye = V({
|
|
|
17
17
|
name: "LSXlsx"
|
|
18
18
|
}), Te = /* @__PURE__ */ V({
|
|
19
19
|
...ye,
|
|
20
|
-
props:
|
|
20
|
+
props: se,
|
|
21
21
|
emits: ne,
|
|
22
22
|
setup(g, { emit: C }) {
|
|
23
|
-
const S =
|
|
23
|
+
const S = re("xlsx"), q = S.b(), d = g, l = C;
|
|
24
24
|
W(
|
|
25
25
|
() => d.source,
|
|
26
26
|
(e) => {
|
|
@@ -40,12 +40,12 @@ const ye = V({
|
|
|
40
40
|
return !0;
|
|
41
41
|
return !1;
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
const U = /* @__PURE__ */
|
|
43
|
+
a(b, "isLuckySheet");
|
|
44
|
+
const U = /* @__PURE__ */ a(() => {
|
|
45
45
|
d.onClose && d.onClose(), l("update:source", []);
|
|
46
46
|
}, "closeFunc");
|
|
47
47
|
async function $(e) {
|
|
48
|
-
if (B(e))
|
|
48
|
+
if (await B(e))
|
|
49
49
|
try {
|
|
50
50
|
he.transformExcelToLucky(
|
|
51
51
|
e,
|
|
@@ -61,19 +61,19 @@ const ye = V({
|
|
|
61
61
|
l("loadError");
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
a($, "initXlsx");
|
|
65
65
|
function G(e) {
|
|
66
66
|
const t = Math.min(0 + m, e.length), i = e.slice(0, t);
|
|
67
67
|
let n = 0;
|
|
68
68
|
const o = [[]];
|
|
69
|
-
return window.luckysheet.transToCellData(i).forEach((
|
|
70
|
-
const { r: u } =
|
|
71
|
-
n !== u && (n = u, o[n] = []), o[n].push(
|
|
69
|
+
return window.luckysheet.transToCellData(i).forEach((r) => {
|
|
70
|
+
const { r: u } = r;
|
|
71
|
+
n !== u && (n = u, o[n] = []), o[n].push(r);
|
|
72
72
|
}), o;
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
a(G, "getSheetData");
|
|
75
75
|
async function H(e) {
|
|
76
|
-
if (await Y(), !!B(e))
|
|
76
|
+
if (await Y(), !!await B(e))
|
|
77
77
|
try {
|
|
78
78
|
const t = new FileReader();
|
|
79
79
|
t.onload = async function(i) {
|
|
@@ -83,26 +83,26 @@ const ye = V({
|
|
|
83
83
|
dense: !0
|
|
84
84
|
});
|
|
85
85
|
let o = 0;
|
|
86
|
-
const
|
|
87
|
-
name:
|
|
88
|
-
data: fe.sheet_to_json(n.Sheets[
|
|
89
|
-
})), u = D((T =
|
|
86
|
+
const r = (n.SheetNames || []).map((s) => ({
|
|
87
|
+
name: s,
|
|
88
|
+
data: fe.sheet_to_json(n.Sheets[s], { header: 1 })
|
|
89
|
+
})), u = D((T = r[o]) == null ? void 0 : T.name), f = D((F = r[o]) == null ? void 0 : F.data);
|
|
90
90
|
let h = f.value.length, L = 0;
|
|
91
|
-
const K = (
|
|
92
|
-
name:
|
|
91
|
+
const K = (r || []).map((s, p) => ({
|
|
92
|
+
name: s.name,
|
|
93
93
|
index: p + 1,
|
|
94
94
|
status: "1",
|
|
95
95
|
order: p,
|
|
96
|
-
data: G(
|
|
96
|
+
data: G(s.data)
|
|
97
97
|
}));
|
|
98
98
|
function P() {
|
|
99
99
|
if (L * m >= h) return;
|
|
100
|
-
const
|
|
100
|
+
const s = L * m, p = Math.min(s + m, h), O = f.value.slice(s, p);
|
|
101
101
|
let y = 0;
|
|
102
102
|
const v = [[]];
|
|
103
|
-
if (window.luckysheet.transToCellData(O).forEach((
|
|
104
|
-
const { r: c } =
|
|
105
|
-
y !== c && (y = c, v[y] = []), v[y].push(
|
|
103
|
+
if (window.luckysheet.transToCellData(O).forEach((w) => {
|
|
104
|
+
const { r: c } = w;
|
|
105
|
+
y !== c && (y = c, v[y] = []), v[y].push(w);
|
|
106
106
|
}), x.value)
|
|
107
107
|
window.luckysheet.updataSheet({
|
|
108
108
|
data: [
|
|
@@ -117,20 +117,20 @@ const ye = V({
|
|
|
117
117
|
});
|
|
118
118
|
else {
|
|
119
119
|
window.luckysheet.destroy();
|
|
120
|
-
const
|
|
120
|
+
const w = {
|
|
121
121
|
...A,
|
|
122
122
|
hook: {
|
|
123
123
|
sheetActivate(c) {
|
|
124
|
-
var
|
|
124
|
+
var k, N, z;
|
|
125
125
|
if (o != c) {
|
|
126
|
-
o = c - 1, u.value = (
|
|
126
|
+
o = c - 1, u.value = (k = r[o]) == null ? void 0 : k.name, f.value = ((N = r[o]) == null ? void 0 : N.data) || [], h = f.value.length;
|
|
127
127
|
const E = (z = document.getElementById("luckysheet")) == null ? void 0 : z.querySelector('.spage-number button[data-page="1"]');
|
|
128
128
|
E == null || E.click();
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
onTogglePager(c) {
|
|
132
|
-
const { page:
|
|
133
|
-
L =
|
|
132
|
+
const { page: k } = c;
|
|
133
|
+
L = k - 1, P();
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
@@ -156,26 +156,26 @@ const ye = V({
|
|
|
156
156
|
totalTxt: ""
|
|
157
157
|
// 数据总条数文字描述,默认"总共:{total}"
|
|
158
158
|
},
|
|
159
|
-
...
|
|
159
|
+
...w
|
|
160
160
|
}), x.value = !0;
|
|
161
161
|
}
|
|
162
162
|
l("loadComplete");
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
a(P, "loadBatch"), P();
|
|
165
165
|
}, t.readAsArrayBuffer(e);
|
|
166
166
|
} catch {
|
|
167
167
|
l("loadError");
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
a(H, "initXlsxLarge");
|
|
171
171
|
async function B(e) {
|
|
172
172
|
return !e || !me(e) ? !1 : (b() || (await ce(X), await le(j)), !0);
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
a(B, "initLuckySheet");
|
|
175
175
|
function J() {
|
|
176
176
|
x.value && window.luckysheet.destroy(), b() && (ie(X), ue(j));
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return a(J, "resetLuckySheet"), Z(() => {
|
|
179
179
|
J();
|
|
180
180
|
}), (e, t) => {
|
|
181
181
|
const i = ee("LSIcon");
|
|
@@ -186,7 +186,7 @@ const ye = V({
|
|
|
186
186
|
class: I([_(S).e("btn"), _(S).e("close")]),
|
|
187
187
|
onClick: U
|
|
188
188
|
}, [
|
|
189
|
-
|
|
189
|
+
ae(i, {
|
|
190
190
|
name: "Close",
|
|
191
191
|
size: 24,
|
|
192
192
|
color: "#FFF"
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var e=(s,l)=>a(s,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{id:"luckysheet1",src:"/luckysheet/plugins/js/plugin.js"},{id:"luckysheet2",src:"/luckysheet/luckysheet.umd.js"}],
|
|
1
|
+
"use strict";var a=Object.defineProperty;var e=(s,l)=>a(s,"name",{value:l,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=[{id:"luckysheet1",src:"/luckysheet/plugins/js/plugin.js"},{id:"luckysheet2",src:"/luckysheet/luckysheet.umd.js"}],o=[{id:"luckysheetCss1",src:"/luckysheet/plugins/css/pluginsCss.css"},{id:"luckysheetCss2",src:"/luckysheet/plugins/plugins.css"},{id:"luckysheetCss3",src:"/luckysheet/css/luckysheet.css"},{id:"luckysheetCss4",src:"/luckysheet/assets/iconfont/iconfont.css"}],i={container:"luckysheet",lang:"zh",gridKey:new Date().getTime(),showinfobar:!1,allowEdit:!1,allowCopy:!1,allowUpdate:!1,showtoolbar:!1,enableAddRow:!1,enableAddBackTop:!1,sheetFormulaBar:!1,showstatisticBar:!1,showsheetbar:!1,forceCalculation:!0,showConfigWindowResize:!1,showstatisticBarConfig:{zoom:!0},showsheetbarConfig:{sheet:!0},sheetRightClickConfig:{delete:!1,copy:!1,rename:!1,color:!1,hide:!1,move:!1},cellRightClickConfig:{copy:!1,copyAs:!1,paste:!1,insertRow:!1,insertColumn:!1,deleteRow:!1,deleteColumn:!1,deleteCell:!1,hideRow:!1,hideColumn:!1,rowHeight:!1,columnWidth:!1,clear:!1,matrix:!1,sort:!1,filter:!1,chart:!1,image:!1,link:!1,data:!1,cellFormat:!1},hook:{cellUpdateBefore:e(()=>!1,"cellUpdateBefore"),imageDeleteBefore:e(()=>!1,"imageDeleteBefore"),imageUpdateBefore:e(()=>!1,"imageUpdateBefore")}},c=20,f=1e3;exports.cssList=o;exports.fileSizeLimit=c;exports.jsList=t;exports.luckysheetConfig=i;exports.rowsPerBatch=f;
|
|
Binary file
|
|
Binary file
|