ooxml-excel-editor 1.1.0 → 1.2.0
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/CHANGELOG.md +75 -0
- package/README.md +148 -4
- package/dist/chunks/plugin-overlay-BBrNby8v.js +8965 -0
- package/dist/chunks/worker-client.stub-CJlmpAgJ.js +190 -0
- package/dist/components/ExcelViewer.vue.d.ts +170 -19
- package/dist/components/ExportProgressOverlay.vue.d.ts +11 -0
- package/dist/components/FilterPopup.vue.d.ts +4 -4
- package/dist/components/ViewerToolbar.vue.d.ts +2 -0
- package/dist/composables/useExcelDocument.d.ts +1 -0
- package/dist/core/edit/clipboard-html.d.ts +24 -0
- package/dist/core/edit/commands.d.ts +45 -1
- package/dist/core/edit/context-menu.d.ts +19 -0
- package/dist/core/edit/edit-controller.d.ts +70 -2
- package/dist/core/edit/permissions.d.ts +41 -2
- package/dist/core/edit/types.d.ts +62 -0
- package/dist/core/export/abort.d.ts +21 -0
- package/dist/core/export/exporter.d.ts +2 -1
- package/dist/core/export/types.d.ts +8 -0
- package/dist/core/export/wps-cellimages.d.ts +6 -0
- package/dist/core/export/xlsx-writer.d.ts +9 -0
- package/dist/core/format/color.d.ts +5 -0
- package/dist/core/format/number-format.d.ts +3 -0
- package/dist/core/layout/autofit.d.ts +3 -0
- package/dist/core/layout/grid-metrics.d.ts +14 -2
- package/dist/core/loader-json.d.ts +23 -0
- package/dist/core/model/clone.d.ts +3 -4
- package/dist/core/model/inspect.d.ts +43 -0
- package/dist/core/model/mutations.d.ts +16 -1
- package/dist/core/model/types.d.ts +44 -2
- package/dist/core/parser/cell-image-parser.d.ts +9 -0
- package/dist/core/parser/row-meta-parser.d.ts +3 -0
- package/dist/core/plugin.d.ts +144 -6
- package/dist/core/progress.d.ts +23 -0
- package/dist/core/render/canvas-renderer.d.ts +56 -2
- package/dist/core/render/conditional.d.ts +7 -0
- package/dist/core/template/style-overlay.d.ts +9 -0
- package/dist/core/viewer/controller.d.ts +209 -6
- package/dist/core/viewer/lightbox-host.d.ts +16 -0
- package/dist/core.js +1 -1
- package/dist/index.js +1169 -821
- package/dist/react/ExcelViewer.d.ts +134 -3
- package/dist/react/ExportProgressOverlay.d.ts +6 -0
- package/dist/react/use-excel-document.d.ts +2 -0
- package/dist/react.js +718 -281
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/plugin-overlay-Cfnn9EOi.js +0 -7144
- package/dist/chunks/worker-client.stub-BQVZfaLd.js +0 -7
package/dist/index.js
CHANGED
|
@@ -1,170 +1,180 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { r as
|
|
3
|
-
import { D as
|
|
4
|
-
import { p as
|
|
5
|
-
import { definePlugin as
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
async function
|
|
9
|
-
|
|
1
|
+
import { ref as x, shallowRef as ct, defineComponent as G, onBeforeUnmount as Oe, openBlock as c, createElementBlock as v, createElementVNode as n, createTextVNode as L, toDisplayString as E, createCommentVNode as M, withModifiers as He, Fragment as U, renderList as ce, computed as T, normalizeClass as B, reactive as Mt, withDirectives as N, vModelRadio as Fe, vModelSelect as ut, vModelCheckbox as rt, onMounted as Ue, normalizeStyle as Be, vModelText as rl, unref as w, nextTick as We, watch as z, createBlock as ie, Teleport as dl, renderSlot as ee, createVNode as dt } from "vue";
|
|
2
|
+
import { r as vt, l as Ft, d as It, f as Rt, a as cl, i as Re, V as vl, P as fl, g as ml, s as pl, b as gl, e as yl, h as bl } from "./chunks/plugin-overlay-BBrNby8v.js";
|
|
3
|
+
import { D as Cs, j as hs, k as ws, m as $s, c as Ss, n as Es, o as Ts, q as Ms, t as Fs, u as Is, v as Rs, p as Ps } from "./chunks/plugin-overlay-BBrNby8v.js";
|
|
4
|
+
import { p as Pt, a as kl, i as xl, j as Cl } from "./chunks/worker-client.stub-CJlmpAgJ.js";
|
|
5
|
+
import { definePlugin as zs } from "./core.js";
|
|
6
|
+
function hl() {
|
|
7
|
+
const d = x(!1), $ = x(null), g = ct(null), a = x(null), b = ct(null);
|
|
8
|
+
async function y(f, p) {
|
|
9
|
+
d.value = !0, $.value = null, g.value && vt(g.value), g.value = null, b.value = null, a.value = { stage: "read", ratio: 0 };
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
}),
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
16
|
-
if (
|
|
17
|
-
let
|
|
18
|
-
|
|
11
|
+
const o = await Ft(f, (A, P) => {
|
|
12
|
+
a.value = { stage: "read", ratio: P ? A / P : void 0 };
|
|
13
|
+
}), r = It(o);
|
|
14
|
+
if (r === "xls") throw new Error("这是旧版 .xls(BIFF) 或加密文件,本预览器只支持 .xlsx/.xlsm。");
|
|
15
|
+
if (r === "not-zip") throw new Error("文件不是有效的 .xlsx(非 ZIP 包)。");
|
|
16
|
+
if (r === "empty") throw new Error("文件为空。");
|
|
17
|
+
let F = await Pt(o, (A) => {
|
|
18
|
+
a.value = A;
|
|
19
19
|
});
|
|
20
|
-
|
|
21
|
-
} catch (
|
|
22
|
-
|
|
20
|
+
p && (F = p(F) ?? F), Rt(F), b.value = o.slice(0), g.value = F;
|
|
21
|
+
} catch (o) {
|
|
22
|
+
$.value = o != null && o.message && /预览器|损坏|加密|为空|ZIP/.test(o.message) ? o.message : cl(o), console.error("[ooxml-preview] 解析失败:", o);
|
|
23
23
|
} finally {
|
|
24
|
-
|
|
24
|
+
d.value = !1, a.value = null;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
function u(f, p) {
|
|
28
|
+
g.value && vt(g.value), b.value = null, $.value = null, a.value = null, g.value = p ? p(f) ?? f : f;
|
|
29
|
+
}
|
|
30
|
+
return { loading: d, error: $, workbook: g, load: y, loadModel: u, progress: a, sourceBuffer: b };
|
|
28
31
|
}
|
|
29
|
-
const
|
|
32
|
+
const wl = { class: "toolbar" }, $l = ["title"], Sl = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "tpl"
|
|
35
|
+
}, El = { class: "meta" }, Tl = { class: "export-wrap" }, Ml = {
|
|
30
36
|
key: 0,
|
|
31
37
|
class: "menu"
|
|
32
|
-
},
|
|
38
|
+
}, Fl = { class: "zoom" }, Il = ["value"], Rl = ["value"], Pl = ["value"], Dl = /* @__PURE__ */ G({
|
|
33
39
|
__name: "ViewerToolbar",
|
|
34
40
|
props: {
|
|
35
41
|
fileName: {},
|
|
42
|
+
templateName: {},
|
|
36
43
|
sheetCount: {},
|
|
37
44
|
zoom: {}
|
|
38
45
|
},
|
|
39
46
|
emits: ["update:zoom", "export-image", "export-pdf", "export-pdf-vector", "print", "open-settings"],
|
|
40
|
-
setup(
|
|
41
|
-
const
|
|
42
|
-
function
|
|
43
|
-
|
|
47
|
+
setup(d, { emit: $ }) {
|
|
48
|
+
const g = $, a = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
49
|
+
function b(o) {
|
|
50
|
+
g("update:zoom", Math.min(3, Math.max(0.3, o)));
|
|
44
51
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
47
|
-
|
|
52
|
+
const y = x(!1);
|
|
53
|
+
function u() {
|
|
54
|
+
y.value = !y.value;
|
|
48
55
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
56
|
+
function f(o) {
|
|
57
|
+
y.value = !1, g(o === "export-image" ? "export-image" : o === "export-pdf" ? "export-pdf" : o === "export-pdf-vector" ? "export-pdf-vector" : o === "print" ? "print" : "open-settings");
|
|
51
58
|
}
|
|
52
|
-
function
|
|
53
|
-
var
|
|
54
|
-
(
|
|
59
|
+
function p(o) {
|
|
60
|
+
var r;
|
|
61
|
+
(r = o.target) != null && r.closest(".export-wrap") || (y.value = !1);
|
|
55
62
|
}
|
|
56
|
-
return typeof document < "u" && document.addEventListener("click",
|
|
57
|
-
typeof document < "u" && document.removeEventListener("click",
|
|
58
|
-
}), (
|
|
63
|
+
return typeof document < "u" && document.addEventListener("click", p), Oe(() => {
|
|
64
|
+
typeof document < "u" && document.removeEventListener("click", p);
|
|
65
|
+
}), (o, r) => (c(), v("div", wl, [
|
|
59
66
|
n("span", {
|
|
60
67
|
class: "file",
|
|
61
|
-
title:
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
title: (d.fileName || "未命名工作簿") + (d.templateName ? " · 模板: " + d.templateName : "")
|
|
69
|
+
}, [
|
|
70
|
+
L(E(d.fileName || "未命名工作簿"), 1),
|
|
71
|
+
d.templateName ? (c(), v("span", Sl, " · 模板: " + E(d.templateName), 1)) : M("", !0)
|
|
72
|
+
], 8, $l),
|
|
73
|
+
n("span", El, E(d.sheetCount) + " 个工作表", 1),
|
|
74
|
+
r[10] || (r[10] = n("div", { class: "spacer" }, null, -1)),
|
|
75
|
+
n("div", Tl, [
|
|
66
76
|
n("button", {
|
|
67
77
|
class: "export-btn",
|
|
68
|
-
onClick:
|
|
78
|
+
onClick: He(u, ["stop"]),
|
|
69
79
|
title: "导出 / 打印"
|
|
70
|
-
}, [...
|
|
80
|
+
}, [...r[8] || (r[8] = [
|
|
71
81
|
L(" 导出 ", -1),
|
|
72
82
|
n("span", { class: "caret" }, "▾", -1)
|
|
73
83
|
])]),
|
|
74
|
-
|
|
84
|
+
y.value ? (c(), v("div", Ml, [
|
|
75
85
|
n("button", {
|
|
76
|
-
onClick:
|
|
86
|
+
onClick: r[0] || (r[0] = (F) => f("export-image"))
|
|
77
87
|
}, "导出为图片 (PNG)"),
|
|
78
88
|
n("button", {
|
|
79
|
-
onClick:
|
|
89
|
+
onClick: r[1] || (r[1] = (F) => f("export-pdf"))
|
|
80
90
|
}, "导出为 PDF (位图)"),
|
|
81
91
|
n("button", {
|
|
82
|
-
onClick:
|
|
92
|
+
onClick: r[2] || (r[2] = (F) => f("export-pdf-vector"))
|
|
83
93
|
}, "导出为 PDF (矢量·文字可选)"),
|
|
84
94
|
n("button", {
|
|
85
|
-
onClick:
|
|
95
|
+
onClick: r[3] || (r[3] = (F) => f("print"))
|
|
86
96
|
}, "打印…"),
|
|
87
|
-
|
|
97
|
+
r[9] || (r[9] = n("div", { class: "sep" }, null, -1)),
|
|
88
98
|
n("button", {
|
|
89
|
-
onClick:
|
|
99
|
+
onClick: r[4] || (r[4] = (F) => f("open-settings"))
|
|
90
100
|
}, "导出设置…")
|
|
91
|
-
])) :
|
|
101
|
+
])) : M("", !0)
|
|
92
102
|
]),
|
|
93
|
-
n("div",
|
|
103
|
+
n("div", Fl, [
|
|
94
104
|
n("button", {
|
|
95
|
-
onClick:
|
|
105
|
+
onClick: r[5] || (r[5] = (F) => b(d.zoom - 0.1)),
|
|
96
106
|
title: "缩小"
|
|
97
107
|
}, "−"),
|
|
98
108
|
n("select", {
|
|
99
|
-
value:
|
|
100
|
-
onChange:
|
|
109
|
+
value: d.zoom,
|
|
110
|
+
onChange: r[6] || (r[6] = (F) => b(parseFloat(F.target.value)))
|
|
101
111
|
}, [
|
|
102
|
-
(
|
|
103
|
-
key:
|
|
104
|
-
value:
|
|
105
|
-
}, E(Math.round(
|
|
106
|
-
|
|
112
|
+
(c(), v(U, null, ce(a, (F) => n("option", {
|
|
113
|
+
key: F,
|
|
114
|
+
value: F
|
|
115
|
+
}, E(Math.round(F * 100)) + "%", 9, Rl)), 64)),
|
|
116
|
+
a.includes(d.zoom) ? M("", !0) : (c(), v("option", {
|
|
107
117
|
key: 0,
|
|
108
|
-
value:
|
|
109
|
-
}, E(Math.round(
|
|
110
|
-
], 40,
|
|
118
|
+
value: d.zoom
|
|
119
|
+
}, E(Math.round(d.zoom * 100)) + "%", 9, Pl))
|
|
120
|
+
], 40, Il),
|
|
111
121
|
n("button", {
|
|
112
|
-
onClick:
|
|
122
|
+
onClick: r[7] || (r[7] = (F) => b(d.zoom + 0.1)),
|
|
113
123
|
title: "放大"
|
|
114
124
|
}, "+")
|
|
115
125
|
])
|
|
116
126
|
]));
|
|
117
127
|
}
|
|
118
|
-
}),
|
|
119
|
-
const
|
|
120
|
-
for (const [
|
|
121
|
-
|
|
122
|
-
return
|
|
123
|
-
},
|
|
128
|
+
}), X = (d, $) => {
|
|
129
|
+
const g = d.__vccOpts || d;
|
|
130
|
+
for (const [a, b] of $)
|
|
131
|
+
g[a] = b;
|
|
132
|
+
return g;
|
|
133
|
+
}, zl = /* @__PURE__ */ X(Dl, [["__scopeId", "data-v-eafc1f94"]]), Al = { class: "sheet-tabs" }, Vl = ["onClick", "title"], Ll = /* @__PURE__ */ G({
|
|
124
134
|
__name: "SheetTabs",
|
|
125
135
|
props: {
|
|
126
136
|
workbook: {},
|
|
127
137
|
active: {}
|
|
128
138
|
},
|
|
129
139
|
emits: ["select"],
|
|
130
|
-
setup(
|
|
131
|
-
const
|
|
132
|
-
return (
|
|
133
|
-
(
|
|
134
|
-
key:
|
|
135
|
-
class:
|
|
136
|
-
onClick: (
|
|
137
|
-
title:
|
|
138
|
-
}, E(
|
|
140
|
+
setup(d, { emit: $ }) {
|
|
141
|
+
const g = d, a = $, b = T(() => g.workbook.sheets.filter((y) => y.state === "visible"));
|
|
142
|
+
return (y, u) => (c(), v("div", Al, [
|
|
143
|
+
(c(!0), v(U, null, ce(b.value, (f) => (c(), v("button", {
|
|
144
|
+
key: f.index,
|
|
145
|
+
class: B(["tab", { active: f.index === d.active }]),
|
|
146
|
+
onClick: (p) => a("select", f.index),
|
|
147
|
+
title: f.name
|
|
148
|
+
}, E(f.name), 11, Vl))), 128))
|
|
139
149
|
]));
|
|
140
150
|
}
|
|
141
|
-
}),
|
|
151
|
+
}), Nl = /* @__PURE__ */ X(Ll, [["__scopeId", "data-v-431b6f9c"]]), Bl = {
|
|
142
152
|
class: "dlg",
|
|
143
153
|
role: "dialog",
|
|
144
154
|
"aria-label": "导出设置"
|
|
145
|
-
},
|
|
155
|
+
}, Wl = { class: "dlg-head" }, Ol = { class: "dlg-body" }, Hl = { class: "field" }, Ul = { class: "opts" }, Kl = ["disabled"], ql = {
|
|
146
156
|
key: 0,
|
|
147
157
|
class: "hint"
|
|
148
|
-
},
|
|
158
|
+
}, _l = {
|
|
149
159
|
key: 1,
|
|
150
160
|
class: "hint"
|
|
151
|
-
},
|
|
161
|
+
}, Jl = { class: "field" }, jl = { class: "field" }, Gl = { class: "opts inline" }, Xl = { class: "field" }, Zl = { class: "opts" }, Ql = { class: "field" }, Yl = { class: "opts inline" }, en = { class: "dlg-foot" }, tn = /* @__PURE__ */ G({
|
|
152
162
|
__name: "ExportDialog",
|
|
153
163
|
props: {
|
|
154
164
|
selection: {},
|
|
155
165
|
sheetCount: {}
|
|
156
166
|
},
|
|
157
167
|
emits: ["close", "export"],
|
|
158
|
-
setup(
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
return !!
|
|
162
|
-
}),
|
|
163
|
-
const
|
|
164
|
-
return
|
|
165
|
-
}),
|
|
168
|
+
setup(d, { emit: $ }) {
|
|
169
|
+
const g = d, a = $, b = T(() => {
|
|
170
|
+
const p = g.selection;
|
|
171
|
+
return !!p && !(p.top === p.bottom && p.left === p.right);
|
|
172
|
+
}), y = T(() => {
|
|
173
|
+
const p = g.selection;
|
|
174
|
+
return p ? `${Re(p.left)}${p.top + 1}:${Re(p.right)}${p.bottom + 1}` : "";
|
|
175
|
+
}), u = Mt({
|
|
166
176
|
action: "png",
|
|
167
|
-
scope:
|
|
177
|
+
scope: b.value ? "selection" : "sheet",
|
|
168
178
|
scale: 2,
|
|
169
179
|
includeHeaders: !1,
|
|
170
180
|
gridlines: !0,
|
|
@@ -173,187 +183,187 @@ const _t = { class: "toolbar" }, qt = ["title"], Kt = { class: "meta" }, Jt = {
|
|
|
173
183
|
fitToWidth: !0,
|
|
174
184
|
pdfVector: !1
|
|
175
185
|
});
|
|
176
|
-
function
|
|
177
|
-
|
|
186
|
+
function f(p) {
|
|
187
|
+
a("export", { ...u, action: p });
|
|
178
188
|
}
|
|
179
|
-
return (
|
|
189
|
+
return (p, o) => (c(), v("div", {
|
|
180
190
|
class: "dlg-mask",
|
|
181
|
-
onClick:
|
|
191
|
+
onClick: o[16] || (o[16] = He((r) => a("close"), ["self"]))
|
|
182
192
|
}, [
|
|
183
|
-
n("div",
|
|
184
|
-
n("div",
|
|
185
|
-
|
|
193
|
+
n("div", Bl, [
|
|
194
|
+
n("div", Wl, [
|
|
195
|
+
o[17] || (o[17] = n("span", null, "导出 / 打印设置", -1)),
|
|
186
196
|
n("button", {
|
|
187
197
|
class: "x",
|
|
188
|
-
onClick:
|
|
198
|
+
onClick: o[0] || (o[0] = (r) => a("close")),
|
|
189
199
|
title: "关闭"
|
|
190
200
|
}, "×")
|
|
191
201
|
]),
|
|
192
|
-
n("div",
|
|
193
|
-
n("div",
|
|
194
|
-
|
|
195
|
-
n("div",
|
|
202
|
+
n("div", Ol, [
|
|
203
|
+
n("div", Hl, [
|
|
204
|
+
o[20] || (o[20] = n("label", { class: "lbl" }, "范围", -1)),
|
|
205
|
+
n("div", Ul, [
|
|
196
206
|
n("label", {
|
|
197
|
-
class:
|
|
207
|
+
class: B({ disabled: !b.value })
|
|
198
208
|
}, [
|
|
199
|
-
|
|
209
|
+
N(n("input", {
|
|
200
210
|
type: "radio",
|
|
201
211
|
value: "selection",
|
|
202
|
-
"onUpdate:modelValue":
|
|
203
|
-
disabled: !
|
|
204
|
-
}, null, 8,
|
|
205
|
-
[
|
|
212
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => u.scope = r),
|
|
213
|
+
disabled: !b.value
|
|
214
|
+
}, null, 8, Kl), [
|
|
215
|
+
[Fe, u.scope]
|
|
206
216
|
]),
|
|
207
|
-
|
|
208
|
-
|
|
217
|
+
o[18] || (o[18] = L(" 当前选区 ", -1)),
|
|
218
|
+
b.value ? (c(), v("span", ql, E(y.value), 1)) : (c(), v("span", _l, "(未选多格)"))
|
|
209
219
|
], 2),
|
|
210
220
|
n("label", null, [
|
|
211
|
-
|
|
221
|
+
N(n("input", {
|
|
212
222
|
type: "radio",
|
|
213
223
|
value: "sheet",
|
|
214
|
-
"onUpdate:modelValue":
|
|
224
|
+
"onUpdate:modelValue": o[2] || (o[2] = (r) => u.scope = r)
|
|
215
225
|
}, null, 512), [
|
|
216
|
-
[
|
|
226
|
+
[Fe, u.scope]
|
|
217
227
|
]),
|
|
218
|
-
|
|
228
|
+
o[19] || (o[19] = L(" 当前工作表", -1))
|
|
219
229
|
]),
|
|
220
230
|
n("label", null, [
|
|
221
|
-
|
|
231
|
+
N(n("input", {
|
|
222
232
|
type: "radio",
|
|
223
233
|
value: "all",
|
|
224
|
-
"onUpdate:modelValue":
|
|
234
|
+
"onUpdate:modelValue": o[3] || (o[3] = (r) => u.scope = r)
|
|
225
235
|
}, null, 512), [
|
|
226
|
-
[
|
|
236
|
+
[Fe, u.scope]
|
|
227
237
|
]),
|
|
228
|
-
L(" 全部工作表 (" + E(
|
|
238
|
+
L(" 全部工作表 (" + E(d.sheetCount) + ")", 1)
|
|
229
239
|
])
|
|
230
240
|
])
|
|
231
241
|
]),
|
|
232
|
-
n("div",
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"onUpdate:modelValue":
|
|
236
|
-
}, [...
|
|
242
|
+
n("div", Jl, [
|
|
243
|
+
o[22] || (o[22] = n("label", { class: "lbl" }, "清晰度", -1)),
|
|
244
|
+
N(n("select", {
|
|
245
|
+
"onUpdate:modelValue": o[4] || (o[4] = (r) => u.scale = r)
|
|
246
|
+
}, [...o[21] || (o[21] = [
|
|
237
247
|
n("option", { value: 1 }, "标准 (1×)", -1),
|
|
238
248
|
n("option", { value: 2 }, "高清 (2×)", -1),
|
|
239
249
|
n("option", { value: 3 }, "超清 (3×)", -1)
|
|
240
250
|
])], 512), [
|
|
241
251
|
[
|
|
242
|
-
|
|
243
|
-
|
|
252
|
+
ut,
|
|
253
|
+
u.scale,
|
|
244
254
|
void 0,
|
|
245
255
|
{ number: !0 }
|
|
246
256
|
]
|
|
247
257
|
])
|
|
248
258
|
]),
|
|
249
|
-
n("div",
|
|
250
|
-
|
|
251
|
-
n("div",
|
|
259
|
+
n("div", jl, [
|
|
260
|
+
o[25] || (o[25] = n("label", { class: "lbl" }, "内容", -1)),
|
|
261
|
+
n("div", Gl, [
|
|
252
262
|
n("label", null, [
|
|
253
|
-
|
|
263
|
+
N(n("input", {
|
|
254
264
|
type: "checkbox",
|
|
255
|
-
"onUpdate:modelValue":
|
|
265
|
+
"onUpdate:modelValue": o[5] || (o[5] = (r) => u.includeHeaders = r)
|
|
256
266
|
}, null, 512), [
|
|
257
|
-
[
|
|
267
|
+
[rt, u.includeHeaders]
|
|
258
268
|
]),
|
|
259
|
-
|
|
269
|
+
o[23] || (o[23] = L(" 含行列号", -1))
|
|
260
270
|
]),
|
|
261
271
|
n("label", null, [
|
|
262
|
-
|
|
272
|
+
N(n("input", {
|
|
263
273
|
type: "checkbox",
|
|
264
|
-
"onUpdate:modelValue":
|
|
274
|
+
"onUpdate:modelValue": o[6] || (o[6] = (r) => u.gridlines = r)
|
|
265
275
|
}, null, 512), [
|
|
266
|
-
[
|
|
276
|
+
[rt, u.gridlines]
|
|
267
277
|
]),
|
|
268
|
-
|
|
278
|
+
o[24] || (o[24] = L(" 网格线", -1))
|
|
269
279
|
])
|
|
270
280
|
])
|
|
271
281
|
]),
|
|
272
|
-
n("div",
|
|
273
|
-
|
|
274
|
-
n("div",
|
|
282
|
+
n("div", Xl, [
|
|
283
|
+
o[30] || (o[30] = n("label", { class: "lbl" }, "PDF 类型", -1)),
|
|
284
|
+
n("div", Zl, [
|
|
275
285
|
n("label", null, [
|
|
276
|
-
|
|
286
|
+
N(n("input", {
|
|
277
287
|
type: "radio",
|
|
278
288
|
value: !1,
|
|
279
|
-
"onUpdate:modelValue":
|
|
289
|
+
"onUpdate:modelValue": o[7] || (o[7] = (r) => u.pdfVector = r)
|
|
280
290
|
}, null, 512), [
|
|
281
|
-
[
|
|
291
|
+
[Fe, u.pdfVector]
|
|
282
292
|
]),
|
|
283
|
-
|
|
284
|
-
|
|
293
|
+
o[26] || (o[26] = L(" 位图 ", -1)),
|
|
294
|
+
o[27] || (o[27] = n("span", { class: "hint" }, "(完整还原观感)", -1))
|
|
285
295
|
]),
|
|
286
296
|
n("label", null, [
|
|
287
|
-
|
|
297
|
+
N(n("input", {
|
|
288
298
|
type: "radio",
|
|
289
299
|
value: !0,
|
|
290
|
-
"onUpdate:modelValue":
|
|
300
|
+
"onUpdate:modelValue": o[8] || (o[8] = (r) => u.pdfVector = r)
|
|
291
301
|
}, null, 512), [
|
|
292
|
-
[
|
|
302
|
+
[Fe, u.pdfVector]
|
|
293
303
|
]),
|
|
294
|
-
|
|
295
|
-
|
|
304
|
+
o[28] || (o[28] = L(" 矢量 ", -1)),
|
|
305
|
+
o[29] || (o[29] = n("span", { class: "hint" }, "(文字可选可搜·清晰·文件小;中文需注册字体,否则该格转图)", -1))
|
|
296
306
|
])
|
|
297
307
|
])
|
|
298
308
|
]),
|
|
299
|
-
n("div",
|
|
300
|
-
|
|
309
|
+
n("div", Ql, [
|
|
310
|
+
o[34] || (o[34] = n("label", { class: "lbl" }, [
|
|
301
311
|
L("纸张 "),
|
|
302
312
|
n("span", { class: "hint" }, "(PDF/打印)")
|
|
303
313
|
], -1)),
|
|
304
|
-
n("div",
|
|
305
|
-
|
|
306
|
-
"onUpdate:modelValue":
|
|
307
|
-
}, [...
|
|
314
|
+
n("div", Yl, [
|
|
315
|
+
N(n("select", {
|
|
316
|
+
"onUpdate:modelValue": o[9] || (o[9] = (r) => u.format = r)
|
|
317
|
+
}, [...o[31] || (o[31] = [
|
|
308
318
|
n("option", { value: "auto" }, "自动(跟随表)", -1),
|
|
309
319
|
n("option", { value: "a4" }, "A4", -1),
|
|
310
320
|
n("option", { value: "a3" }, "A3", -1),
|
|
311
321
|
n("option", { value: "letter" }, "Letter", -1)
|
|
312
322
|
])], 512), [
|
|
313
|
-
[
|
|
323
|
+
[ut, u.format]
|
|
314
324
|
]),
|
|
315
|
-
|
|
316
|
-
"onUpdate:modelValue":
|
|
317
|
-
}, [...
|
|
325
|
+
N(n("select", {
|
|
326
|
+
"onUpdate:modelValue": o[10] || (o[10] = (r) => u.orientation = r)
|
|
327
|
+
}, [...o[32] || (o[32] = [
|
|
318
328
|
n("option", { value: "auto" }, "方向: 自动", -1),
|
|
319
329
|
n("option", { value: "portrait" }, "纵向", -1),
|
|
320
330
|
n("option", { value: "landscape" }, "横向", -1)
|
|
321
331
|
])], 512), [
|
|
322
|
-
[
|
|
332
|
+
[ut, u.orientation]
|
|
323
333
|
]),
|
|
324
334
|
n("label", null, [
|
|
325
|
-
|
|
335
|
+
N(n("input", {
|
|
326
336
|
type: "checkbox",
|
|
327
|
-
"onUpdate:modelValue":
|
|
337
|
+
"onUpdate:modelValue": o[11] || (o[11] = (r) => u.fitToWidth = r)
|
|
328
338
|
}, null, 512), [
|
|
329
|
-
[
|
|
339
|
+
[rt, u.fitToWidth]
|
|
330
340
|
]),
|
|
331
|
-
|
|
341
|
+
o[33] || (o[33] = L(" 适应页宽", -1))
|
|
332
342
|
])
|
|
333
343
|
])
|
|
334
344
|
])
|
|
335
345
|
]),
|
|
336
|
-
n("div",
|
|
346
|
+
n("div", en, [
|
|
337
347
|
n("button", {
|
|
338
348
|
class: "ghost",
|
|
339
|
-
onClick:
|
|
349
|
+
onClick: o[12] || (o[12] = (r) => a("close"))
|
|
340
350
|
}, "取消"),
|
|
341
|
-
|
|
351
|
+
o[35] || (o[35] = n("div", { class: "grow" }, null, -1)),
|
|
342
352
|
n("button", {
|
|
343
|
-
onClick:
|
|
353
|
+
onClick: o[13] || (o[13] = (r) => f("png"))
|
|
344
354
|
}, "导出 PNG"),
|
|
345
355
|
n("button", {
|
|
346
|
-
onClick:
|
|
356
|
+
onClick: o[14] || (o[14] = (r) => f("pdf"))
|
|
347
357
|
}, "导出 PDF"),
|
|
348
358
|
n("button", {
|
|
349
359
|
class: "primary",
|
|
350
|
-
onClick:
|
|
360
|
+
onClick: o[15] || (o[15] = (r) => f("print"))
|
|
351
361
|
}, "打印…")
|
|
352
362
|
])
|
|
353
363
|
])
|
|
354
364
|
]));
|
|
355
365
|
}
|
|
356
|
-
}),
|
|
366
|
+
}), ln = /* @__PURE__ */ X(tn, [["__scopeId", "data-v-544df24f"]]), nn = ["value"], sn = ["disabled"], on = ["disabled"], an = /* @__PURE__ */ G({
|
|
357
367
|
__name: "FindBar",
|
|
358
368
|
props: {
|
|
359
369
|
query: {},
|
|
@@ -363,70 +373,70 @@ const _t = { class: "toolbar" }, qt = ["title"], Kt = { class: "meta" }, Jt = {
|
|
|
363
373
|
wholeCell: { type: Boolean }
|
|
364
374
|
},
|
|
365
375
|
emits: ["update:query", "update:matchCase", "update:wholeCell", "next", "prev", "close"],
|
|
366
|
-
setup(
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
var
|
|
370
|
-
return (
|
|
376
|
+
setup(d, { expose: $, emit: g }) {
|
|
377
|
+
const a = g, b = x(null);
|
|
378
|
+
Ue(() => {
|
|
379
|
+
var u;
|
|
380
|
+
return (u = b.value) == null ? void 0 : u.focus();
|
|
371
381
|
});
|
|
372
|
-
function
|
|
373
|
-
var
|
|
374
|
-
(
|
|
382
|
+
function y(u) {
|
|
383
|
+
var f;
|
|
384
|
+
(u.ctrlKey || u.metaKey) && (u.key === "f" || u.key === "F") ? (u.preventDefault(), (f = b.value) == null || f.select()) : u.key === "Enter" ? (u.preventDefault(), u.shiftKey ? a("prev") : a("next")) : u.key === "Escape" && (u.preventDefault(), a("close"));
|
|
375
385
|
}
|
|
376
|
-
return
|
|
377
|
-
var
|
|
378
|
-
return (
|
|
379
|
-
} }), (
|
|
386
|
+
return $({ focus: () => {
|
|
387
|
+
var u;
|
|
388
|
+
return (u = b.value) == null ? void 0 : u.focus();
|
|
389
|
+
} }), (u, f) => (c(), v("div", {
|
|
380
390
|
class: "find-bar",
|
|
381
|
-
onKeydown:
|
|
391
|
+
onKeydown: f[6] || (f[6] = He(() => {
|
|
382
392
|
}, ["stop"]))
|
|
383
393
|
}, [
|
|
384
394
|
n("input", {
|
|
385
395
|
ref_key: "inputEl",
|
|
386
|
-
ref:
|
|
396
|
+
ref: b,
|
|
387
397
|
class: "q",
|
|
388
398
|
type: "text",
|
|
389
399
|
placeholder: "查找…",
|
|
390
|
-
value:
|
|
391
|
-
onInput:
|
|
392
|
-
onKeydown:
|
|
393
|
-
}, null, 40,
|
|
400
|
+
value: d.query,
|
|
401
|
+
onInput: f[0] || (f[0] = (p) => a("update:query", p.target.value)),
|
|
402
|
+
onKeydown: y
|
|
403
|
+
}, null, 40, nn),
|
|
394
404
|
n("span", {
|
|
395
|
-
class:
|
|
396
|
-
}, E(
|
|
405
|
+
class: B(["count", { none: d.query && d.matchCount === 0 }])
|
|
406
|
+
}, E(d.matchCount ? `${d.current + 1}/${d.matchCount}` : d.query ? "无结果" : ""), 3),
|
|
397
407
|
n("button", {
|
|
398
|
-
class:
|
|
408
|
+
class: B(["opt", { on: d.matchCase }]),
|
|
399
409
|
title: "区分大小写",
|
|
400
|
-
onClick:
|
|
410
|
+
onClick: f[1] || (f[1] = (p) => a("update:matchCase", !d.matchCase))
|
|
401
411
|
}, "Aa", 2),
|
|
402
412
|
n("button", {
|
|
403
|
-
class:
|
|
413
|
+
class: B(["opt", { on: d.wholeCell }]),
|
|
404
414
|
title: "全字匹配(整格相等)",
|
|
405
|
-
onClick:
|
|
415
|
+
onClick: f[2] || (f[2] = (p) => a("update:wholeCell", !d.wholeCell))
|
|
406
416
|
}, "▢", 2),
|
|
407
417
|
n("button", {
|
|
408
418
|
class: "nav",
|
|
409
419
|
title: "上一个 (Shift+Enter)",
|
|
410
|
-
disabled: !
|
|
411
|
-
onClick:
|
|
412
|
-
}, "▲", 8,
|
|
420
|
+
disabled: !d.matchCount,
|
|
421
|
+
onClick: f[3] || (f[3] = (p) => a("prev"))
|
|
422
|
+
}, "▲", 8, sn),
|
|
413
423
|
n("button", {
|
|
414
424
|
class: "nav",
|
|
415
425
|
title: "下一个 (Enter)",
|
|
416
|
-
disabled: !
|
|
417
|
-
onClick:
|
|
418
|
-
}, "▼", 8,
|
|
426
|
+
disabled: !d.matchCount,
|
|
427
|
+
onClick: f[4] || (f[4] = (p) => a("next"))
|
|
428
|
+
}, "▼", 8, on),
|
|
419
429
|
n("button", {
|
|
420
430
|
class: "close",
|
|
421
431
|
title: "关闭 (Esc)",
|
|
422
|
-
onClick:
|
|
432
|
+
onClick: f[5] || (f[5] = (p) => a("close"))
|
|
423
433
|
}, "×")
|
|
424
434
|
], 32));
|
|
425
435
|
}
|
|
426
|
-
}),
|
|
436
|
+
}), un = /* @__PURE__ */ X(an, [["__scopeId", "data-v-36abc020"]]), rn = { class: "sort" }, dn = { class: "all" }, cn = ["checked"], vn = { class: "list" }, fn = ["checked", "onChange"], mn = ["title"], pn = {
|
|
427
437
|
key: 0,
|
|
428
438
|
class: "empty"
|
|
429
|
-
},
|
|
439
|
+
}, gn = { class: "foot" }, yn = /* @__PURE__ */ G({
|
|
430
440
|
__name: "FilterPopup",
|
|
431
441
|
props: {
|
|
432
442
|
values: {},
|
|
@@ -436,95 +446,95 @@ const _t = { class: "toolbar" }, qt = ["title"], Kt = { class: "meta" }, Jt = {
|
|
|
436
446
|
sortDir: {}
|
|
437
447
|
},
|
|
438
448
|
emits: ["apply", "clear", "close", "sort"],
|
|
439
|
-
setup(
|
|
440
|
-
const
|
|
441
|
-
const
|
|
442
|
-
return
|
|
443
|
-
}),
|
|
444
|
-
function
|
|
445
|
-
|
|
446
|
-
}
|
|
447
|
-
function s() {
|
|
448
|
-
const D = !m.value;
|
|
449
|
-
for (const $ of r.value) D ? g.add($) : g.delete($);
|
|
449
|
+
setup(d, { emit: $ }) {
|
|
450
|
+
const g = d, a = $, b = x(""), y = Mt(new Set(g.selected.length ? g.selected : g.values)), u = T(() => {
|
|
451
|
+
const P = b.value.trim().toLowerCase();
|
|
452
|
+
return P ? g.values.filter((I) => I.toLowerCase().includes(P)) : g.values;
|
|
453
|
+
}), f = T(() => u.value.length > 0 && u.value.every((P) => y.has(P)));
|
|
454
|
+
function p(P) {
|
|
455
|
+
y.has(P) ? y.delete(P) : y.add(P);
|
|
450
456
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
457
|
+
function o() {
|
|
458
|
+
const P = !f.value;
|
|
459
|
+
for (const I of u.value) P ? y.add(I) : y.delete(I);
|
|
460
|
+
}
|
|
461
|
+
function r() {
|
|
462
|
+
a("apply", [...y]);
|
|
453
463
|
}
|
|
454
|
-
const
|
|
455
|
-
function P
|
|
456
|
-
|
|
464
|
+
const F = x(null);
|
|
465
|
+
function A(P) {
|
|
466
|
+
F.value && !F.value.contains(P.target) && a("close");
|
|
457
467
|
}
|
|
458
|
-
return
|
|
468
|
+
return Ue(() => setTimeout(() => document.addEventListener("mousedown", A), 0)), Oe(() => document.removeEventListener("mousedown", A)), (P, I) => (c(), v("div", {
|
|
459
469
|
class: "filter-pop",
|
|
460
470
|
ref_key: "rootEl",
|
|
461
|
-
ref:
|
|
462
|
-
style:
|
|
463
|
-
onKeydown:
|
|
471
|
+
ref: F,
|
|
472
|
+
style: Be({ left: d.x + "px", top: d.y + "px" }),
|
|
473
|
+
onKeydown: I[5] || (I[5] = He(() => {
|
|
464
474
|
}, ["stop"]))
|
|
465
475
|
}, [
|
|
466
|
-
n("div",
|
|
476
|
+
n("div", rn, [
|
|
467
477
|
n("button", {
|
|
468
|
-
class:
|
|
469
|
-
onClick:
|
|
478
|
+
class: B({ on: d.sortDir === "asc" }),
|
|
479
|
+
onClick: I[0] || (I[0] = (k) => a("sort", "asc")),
|
|
470
480
|
title: "升序"
|
|
471
481
|
}, "↑ 升序", 2),
|
|
472
482
|
n("button", {
|
|
473
|
-
class:
|
|
474
|
-
onClick:
|
|
483
|
+
class: B({ on: d.sortDir === "desc" }),
|
|
484
|
+
onClick: I[1] || (I[1] = (k) => a("sort", "desc")),
|
|
475
485
|
title: "降序"
|
|
476
486
|
}, "↓ 降序", 2)
|
|
477
487
|
]),
|
|
478
|
-
|
|
488
|
+
N(n("input", {
|
|
479
489
|
class: "search",
|
|
480
490
|
type: "text",
|
|
481
491
|
placeholder: "搜索…",
|
|
482
|
-
"onUpdate:modelValue":
|
|
492
|
+
"onUpdate:modelValue": I[2] || (I[2] = (k) => b.value = k)
|
|
483
493
|
}, null, 512), [
|
|
484
|
-
[
|
|
494
|
+
[rl, b.value]
|
|
485
495
|
]),
|
|
486
|
-
n("label",
|
|
496
|
+
n("label", dn, [
|
|
487
497
|
n("input", {
|
|
488
498
|
type: "checkbox",
|
|
489
|
-
checked:
|
|
490
|
-
onChange:
|
|
491
|
-
}, null, 40,
|
|
492
|
-
|
|
499
|
+
checked: f.value,
|
|
500
|
+
onChange: o
|
|
501
|
+
}, null, 40, cn),
|
|
502
|
+
I[6] || (I[6] = L(" (全选) ", -1))
|
|
493
503
|
]),
|
|
494
|
-
n("div",
|
|
495
|
-
(
|
|
496
|
-
key:
|
|
504
|
+
n("div", vn, [
|
|
505
|
+
(c(!0), v(U, null, ce(u.value, (k) => (c(), v("label", {
|
|
506
|
+
key: k,
|
|
497
507
|
class: "row"
|
|
498
508
|
}, [
|
|
499
509
|
n("input", {
|
|
500
510
|
type: "checkbox",
|
|
501
|
-
checked:
|
|
502
|
-
onChange: (
|
|
503
|
-
}, null, 40,
|
|
511
|
+
checked: y.has(k),
|
|
512
|
+
onChange: (K) => p(k)
|
|
513
|
+
}, null, 40, fn),
|
|
504
514
|
n("span", {
|
|
505
515
|
class: "val",
|
|
506
|
-
title:
|
|
507
|
-
}, E(
|
|
516
|
+
title: k
|
|
517
|
+
}, E(k), 9, mn)
|
|
508
518
|
]))), 128)),
|
|
509
|
-
|
|
519
|
+
u.value.length ? M("", !0) : (c(), v("div", pn, "无匹配值"))
|
|
510
520
|
]),
|
|
511
|
-
n("div",
|
|
521
|
+
n("div", gn, [
|
|
512
522
|
n("button", {
|
|
513
523
|
class: "link",
|
|
514
|
-
onClick:
|
|
524
|
+
onClick: I[3] || (I[3] = (k) => a("clear"))
|
|
515
525
|
}, "清除筛选"),
|
|
516
|
-
|
|
526
|
+
I[7] || (I[7] = n("div", { class: "grow" }, null, -1)),
|
|
517
527
|
n("button", {
|
|
518
|
-
onClick:
|
|
528
|
+
onClick: I[4] || (I[4] = (k) => a("close"))
|
|
519
529
|
}, "取消"),
|
|
520
530
|
n("button", {
|
|
521
531
|
class: "primary",
|
|
522
|
-
onClick:
|
|
532
|
+
onClick: r
|
|
523
533
|
}, "确定")
|
|
524
534
|
])
|
|
525
535
|
], 36));
|
|
526
536
|
}
|
|
527
|
-
}),
|
|
537
|
+
}), bn = /* @__PURE__ */ X(yn, [["__scopeId", "data-v-4b0bc283"]]), Ne = {
|
|
528
538
|
// 放大镜
|
|
529
539
|
find: '<circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>',
|
|
530
540
|
// 漏斗
|
|
@@ -541,501 +551,713 @@ const _t = { class: "toolbar" }, qt = ["title"], Kt = { class: "meta" }, Jt = {
|
|
|
541
551
|
copy: '<rect x="9" y="9" width="11" height="11" rx="1.5"/><path d="M5 15H4V5a1 1 0 0 1 1-1h10v1"/>',
|
|
542
552
|
// 十字线(冻结行列)
|
|
543
553
|
freeze: '<line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="3" x2="9" y2="21"/>',
|
|
554
|
+
// 自动换行:两条文本线 + 折回箭头
|
|
555
|
+
"wrap-text": '<line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="10" y2="18"/><path d="M3 12h15a3 3 0 0 1 0 6h-3"/><polyline points="17 15 14 18 17 21"/>',
|
|
556
|
+
// 模板:文档 + 排版网格
|
|
557
|
+
template: '<rect x="4" y="3" width="16" height="18" rx="1.5"/><line x1="4" y1="8" x2="20" y2="8"/><line x1="8" y1="12" x2="16" y2="12"/><line x1="8" y1="16" x2="16" y2="16"/>',
|
|
558
|
+
// 图片工具:山+太阳的图片框 + 小齿轮(批量转换)
|
|
559
|
+
"image-tools": '<rect x="3" y="4" width="14" height="14" rx="1.5"/><circle cx="8" cy="9" r="1.5"/><polyline points="3 16 7 12 11 16 14 13 17 16"/><path d="M19 19l2 2M19 21l2-2"/>',
|
|
544
560
|
// 三点(更多)
|
|
545
561
|
more: '<circle cx="5" cy="12" r="1.6" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.6" fill="currentColor" stroke="none"/><circle cx="19" cy="12" r="1.6" fill="currentColor" stroke="none"/>',
|
|
546
562
|
// 下拉小箭头
|
|
547
563
|
caret: '<path d="M6 9l6 6 6-6"/>'
|
|
548
564
|
};
|
|
549
|
-
function
|
|
550
|
-
return '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
|
|
565
|
+
function Ie(d) {
|
|
566
|
+
return '<svg viewBox="0 0 24 24" width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' + d + "</svg>";
|
|
551
567
|
}
|
|
552
|
-
const
|
|
568
|
+
const kn = { class: "tb-menu" }, xn = {
|
|
553
569
|
key: 0,
|
|
554
570
|
class: "sep"
|
|
555
|
-
},
|
|
571
|
+
}, Cn = ["disabled", "onClick"], hn = ["innerHTML"], wn = {
|
|
556
572
|
key: 1,
|
|
557
573
|
class: "ic-e"
|
|
558
|
-
},
|
|
574
|
+
}, $n = { class: "lb" }, Sn = /* @__PURE__ */ G({
|
|
559
575
|
__name: "ToolbarMenu",
|
|
560
576
|
props: {
|
|
561
577
|
items: {}
|
|
562
578
|
},
|
|
563
579
|
emits: ["pick"],
|
|
564
|
-
setup(
|
|
565
|
-
const
|
|
566
|
-
return (
|
|
567
|
-
(
|
|
568
|
-
key:
|
|
580
|
+
setup(d, { emit: $ }) {
|
|
581
|
+
const g = $;
|
|
582
|
+
return (a, b) => (c(), v("div", kn, [
|
|
583
|
+
(c(!0), v(U, null, ce(d.items, (y) => (c(), v(U, {
|
|
584
|
+
key: y.id
|
|
569
585
|
}, [
|
|
570
|
-
|
|
586
|
+
y.type === "separator" ? (c(), v("div", xn)) : (c(), v("button", {
|
|
571
587
|
key: 1,
|
|
572
|
-
class:
|
|
573
|
-
disabled:
|
|
574
|
-
onClick: (
|
|
588
|
+
class: B(["mi", { active: y.active }]),
|
|
589
|
+
disabled: y.disabled,
|
|
590
|
+
onClick: (u) => g("pick", y)
|
|
575
591
|
}, [
|
|
576
|
-
|
|
592
|
+
y.iconSvg ? (c(), v("span", {
|
|
577
593
|
key: 0,
|
|
578
594
|
class: "ic",
|
|
579
|
-
innerHTML:
|
|
580
|
-
}, null, 8,
|
|
581
|
-
n("span",
|
|
582
|
-
], 10,
|
|
595
|
+
innerHTML: w(Ie)(y.iconSvg)
|
|
596
|
+
}, null, 8, hn)) : y.icon ? (c(), v("span", wn, E(y.icon), 1)) : M("", !0),
|
|
597
|
+
n("span", $n, E(y.label || y.id), 1)
|
|
598
|
+
], 10, Cn))
|
|
583
599
|
], 64))), 128))
|
|
584
600
|
]));
|
|
585
601
|
}
|
|
586
|
-
}),
|
|
602
|
+
}), Et = /* @__PURE__ */ X(Sn, [["__scopeId", "data-v-322e2c67"]]), En = {
|
|
587
603
|
key: 0,
|
|
588
604
|
class: "divider"
|
|
589
|
-
},
|
|
605
|
+
}, Tn = {
|
|
590
606
|
key: 1,
|
|
591
607
|
class: "tool"
|
|
592
|
-
},
|
|
608
|
+
}, Mn = ["innerHTML"], Fn = {
|
|
593
609
|
key: 1,
|
|
594
610
|
class: "ic-e"
|
|
595
|
-
},
|
|
611
|
+
}, In = {
|
|
596
612
|
key: 2,
|
|
597
613
|
class: "lb"
|
|
598
|
-
},
|
|
614
|
+
}, Rn = ["innerHTML"], Pn = {
|
|
599
615
|
key: 0,
|
|
600
616
|
class: "divider"
|
|
601
|
-
},
|
|
617
|
+
}, Dn = {
|
|
602
618
|
key: 1,
|
|
603
619
|
class: "dd"
|
|
604
|
-
},
|
|
620
|
+
}, zn = ["disabled", "title", "onClick"], An = ["innerHTML"], Vn = {
|
|
605
621
|
key: 1,
|
|
606
622
|
class: "ic-e"
|
|
607
|
-
},
|
|
623
|
+
}, Ln = {
|
|
608
624
|
key: 2,
|
|
609
625
|
class: "lb"
|
|
610
|
-
},
|
|
626
|
+
}, Nn = ["innerHTML"], Bn = {
|
|
611
627
|
key: 0,
|
|
612
628
|
class: "dd more"
|
|
613
|
-
},
|
|
629
|
+
}, Wn = ["innerHTML"], On = 46, Tt = 4, Hn = /* @__PURE__ */ G({
|
|
614
630
|
__name: "ActionToolbar",
|
|
615
631
|
props: {
|
|
616
632
|
items: {}
|
|
617
633
|
},
|
|
618
|
-
setup(
|
|
619
|
-
const
|
|
620
|
-
function
|
|
621
|
-
var
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
}
|
|
625
|
-
const
|
|
626
|
-
const
|
|
627
|
-
if (!
|
|
628
|
-
let
|
|
629
|
-
for (let
|
|
630
|
-
if (
|
|
631
|
-
|
|
634
|
+
setup(d) {
|
|
635
|
+
const $ = d, g = x(null), a = x(null), b = x([]), y = x(0), u = x(null);
|
|
636
|
+
function f() {
|
|
637
|
+
var V;
|
|
638
|
+
const h = a.value;
|
|
639
|
+
h && (b.value = Array.from(h.children).map((C) => C.offsetWidth), y.value = ((V = g.value) == null ? void 0 : V.clientWidth) ?? 0);
|
|
640
|
+
}
|
|
641
|
+
const p = T(() => {
|
|
642
|
+
const h = y.value, V = b.value;
|
|
643
|
+
if (!h || V.length !== $.items.length) return $.items.length;
|
|
644
|
+
let C = 0, ue = !0;
|
|
645
|
+
for (let O = 0; O < $.items.length; O++)
|
|
646
|
+
if (C += V[O] + Tt, C > h) {
|
|
647
|
+
ue = !1;
|
|
632
648
|
break;
|
|
633
649
|
}
|
|
634
|
-
if (
|
|
635
|
-
let
|
|
636
|
-
for (let
|
|
637
|
-
|
|
638
|
-
return Math.max(0,
|
|
639
|
-
}),
|
|
640
|
-
function
|
|
641
|
-
|
|
642
|
-
}
|
|
643
|
-
function
|
|
644
|
-
var
|
|
645
|
-
|
|
646
|
-
}
|
|
647
|
-
function
|
|
648
|
-
var
|
|
649
|
-
|
|
650
|
-
}
|
|
651
|
-
function
|
|
652
|
-
|
|
653
|
-
}
|
|
654
|
-
function
|
|
655
|
-
return
|
|
656
|
-
}
|
|
657
|
-
let
|
|
658
|
-
function
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
return
|
|
662
|
-
|
|
663
|
-
var
|
|
664
|
-
return
|
|
665
|
-
}),
|
|
666
|
-
}),
|
|
667
|
-
|
|
668
|
-
}),
|
|
669
|
-
() =>
|
|
670
|
-
() =>
|
|
671
|
-
), (
|
|
650
|
+
if (ue) return $.items.length;
|
|
651
|
+
let ve = On, fe = 0;
|
|
652
|
+
for (let O = 0; O < $.items.length && (ve += V[O] + Tt, !(ve > h)); O++)
|
|
653
|
+
fe++;
|
|
654
|
+
return Math.max(0, fe);
|
|
655
|
+
}), o = T(() => $.items.slice(0, p.value)), r = T(() => $.items.slice(p.value)), F = Ne.more;
|
|
656
|
+
function A(h) {
|
|
657
|
+
u.value = u.value === h ? null : h;
|
|
658
|
+
}
|
|
659
|
+
function P(h) {
|
|
660
|
+
var V;
|
|
661
|
+
h.disabled || (V = h.onClick) == null || V.call(h);
|
|
662
|
+
}
|
|
663
|
+
function I(h) {
|
|
664
|
+
var V;
|
|
665
|
+
h.disabled || ((V = h.items) != null && V.length ? A(h.id) : (P(h), u.value = null));
|
|
666
|
+
}
|
|
667
|
+
function k(h) {
|
|
668
|
+
P(h), u.value = null;
|
|
669
|
+
}
|
|
670
|
+
function K(h) {
|
|
671
|
+
return h.iconSvg ? Ie(h.iconSvg) : null;
|
|
672
|
+
}
|
|
673
|
+
let q = null;
|
|
674
|
+
function te(h) {
|
|
675
|
+
g.value && !g.value.contains(h.target) && (u.value = null);
|
|
676
|
+
}
|
|
677
|
+
return Ue(() => {
|
|
678
|
+
We(f), q = new ResizeObserver(() => {
|
|
679
|
+
var h;
|
|
680
|
+
return y.value = ((h = g.value) == null ? void 0 : h.clientWidth) ?? 0;
|
|
681
|
+
}), g.value && q.observe(g.value), document.addEventListener("mousedown", te);
|
|
682
|
+
}), Oe(() => {
|
|
683
|
+
q == null || q.disconnect(), document.removeEventListener("mousedown", te);
|
|
684
|
+
}), z(
|
|
685
|
+
() => $.items.map((h) => h.id + (h.label ?? "")).join("|"),
|
|
686
|
+
() => We(f)
|
|
687
|
+
), (h, V) => (c(), v("div", {
|
|
672
688
|
class: "action-toolbar",
|
|
673
689
|
ref_key: "containerEl",
|
|
674
|
-
ref:
|
|
690
|
+
ref: g
|
|
675
691
|
}, [
|
|
676
692
|
n("div", {
|
|
677
693
|
class: "measure",
|
|
678
694
|
ref_key: "measureEl",
|
|
679
|
-
ref:
|
|
695
|
+
ref: a,
|
|
680
696
|
"aria-hidden": "true"
|
|
681
697
|
}, [
|
|
682
|
-
(
|
|
683
|
-
key: "m" +
|
|
698
|
+
(c(!0), v(U, null, ce(d.items, (C) => (c(), v(U, {
|
|
699
|
+
key: "m" + C.id
|
|
684
700
|
}, [
|
|
685
|
-
|
|
686
|
-
|
|
701
|
+
C.type === "separator" ? (c(), v("span", En)) : (c(), v("button", Tn, [
|
|
702
|
+
K(C) ? (c(), v("span", {
|
|
687
703
|
key: 0,
|
|
688
704
|
class: "ic",
|
|
689
|
-
innerHTML:
|
|
690
|
-
}, null, 8,
|
|
691
|
-
|
|
692
|
-
|
|
705
|
+
innerHTML: K(C)
|
|
706
|
+
}, null, 8, Mn)) : C.icon ? (c(), v("span", Fn, E(C.icon), 1)) : M("", !0),
|
|
707
|
+
C.label ? (c(), v("span", In, E(C.label), 1)) : M("", !0),
|
|
708
|
+
C.items ? (c(), v("span", {
|
|
693
709
|
key: 3,
|
|
694
710
|
class: "caret",
|
|
695
|
-
innerHTML:
|
|
696
|
-
}, null, 8,
|
|
711
|
+
innerHTML: w(Ie)(w(Ne).caret)
|
|
712
|
+
}, null, 8, Rn)) : M("", !0)
|
|
697
713
|
]))
|
|
698
714
|
], 64))), 128))
|
|
699
715
|
], 512),
|
|
700
|
-
(
|
|
701
|
-
key:
|
|
716
|
+
(c(!0), v(U, null, ce(o.value, (C) => (c(), v(U, {
|
|
717
|
+
key: C.id
|
|
702
718
|
}, [
|
|
703
|
-
|
|
719
|
+
C.type === "separator" ? (c(), v("span", Pn)) : (c(), v("div", Dn, [
|
|
704
720
|
n("button", {
|
|
705
|
-
class:
|
|
706
|
-
disabled:
|
|
707
|
-
title:
|
|
708
|
-
onClick: (
|
|
721
|
+
class: B(["tool", { active: C.active, open: u.value === C.id }]),
|
|
722
|
+
disabled: C.disabled,
|
|
723
|
+
title: C.title || C.label || C.id,
|
|
724
|
+
onClick: (ue) => I(C)
|
|
709
725
|
}, [
|
|
710
|
-
|
|
726
|
+
K(C) ? (c(), v("span", {
|
|
711
727
|
key: 0,
|
|
712
728
|
class: "ic",
|
|
713
|
-
innerHTML:
|
|
714
|
-
}, null, 8,
|
|
715
|
-
|
|
716
|
-
|
|
729
|
+
innerHTML: K(C)
|
|
730
|
+
}, null, 8, An)) : C.icon ? (c(), v("span", Vn, E(C.icon), 1)) : M("", !0),
|
|
731
|
+
C.label ? (c(), v("span", Ln, E(C.label), 1)) : M("", !0),
|
|
732
|
+
C.items ? (c(), v("span", {
|
|
717
733
|
key: 3,
|
|
718
734
|
class: "caret",
|
|
719
|
-
innerHTML:
|
|
720
|
-
}, null, 8,
|
|
721
|
-
], 10,
|
|
722
|
-
|
|
735
|
+
innerHTML: w(Ie)(w(Ne).caret)
|
|
736
|
+
}, null, 8, Nn)) : M("", !0)
|
|
737
|
+
], 10, zn),
|
|
738
|
+
C.items && u.value === C.id ? (c(), ie(Et, {
|
|
723
739
|
key: 0,
|
|
724
|
-
items:
|
|
725
|
-
onPick:
|
|
726
|
-
}, null, 8, ["items"])) :
|
|
740
|
+
items: C.items,
|
|
741
|
+
onPick: k
|
|
742
|
+
}, null, 8, ["items"])) : M("", !0)
|
|
727
743
|
]))
|
|
728
744
|
], 64))), 128)),
|
|
729
|
-
|
|
745
|
+
r.value.length ? (c(), v("div", Bn, [
|
|
730
746
|
n("button", {
|
|
731
|
-
class:
|
|
747
|
+
class: B(["tool", { open: u.value === "__more" }]),
|
|
732
748
|
title: "更多",
|
|
733
|
-
onClick:
|
|
749
|
+
onClick: V[0] || (V[0] = (C) => A("__more"))
|
|
734
750
|
}, [
|
|
735
751
|
n("span", {
|
|
736
752
|
class: "ic",
|
|
737
|
-
innerHTML:
|
|
738
|
-
}, null, 8,
|
|
753
|
+
innerHTML: w(Ie)(w(F))
|
|
754
|
+
}, null, 8, Wn)
|
|
739
755
|
], 2),
|
|
740
|
-
|
|
756
|
+
u.value === "__more" ? (c(), ie(Et, {
|
|
741
757
|
key: 0,
|
|
742
|
-
items:
|
|
743
|
-
onPick:
|
|
744
|
-
}, null, 8, ["items"])) :
|
|
745
|
-
])) :
|
|
758
|
+
items: r.value,
|
|
759
|
+
onPick: k
|
|
760
|
+
}, null, 8, ["items"])) : M("", !0)
|
|
761
|
+
])) : M("", !0)
|
|
746
762
|
], 512));
|
|
747
763
|
}
|
|
748
|
-
}),
|
|
764
|
+
}), Un = /* @__PURE__ */ X(Hn, [["__scopeId", "data-v-0a4aa655"]]), Kn = {
|
|
765
|
+
key: 0,
|
|
766
|
+
class: "export-progress-overlay",
|
|
767
|
+
role: "dialog",
|
|
768
|
+
"aria-modal": "true",
|
|
769
|
+
"aria-live": "polite"
|
|
770
|
+
}, qn = { class: "card" }, _n = { class: "title" }, Jn = { class: "row" }, jn = { class: "pct" }, Gn = /* @__PURE__ */ G({
|
|
771
|
+
__name: "ExportProgressOverlay",
|
|
772
|
+
props: {
|
|
773
|
+
state: {},
|
|
774
|
+
busy: { type: Boolean }
|
|
775
|
+
},
|
|
776
|
+
emits: ["cancel"],
|
|
777
|
+
setup(d, { emit: $ }) {
|
|
778
|
+
const g = $, a = {
|
|
779
|
+
render: "渲染中",
|
|
780
|
+
compose: "合成中",
|
|
781
|
+
paginate: "分页中",
|
|
782
|
+
write: "写出文件",
|
|
783
|
+
zip: "zip 压缩",
|
|
784
|
+
convert: "批量转换"
|
|
785
|
+
};
|
|
786
|
+
return (b, y) => {
|
|
787
|
+
var u, f, p, o, r;
|
|
788
|
+
return c(), ie(dl, { to: "body" }, [
|
|
789
|
+
d.busy ? (c(), v("div", Kn, [
|
|
790
|
+
n("div", qn, [
|
|
791
|
+
n("div", _n, E(((u = d.state) == null ? void 0 : u.label) || a[((f = d.state) == null ? void 0 : f.stage) ?? ""] || "处理中…"), 1),
|
|
792
|
+
n("div", {
|
|
793
|
+
class: B(["bar", { indeterminate: ((p = d.state) == null ? void 0 : p.ratio) == null }])
|
|
794
|
+
}, [
|
|
795
|
+
((o = d.state) == null ? void 0 : o.ratio) != null ? (c(), v("div", {
|
|
796
|
+
key: 0,
|
|
797
|
+
class: "fill",
|
|
798
|
+
style: Be({ width: Math.round((d.state.ratio ?? 0) * 100) + "%" })
|
|
799
|
+
}, null, 4)) : M("", !0)
|
|
800
|
+
], 2),
|
|
801
|
+
n("div", Jn, [
|
|
802
|
+
n("span", jn, E(((r = d.state) == null ? void 0 : r.ratio) != null ? Math.round(d.state.ratio * 100) + "%" : "正在处理…"), 1),
|
|
803
|
+
n("button", {
|
|
804
|
+
class: "cancel",
|
|
805
|
+
onClick: y[0] || (y[0] = (F) => g("cancel")),
|
|
806
|
+
title: "按 Esc 也可取消"
|
|
807
|
+
}, "取消")
|
|
808
|
+
])
|
|
809
|
+
])
|
|
810
|
+
])) : M("", !0)
|
|
811
|
+
]);
|
|
812
|
+
};
|
|
813
|
+
}
|
|
814
|
+
}), Xn = /* @__PURE__ */ X(Gn, [["__scopeId", "data-v-629027ad"]]), Zn = {
|
|
749
815
|
key: 2,
|
|
750
816
|
class: "formula-bar"
|
|
751
|
-
},
|
|
817
|
+
}, Qn = { class: "addr" }, Yn = ["value", "title"], es = ["title"], ts = { class: "ov-slot" }, ls = {
|
|
752
818
|
key: 3,
|
|
753
819
|
class: "state"
|
|
754
|
-
},
|
|
820
|
+
}, ns = { class: "loader" }, ss = { class: "loader-label" }, os = { key: 0 }, as = { class: "loader-track" }, is = {
|
|
755
821
|
key: 1,
|
|
756
822
|
class: "loader-fill indeterminate"
|
|
757
|
-
},
|
|
823
|
+
}, us = {
|
|
758
824
|
key: 4,
|
|
759
825
|
class: "state error"
|
|
760
|
-
},
|
|
826
|
+
}, rs = {
|
|
761
827
|
key: 5,
|
|
762
828
|
class: "state hint"
|
|
763
|
-
},
|
|
829
|
+
}, ds = {
|
|
764
830
|
key: 3,
|
|
765
831
|
class: "status-bar"
|
|
766
|
-
},
|
|
832
|
+
}, cs = { class: "sel" }, vs = { key: 1 }, fs = /* @__PURE__ */ G({
|
|
767
833
|
__name: "ExcelViewer",
|
|
768
834
|
props: {
|
|
769
835
|
src: {},
|
|
836
|
+
workbook: {},
|
|
837
|
+
jsonOptions: {},
|
|
838
|
+
templateFile: {},
|
|
839
|
+
templateName: {},
|
|
770
840
|
fileName: {},
|
|
771
841
|
theme: {},
|
|
772
842
|
transformModel: {},
|
|
773
843
|
cellStyle: {},
|
|
844
|
+
cellImageFit: {},
|
|
845
|
+
imageLightbox: { type: Boolean, default: !0 },
|
|
774
846
|
openLinks: { type: Boolean, default: !0 },
|
|
775
847
|
plugins: {},
|
|
776
848
|
toolbar: { type: [Boolean, Array], default: !0 },
|
|
777
849
|
editable: { type: Boolean },
|
|
778
850
|
cellReadOnly: {},
|
|
779
851
|
readOnlyRanges: {},
|
|
852
|
+
editableTargets: {},
|
|
853
|
+
strictDimensions: { type: Boolean },
|
|
854
|
+
readOnlyCellStyle: { type: [Boolean, Object, Function] },
|
|
780
855
|
editor: {},
|
|
781
856
|
recalc: { type: Boolean },
|
|
782
|
-
formulaEngine: {}
|
|
857
|
+
formulaEngine: {},
|
|
858
|
+
exportProgress: { type: Boolean, default: !0 },
|
|
859
|
+
contextMenu: { type: [Boolean, Function], default: void 0 }
|
|
783
860
|
},
|
|
784
|
-
emits: ["rendered", "error", "progress", "cell-click", "cell-dblclick", "selection-change", "sheet-change", "hyperlink-click", "cell-change", "edit-start", "edit-commit", "dim-change", "dirty-change", "image-change", "struct-change"],
|
|
785
|
-
setup(
|
|
786
|
-
const
|
|
787
|
-
() => Object.assign({}, ...
|
|
788
|
-
),
|
|
789
|
-
function
|
|
790
|
-
let
|
|
791
|
-
const
|
|
792
|
-
const
|
|
793
|
-
|
|
861
|
+
emits: ["rendered", "error", "progress", "cell-click", "cell-dblclick", "selection-change", "sheet-change", "hyperlink-click", "cell-change", "edit-start", "edit-commit", "dim-change", "dirty-change", "image-change", "struct-change", "permission-denied", "before-context-menu", "context-menu"],
|
|
862
|
+
setup(d, { expose: $, emit: g }) {
|
|
863
|
+
const a = d, b = T(() => a.plugins ?? []), y = T(
|
|
864
|
+
() => Object.assign({}, ...b.value.map((e) => e.theme || {}), a.theme || {})
|
|
865
|
+
), u = T(() => !!a.cellStyle || b.value.some((e) => e.cellStyle));
|
|
866
|
+
function f(e, l, s) {
|
|
867
|
+
let i;
|
|
868
|
+
const m = (S) => {
|
|
869
|
+
const D = S == null ? void 0 : S(e, l, s);
|
|
870
|
+
D && (i = { ...i || {}, ...D });
|
|
794
871
|
};
|
|
795
|
-
for (const
|
|
796
|
-
return a
|
|
872
|
+
for (const S of b.value) m(S.cellStyle);
|
|
873
|
+
return m(a.cellStyle), i;
|
|
797
874
|
}
|
|
798
|
-
function
|
|
875
|
+
function p(e) {
|
|
799
876
|
let l = e;
|
|
800
|
-
for (const
|
|
801
|
-
return
|
|
802
|
-
}
|
|
803
|
-
const
|
|
804
|
-
editable:
|
|
805
|
-
cellReadOnly:
|
|
806
|
-
readOnlyRanges:
|
|
807
|
-
|
|
808
|
-
|
|
877
|
+
for (const s of b.value) s.transformModel && (l = s.transformModel(l) ?? l);
|
|
878
|
+
return a.transformModel && (l = a.transformModel(l) ?? l), l;
|
|
879
|
+
}
|
|
880
|
+
const o = T(() => ({
|
|
881
|
+
editable: a.editable,
|
|
882
|
+
cellReadOnly: a.cellReadOnly,
|
|
883
|
+
readOnlyRanges: a.readOnlyRanges,
|
|
884
|
+
editableTargets: a.editableTargets,
|
|
885
|
+
strictDimensions: a.strictDimensions,
|
|
886
|
+
recalc: a.recalc,
|
|
887
|
+
formulaEngine: a.formulaEngine
|
|
809
888
|
}));
|
|
810
|
-
function
|
|
811
|
-
var
|
|
812
|
-
const
|
|
813
|
-
if (
|
|
814
|
-
for (const
|
|
815
|
-
const
|
|
816
|
-
if (
|
|
889
|
+
function r(e, l) {
|
|
890
|
+
var i, m;
|
|
891
|
+
const s = (i = a.editor) == null ? void 0 : i.call(a, e, l);
|
|
892
|
+
if (s) return s;
|
|
893
|
+
for (const S of b.value) {
|
|
894
|
+
const D = (m = S.editor) == null ? void 0 : m.call(S, e, l);
|
|
895
|
+
if (D) return D;
|
|
817
896
|
}
|
|
818
897
|
}
|
|
819
|
-
const
|
|
820
|
-
|
|
898
|
+
const F = T(() => !!a.editor || b.value.some((e) => e.editor)), A = g, { loading: P, error: I, workbook: k, load: K, loadModel: q, progress: te, sourceBuffer: h } = hl();
|
|
899
|
+
function V(e) {
|
|
900
|
+
return e ? xl(e) ? e : Cl(e, a.jsonOptions) : null;
|
|
901
|
+
}
|
|
902
|
+
const C = x(null), ue = x(null), ve = T(() => C.value ?? a.templateFile ?? null), fe = T(() => ue.value ?? a.templateName ?? "");
|
|
903
|
+
function O(e, l) {
|
|
904
|
+
C.value = e, ue.value = l;
|
|
905
|
+
}
|
|
906
|
+
function ft() {
|
|
907
|
+
O(null, null);
|
|
908
|
+
}
|
|
909
|
+
const mt = x(null);
|
|
910
|
+
function Dt() {
|
|
911
|
+
var e;
|
|
912
|
+
(e = mt.value) == null || e.click();
|
|
913
|
+
}
|
|
914
|
+
function zt(e) {
|
|
915
|
+
var s;
|
|
916
|
+
const l = (s = e.target.files) == null ? void 0 : s[0];
|
|
917
|
+
l && (O(l, l.name), e.target.value = "");
|
|
918
|
+
}
|
|
919
|
+
const At = T(() => {
|
|
920
|
+
var e, l;
|
|
921
|
+
return a.fileName ? a.fileName : a.workbook ? "JSON 数据" : ((l = (e = k.value) == null ? void 0 : e.sheets[0]) == null ? void 0 : l.name) || "";
|
|
922
|
+
});
|
|
923
|
+
async function Vt(e) {
|
|
924
|
+
const l = await Ft(e), s = It(l);
|
|
925
|
+
if (s === "xls") throw new Error("模板文件是旧版 .xls 或加密,仅支持 .xlsx/.xlsm");
|
|
926
|
+
if (s === "not-zip") throw new Error("模板文件不是有效的 .xlsx(非 ZIP 包)");
|
|
927
|
+
if (s === "empty") throw new Error("模板文件为空");
|
|
928
|
+
const i = await Pt(l);
|
|
929
|
+
return Rt(i), i;
|
|
930
|
+
}
|
|
931
|
+
async function pt() {
|
|
932
|
+
const e = ve.value, l = V(a.workbook);
|
|
933
|
+
if (a.src) {
|
|
934
|
+
e && console.warn("[ooxml-excel-editor] :templateFile 只在 :workbook (JSON / 模型) 数据源下生效;xlsx 数据源已自带格式,模板已忽略."), await K(a.src, p);
|
|
935
|
+
return;
|
|
936
|
+
}
|
|
937
|
+
if (l && e) {
|
|
938
|
+
try {
|
|
939
|
+
const s = await Vt(e), i = kl(l, s);
|
|
940
|
+
q(i, p);
|
|
941
|
+
} catch (s) {
|
|
942
|
+
console.error("[ooxml-excel-editor] 模板加载失败,降级为纯 JSON 渲染:", s), q(l, p);
|
|
943
|
+
}
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
if (l) {
|
|
947
|
+
q(l, p);
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
e && await K(e, p);
|
|
951
|
+
}
|
|
952
|
+
const gt = T(() => {
|
|
953
|
+
const e = te.value;
|
|
821
954
|
return e ? e.stage === "read" ? "读取文件…" : e.stage === "parse" ? "解析中…" : "构建表格…" : "";
|
|
822
|
-
}),
|
|
823
|
-
const e =
|
|
955
|
+
}), me = T(() => {
|
|
956
|
+
const e = te.value;
|
|
824
957
|
return e && e.ratio != null ? Math.round(e.ratio * 100) : null;
|
|
825
|
-
}),
|
|
826
|
-
const e =
|
|
827
|
-
return e ? e.sheets[
|
|
828
|
-
}),
|
|
958
|
+
}), _ = x(0), J = x(1), Lt = x(null), pe = x(null), Ke = x(null), le = x(null), qe = x(null), _e = x(null), Je = x(null), je = x(null), re = ct(null), Nt = x({ scrollX: 0, scrollY: 0, width: 0, height: 0, zoom: 1 }), ge = T(() => {
|
|
959
|
+
const e = k.value;
|
|
960
|
+
return e ? e.sheets[_.value] ?? e.sheets[0] ?? null : null;
|
|
961
|
+
}), ne = x(0), Ge = x(null), Xe = x(null);
|
|
829
962
|
let t = null;
|
|
830
|
-
function
|
|
963
|
+
function Pe() {
|
|
831
964
|
t == null || t.render();
|
|
832
965
|
}
|
|
833
|
-
function
|
|
966
|
+
function Bt() {
|
|
834
967
|
t == null || t.measure();
|
|
835
968
|
}
|
|
836
|
-
function
|
|
837
|
-
const e =
|
|
838
|
-
!e || !l || !t || (t.rebuild(e, l,
|
|
839
|
-
theme:
|
|
840
|
-
cellStyle:
|
|
841
|
-
|
|
969
|
+
function Ze() {
|
|
970
|
+
const e = ge.value, l = k.value;
|
|
971
|
+
!e || !l || !t || (t.rebuild(e, l, J.value, {
|
|
972
|
+
theme: y.value,
|
|
973
|
+
cellStyle: u.value ? f : void 0,
|
|
974
|
+
cellImageFit: a.cellImageFit,
|
|
975
|
+
readOnlyCellStyle: a.readOnlyCellStyle
|
|
976
|
+
// Phase C 2026-06-08
|
|
977
|
+
}), t.setSourceBuffer(h.value));
|
|
842
978
|
}
|
|
843
|
-
function
|
|
844
|
-
const e =
|
|
845
|
-
e && (
|
|
979
|
+
function Wt() {
|
|
980
|
+
const e = le.value;
|
|
981
|
+
e && (se.value = null, t == null || t.setScroll(e.scrollLeft, e.scrollTop));
|
|
846
982
|
}
|
|
847
|
-
let
|
|
848
|
-
|
|
849
|
-
|
|
983
|
+
let ye = null;
|
|
984
|
+
Ue(() => {
|
|
985
|
+
St(), Ke.value && pe.value && le.value && Ge.value && Xe.value && qe.value && _e.value && Je.value && je.value && (t = new vl(
|
|
850
986
|
{
|
|
851
|
-
canvas:
|
|
852
|
-
renderArea:
|
|
853
|
-
scroller:
|
|
854
|
-
spacer:
|
|
855
|
-
overlays: { main:
|
|
856
|
-
editorSlot:
|
|
987
|
+
canvas: Ke.value,
|
|
988
|
+
renderArea: pe.value,
|
|
989
|
+
scroller: le.value,
|
|
990
|
+
spacer: Ge.value,
|
|
991
|
+
overlays: { main: qe.value, frow: _e.value, fcol: Je.value, corner: je.value },
|
|
992
|
+
editorSlot: Xe.value
|
|
857
993
|
},
|
|
858
994
|
{
|
|
859
|
-
onRenderer: (e) =>
|
|
860
|
-
onRenderTick: () =>
|
|
861
|
-
onSelectionChange: () =>
|
|
862
|
-
onCellClick: (e, l,
|
|
863
|
-
onCellDblClick: (e, l,
|
|
995
|
+
onRenderer: (e) => re.value = e,
|
|
996
|
+
onRenderTick: () => ne.value++,
|
|
997
|
+
onSelectionChange: () => Z.value++,
|
|
998
|
+
onCellClick: (e, l, s) => de("cell-click", { row: e, col: l, text: s }),
|
|
999
|
+
onCellDblClick: (e, l, s) => de("cell-dblclick", { row: e, col: l, text: s }),
|
|
864
1000
|
onHyperlink: (e, l) => {
|
|
865
|
-
|
|
1001
|
+
de("hyperlink-click", { url: e, cell: l }), a.openLinks && window.open(e, "_blank", "noopener");
|
|
1002
|
+
},
|
|
1003
|
+
onTooltip: (e) => se.value = e,
|
|
1004
|
+
onFindChange: () => lt.value++,
|
|
1005
|
+
onFilterChange: () => nt.value++,
|
|
1006
|
+
onEditEvent: (e, l) => de(e, l),
|
|
1007
|
+
onContextMenuBefore: (e) => {
|
|
1008
|
+
for (const l of b.value)
|
|
1009
|
+
if (l.contextMenu) {
|
|
1010
|
+
const s = l.contextMenu(e.ctx, e.items);
|
|
1011
|
+
Array.isArray(s) && e.items.splice(0, e.items.length, ...s);
|
|
1012
|
+
}
|
|
1013
|
+
a.contextMenu === !1 && e.preventDefault(), A("before-context-menu", e);
|
|
866
1014
|
},
|
|
867
|
-
|
|
868
|
-
onFindChange: () => We.value++,
|
|
869
|
-
onFilterChange: () => _e.value++,
|
|
870
|
-
onEditEvent: (e, l) => ne(e, l)
|
|
1015
|
+
onContextMenuShow: (e) => A("context-menu", e)
|
|
871
1016
|
}
|
|
872
|
-
),
|
|
873
|
-
|
|
874
|
-
}),
|
|
875
|
-
}),
|
|
876
|
-
|
|
877
|
-
}),
|
|
878
|
-
|
|
879
|
-
}),
|
|
1017
|
+
), Nt.value = t.view, t.fileName = a.fileName, t.setEditConfig(o.value), t.setEditorResolver(F.value ? r : void 0), t.setLightboxEnabled(a.imageLightbox !== !1), t.setContextMenuTransform(typeof a.contextMenu == "function" ? a.contextMenu : null)), it.value && (ae = new fl(it.value)), pt(), ye = new ResizeObserver(() => {
|
|
1018
|
+
Bt(), Pe();
|
|
1019
|
+
}), pe.value && ye.observe(pe.value);
|
|
1020
|
+
}), Oe(() => {
|
|
1021
|
+
ye == null || ye.disconnect(), t == null || t.dispose(), ae == null || ae.dispose(), Le.forEach((e) => e()), k.value && vt(k.value);
|
|
1022
|
+
}), z([() => a.src, () => a.workbook, () => a.templateFile, C], () => {
|
|
1023
|
+
pt();
|
|
1024
|
+
}), z(() => a.fileName, (e) => {
|
|
880
1025
|
t && (t.fileName = e);
|
|
881
|
-
}),
|
|
882
|
-
(
|
|
1026
|
+
}), z(o, (e) => t == null ? void 0 : t.setEditConfig(e)), z(() => a.contextMenu, (e) => t == null ? void 0 : t.setContextMenuTransform(typeof e == "function" ? e : null)), z([() => a.editor, b], () => t == null ? void 0 : t.setEditorResolver(F.value ? r : void 0)), z(() => a.cellImageFit, (e) => {
|
|
1027
|
+
e && (t == null || t.setCellImageFit(e));
|
|
1028
|
+
}), z(() => a.imageLightbox, (e) => t == null ? void 0 : t.setLightboxEnabled(e !== !1)), z(
|
|
1029
|
+
() => [y.value, a.cellStyle, a.plugins],
|
|
883
1030
|
() => {
|
|
884
|
-
|
|
1031
|
+
re.value && Ze();
|
|
885
1032
|
},
|
|
886
1033
|
{ deep: !0 }
|
|
887
|
-
),
|
|
888
|
-
e && (t == null || t.clearFilterState(),
|
|
889
|
-
}),
|
|
890
|
-
const l =
|
|
891
|
-
l != null && l.sheets[e] &&
|
|
892
|
-
}),
|
|
893
|
-
e &&
|
|
894
|
-
}),
|
|
895
|
-
e &&
|
|
896
|
-
}),
|
|
897
|
-
var
|
|
898
|
-
l != null && (t == null || t.resetFilter((
|
|
899
|
-
}),
|
|
900
|
-
const
|
|
901
|
-
|
|
1034
|
+
), z(() => a.plugins, () => St(), { deep: !1 }), z(k, async (e) => {
|
|
1035
|
+
e && (t == null || t.clearFilterState(), _.value = e.activeSheet, await We(), Ze(), A("rendered", e));
|
|
1036
|
+
}), z(_, (e) => {
|
|
1037
|
+
const l = k.value;
|
|
1038
|
+
l != null && l.sheets[e] && de("sheet-change", { index: e, name: l.sheets[e].name });
|
|
1039
|
+
}), z(I, (e) => {
|
|
1040
|
+
e && A("error", e);
|
|
1041
|
+
}), z(te, (e) => {
|
|
1042
|
+
e && A("progress", e);
|
|
1043
|
+
}), z(_, async (e, l) => {
|
|
1044
|
+
var s;
|
|
1045
|
+
l != null && (t == null || t.resetFilter((s = k.value) == null ? void 0 : s.sheets[l])), await We(), Ze();
|
|
1046
|
+
}), z(J, (e) => t == null ? void 0 : t.setZoom(e));
|
|
1047
|
+
const Z = x(0), se = x(null), Q = T(() => (Z.value, re.value, (t == null ? void 0 : t.getSelection()) ?? null)), Qe = T(() => {
|
|
1048
|
+
Z.value;
|
|
902
1049
|
const e = t == null ? void 0 : t.getActiveCell();
|
|
903
|
-
return e ?
|
|
904
|
-
}),
|
|
905
|
-
const e =
|
|
906
|
-
return !e || e.top === e.bottom && e.left === e.right ? "" : `${
|
|
907
|
-
}),
|
|
908
|
-
|
|
909
|
-
const e =
|
|
1050
|
+
return e ? Re(e.col) + (e.row + 1) : "";
|
|
1051
|
+
}), yt = T(() => {
|
|
1052
|
+
const e = Q.value;
|
|
1053
|
+
return !e || e.top === e.bottom && e.left === e.right ? "" : `${Re(e.left)}${e.top + 1}:${Re(e.right)}${e.bottom + 1}`;
|
|
1054
|
+
}), bt = T(() => {
|
|
1055
|
+
Z.value;
|
|
1056
|
+
const e = re.value, l = t == null ? void 0 : t.getActiveCell();
|
|
910
1057
|
return !e || !l ? "" : e.cellFormula(l.row, l.col) ?? e.cellText(l.row, l.col);
|
|
911
|
-
}),
|
|
912
|
-
|
|
913
|
-
|
|
1058
|
+
}), Y = x(""), be = x(!1), Ot = T(() => (Z.value, ne.value, !!(t != null && t.canEditActiveCell()))), De = T(() => (Z.value, ne.value, (t == null ? void 0 : t.getCellEditString()) ?? ""));
|
|
1059
|
+
z(De, (e) => {
|
|
1060
|
+
be.value || (Y.value = e);
|
|
1061
|
+
}, { immediate: !0 });
|
|
1062
|
+
function Ht() {
|
|
1063
|
+
be.value = !0, Y.value = De.value;
|
|
1064
|
+
}
|
|
1065
|
+
function kt(e) {
|
|
1066
|
+
var l;
|
|
1067
|
+
t == null || t.commitActiveCellValue(Y.value, e), be.value = !1, Y.value = De.value, e === "down" && ((l = le.value) == null || l.focus());
|
|
1068
|
+
}
|
|
1069
|
+
function Ut() {
|
|
1070
|
+
var e;
|
|
1071
|
+
be.value = !1, Y.value = De.value, (e = le.value) == null || e.focus();
|
|
1072
|
+
}
|
|
1073
|
+
function Kt() {
|
|
1074
|
+
be.value && kt();
|
|
1075
|
+
}
|
|
1076
|
+
function qt(e) {
|
|
1077
|
+
e.stopPropagation(), e.key === "Enter" ? (e.preventDefault(), kt("down")) : e.key === "Escape" && (e.preventDefault(), Ut());
|
|
1078
|
+
}
|
|
1079
|
+
const W = T(() => {
|
|
1080
|
+
Z.value;
|
|
1081
|
+
const e = re.value, l = (t == null ? void 0 : t.getSelection()) ?? null;
|
|
914
1082
|
return e && l ? e.selectionStats(l) : null;
|
|
915
1083
|
});
|
|
916
|
-
function
|
|
1084
|
+
function ze(e) {
|
|
917
1085
|
return isFinite(e) ? e.toLocaleString("en-US", { maximumFractionDigits: 2 }) : "—";
|
|
918
1086
|
}
|
|
919
|
-
function
|
|
1087
|
+
function _t(e) {
|
|
920
1088
|
t == null || t.onMouseDown(e);
|
|
921
1089
|
}
|
|
922
|
-
function
|
|
1090
|
+
function Jt(e) {
|
|
1091
|
+
t == null || t.onContextMenu(e);
|
|
1092
|
+
}
|
|
1093
|
+
function jt(e) {
|
|
923
1094
|
t == null || t.onMouseMove(e);
|
|
924
1095
|
}
|
|
925
|
-
function
|
|
1096
|
+
function Gt(e) {
|
|
926
1097
|
t == null || t.onMouseUp(e);
|
|
927
1098
|
}
|
|
928
|
-
function
|
|
1099
|
+
function Xt() {
|
|
929
1100
|
t == null || t.onMouseLeave();
|
|
930
1101
|
}
|
|
931
|
-
function
|
|
1102
|
+
function Zt(e) {
|
|
932
1103
|
t == null || t.onDblClick(e);
|
|
933
1104
|
}
|
|
934
|
-
function
|
|
1105
|
+
function Qt(e) {
|
|
935
1106
|
t == null || t.onKeyDown(e);
|
|
936
1107
|
}
|
|
937
|
-
|
|
1108
|
+
z(Q, (e) => {
|
|
938
1109
|
const l = t == null ? void 0 : t.getActiveCell();
|
|
939
|
-
e && l &&
|
|
1110
|
+
e && l && de("selection-change", { range: e, active: l });
|
|
940
1111
|
});
|
|
941
|
-
function
|
|
1112
|
+
function Ye(e, l) {
|
|
942
1113
|
return (t == null ? void 0 : t.rectOf(e, l)) ?? null;
|
|
943
1114
|
}
|
|
944
|
-
function
|
|
1115
|
+
function et(e) {
|
|
945
1116
|
return (t == null ? void 0 : t.rectOfRange(e)) ?? null;
|
|
946
1117
|
}
|
|
947
|
-
const
|
|
948
|
-
|
|
1118
|
+
const ke = x(null), Ae = x(!1);
|
|
1119
|
+
let xe = null;
|
|
1120
|
+
function xt() {
|
|
1121
|
+
xe == null || xe.abort();
|
|
1122
|
+
}
|
|
1123
|
+
function j(e, l) {
|
|
1124
|
+
if (a.exportProgress === !1) return l(e);
|
|
1125
|
+
const s = new AbortController();
|
|
1126
|
+
xe = s, e != null && e.signal && (e.signal.aborted ? s.abort() : e.signal.addEventListener("abort", () => s.abort(), { once: !0 })), Ae.value = !0, ke.value = null;
|
|
1127
|
+
const m = { ...e ?? {}, onProgress: (S) => {
|
|
1128
|
+
var D;
|
|
1129
|
+
ke.value = S, (D = e == null ? void 0 : e.onProgress) == null || D.call(e, S);
|
|
1130
|
+
}, signal: s.signal };
|
|
1131
|
+
return l(m).finally(() => {
|
|
1132
|
+
Ae.value = !1, ke.value = null, xe = null;
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
const Yt = (e) => j(e, (l) => t.exportImage(l)), Ce = (e) => j(e, (l) => t.downloadImage(l)), el = (e) => j(e, (l) => t.exportPdf(l)), he = (e) => j(e, (l) => t.downloadPdf(l)), we = (e) => j(e, (l) => t.print(l));
|
|
1136
|
+
async function Ct() {
|
|
949
1137
|
try {
|
|
950
|
-
await
|
|
1138
|
+
await he();
|
|
951
1139
|
} catch (e) {
|
|
952
|
-
|
|
1140
|
+
tt(e);
|
|
953
1141
|
}
|
|
954
1142
|
}
|
|
955
|
-
async function
|
|
1143
|
+
async function ht() {
|
|
956
1144
|
try {
|
|
957
|
-
await
|
|
1145
|
+
await he({ vector: !0 });
|
|
958
1146
|
} catch (e) {
|
|
959
|
-
|
|
1147
|
+
tt(e);
|
|
960
1148
|
}
|
|
961
1149
|
}
|
|
962
|
-
function
|
|
1150
|
+
function tt(e) {
|
|
963
1151
|
const l = (e == null ? void 0 : e.message) || String(e);
|
|
964
|
-
|
|
1152
|
+
console.error("[ooxml-excel-editor] 导出失败:", e), A("error", l), typeof window < "u" && window.alert && window.alert(l);
|
|
965
1153
|
}
|
|
966
|
-
const
|
|
967
|
-
function
|
|
968
|
-
|
|
1154
|
+
const $e = x(!1), lt = x(0), Se = T(() => (lt.value, (t == null ? void 0 : t.getFindState()) ?? { query: "", matchCase: !1, wholeCell: !1, count: 0, index: -1 }));
|
|
1155
|
+
function wt() {
|
|
1156
|
+
$e.value = !0;
|
|
969
1157
|
}
|
|
970
|
-
function
|
|
1158
|
+
function $t() {
|
|
971
1159
|
var e;
|
|
972
|
-
|
|
1160
|
+
$e.value = !1, t == null || t.clearFind(), (e = le.value) == null || e.focus();
|
|
973
1161
|
}
|
|
974
|
-
function
|
|
975
|
-
(e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(),
|
|
1162
|
+
function tl(e) {
|
|
1163
|
+
(e.ctrlKey || e.metaKey) && (e.key === "f" || e.key === "F") && (e.preventDefault(), wt());
|
|
976
1164
|
}
|
|
977
|
-
const
|
|
978
|
-
function
|
|
1165
|
+
const nt = x(0), oe = T(() => (nt.value, (t == null ? void 0 : t.getFilterPopup()) ?? null));
|
|
1166
|
+
function ll() {
|
|
979
1167
|
t == null || t.toggleAutoFilter();
|
|
980
1168
|
}
|
|
981
|
-
function
|
|
982
|
-
const e =
|
|
1169
|
+
function nl() {
|
|
1170
|
+
const e = ge.value, l = re.value;
|
|
983
1171
|
if (!e || !l) return;
|
|
984
|
-
const
|
|
985
|
-
if (
|
|
1172
|
+
const s = e.freeze;
|
|
1173
|
+
if (s.frozenRows || s.frozenCols)
|
|
986
1174
|
e.freeze = { frozenRows: 0, frozenCols: 0 };
|
|
987
1175
|
else {
|
|
988
|
-
const
|
|
989
|
-
e.freeze = { frozenRows:
|
|
1176
|
+
const i = t == null ? void 0 : t.getActiveCell();
|
|
1177
|
+
e.freeze = { frozenRows: i ? i.row : 1, frozenCols: i ? i.col : 0 };
|
|
990
1178
|
}
|
|
991
|
-
l.rebuildMetrics(), t == null || t.refreshContentSize(),
|
|
1179
|
+
l.rebuildMetrics(), t == null || t.refreshContentSize(), Pe();
|
|
992
1180
|
}
|
|
993
|
-
const
|
|
994
|
-
async function
|
|
995
|
-
|
|
996
|
-
const l = e.scope === "all" ? "all" : "active",
|
|
1181
|
+
const Ee = x(!1);
|
|
1182
|
+
async function sl(e) {
|
|
1183
|
+
Ee.value = !1;
|
|
1184
|
+
const l = e.scope === "all" ? "all" : "active", s = e.scope === "selection" ? Q.value ?? void 0 : void 0, i = {
|
|
997
1185
|
target: l,
|
|
998
|
-
range:
|
|
1186
|
+
range: s,
|
|
999
1187
|
scale: e.scale,
|
|
1000
1188
|
includeHeaders: e.includeHeaders,
|
|
1001
1189
|
gridlines: e.gridlines
|
|
1002
|
-
},
|
|
1190
|
+
}, m = {
|
|
1003
1191
|
...e.format !== "auto" ? { format: e.format } : {},
|
|
1004
1192
|
...e.orientation !== "auto" ? { orientation: e.orientation } : {},
|
|
1005
1193
|
fitToWidth: e.fitToWidth
|
|
1006
1194
|
};
|
|
1007
1195
|
try {
|
|
1008
|
-
e.action === "png" ? await
|
|
1009
|
-
} catch (
|
|
1010
|
-
|
|
1196
|
+
e.action === "png" ? await Ce(i) : e.action === "pdf" ? await he({ ...i, ...m, vector: e.pdfVector }) : await we({ ...i, ...m });
|
|
1197
|
+
} catch (S) {
|
|
1198
|
+
tt(S);
|
|
1011
1199
|
}
|
|
1012
1200
|
}
|
|
1013
|
-
function
|
|
1201
|
+
function ol(e) {
|
|
1014
1202
|
t == null || t.setSelectionRange(e);
|
|
1015
1203
|
}
|
|
1016
|
-
const
|
|
1017
|
-
load: (e) =>
|
|
1018
|
-
getWorkbook: () =>
|
|
1019
|
-
getActiveSheet: () =>
|
|
1204
|
+
const Te = {
|
|
1205
|
+
load: (e) => K(e, p),
|
|
1206
|
+
getWorkbook: () => k.value,
|
|
1207
|
+
getActiveSheet: () => _.value,
|
|
1020
1208
|
setActiveSheet: (e) => {
|
|
1021
1209
|
var l;
|
|
1022
|
-
(l =
|
|
1210
|
+
(l = k.value) != null && l.sheets[e] && (_.value = e);
|
|
1023
1211
|
},
|
|
1024
|
-
getSelection: () =>
|
|
1025
|
-
setSelection:
|
|
1026
|
-
rectOf:
|
|
1027
|
-
rectOfRange:
|
|
1028
|
-
redraw: () =>
|
|
1212
|
+
getSelection: () => Q.value,
|
|
1213
|
+
setSelection: ol,
|
|
1214
|
+
rectOf: Ye,
|
|
1215
|
+
rectOfRange: et,
|
|
1216
|
+
redraw: () => Pe(),
|
|
1029
1217
|
isCellEditable: (e, l) => (t == null ? void 0 : t.isCellEditable(e, l)) ?? !1,
|
|
1030
|
-
|
|
1218
|
+
setEditableTargets: (e) => t == null ? void 0 : t.setEditableTargets(e),
|
|
1219
|
+
getEditableTargets: () => t == null ? void 0 : t.getEditableTargets(),
|
|
1220
|
+
editCell: (e, l, s) => (t == null ? void 0 : t.editCell(e, l, s)) ?? !1,
|
|
1031
1221
|
editRange: (e, l) => (t == null ? void 0 : t.editRange(e, l)) ?? !1,
|
|
1032
1222
|
clearRange: (e) => (t == null ? void 0 : t.clearRange(e)) ?? !1,
|
|
1033
1223
|
setStyle: (e, l) => (t == null ? void 0 : t.setStyle(e, l)) ?? !1,
|
|
1224
|
+
getActiveFillColor: () => (t == null ? void 0 : t.getActiveFillColor()) ?? "#FFFFFF",
|
|
1225
|
+
getActiveFontColor: () => (t == null ? void 0 : t.getActiveFontColor()) ?? "#000000",
|
|
1226
|
+
setSelectionFill: (e) => (t == null ? void 0 : t.setSelectionFill(e)) ?? !1,
|
|
1227
|
+
setSelectionFontColor: (e) => (t == null ? void 0 : t.setSelectionFontColor(e)) ?? !1,
|
|
1228
|
+
getSelectionWrapState: () => (t == null ? void 0 : t.getSelectionWrapState()) ?? "none",
|
|
1229
|
+
toggleWrapTextOnSelection: () => (t == null ? void 0 : t.toggleWrapTextOnSelection()) ?? !1,
|
|
1230
|
+
mergeCells: (e) => (t == null ? void 0 : t.mergeCells(e)) ?? !1,
|
|
1231
|
+
unmergeCells: (e) => (t == null ? void 0 : t.unmergeCells(e)) ?? !1,
|
|
1232
|
+
pasteText: (e, l) => (t == null ? void 0 : t.pasteText(e, l)) ?? !1,
|
|
1233
|
+
pasteRichHtml: (e, l) => (t == null ? void 0 : t.pasteRichHtml(e, l)) ?? !1,
|
|
1234
|
+
pasteImageBlob: (e, l) => (t == null ? void 0 : t.pasteImageBlob(e, l)) ?? Promise.resolve(!1),
|
|
1034
1235
|
getImages: () => (t == null ? void 0 : t.getImages()) ?? [],
|
|
1035
1236
|
addImage: (e) => (t == null ? void 0 : t.addImage(e)) ?? -1,
|
|
1036
1237
|
removeImage: (e) => (t == null ? void 0 : t.removeImage(e)) ?? !1,
|
|
1037
|
-
moveImage: (e, l,
|
|
1038
|
-
resizeImage: (e, l,
|
|
1238
|
+
moveImage: (e, l, s) => (t == null ? void 0 : t.moveImage(e, l, s)) ?? !1,
|
|
1239
|
+
resizeImage: (e, l, s) => (t == null ? void 0 : t.resizeImage(e, l, s)) ?? !1,
|
|
1240
|
+
getCellEditString: () => (t == null ? void 0 : t.getCellEditString()) ?? "",
|
|
1241
|
+
canEditActiveCell: () => (t == null ? void 0 : t.canEditActiveCell()) ?? !1,
|
|
1242
|
+
commitActiveCellValue: (e, l) => (t == null ? void 0 : t.commitActiveCellValue(e, l)) ?? !1,
|
|
1243
|
+
getCellImages: () => (t == null ? void 0 : t.getCellImages()) ?? [],
|
|
1244
|
+
getCellImageAt: (e, l) => (t == null ? void 0 : t.getCellImageAt(e, l)) ?? null,
|
|
1245
|
+
openImageLightbox: (e, l, s) => t == null ? void 0 : t.openImageLightbox(e, l, s),
|
|
1246
|
+
setCellImageFit: (e) => t == null ? void 0 : t.setCellImageFit(e),
|
|
1247
|
+
convertImageToCell: (e, l, s) => (t == null ? void 0 : t.convertImageToCell(e, l, s)) ?? !1,
|
|
1248
|
+
convertImageToCellAuto: (e) => (t == null ? void 0 : t.convertImageToCellAuto(e)) ?? !1,
|
|
1249
|
+
convertAllImagesToCells: (e) => (t == null ? void 0 : t.convertAllImagesToCells(e)) ?? 0,
|
|
1250
|
+
convertImagesInRangeToCell: (e) => j({}, async (l) => {
|
|
1251
|
+
var s;
|
|
1252
|
+
return (s = l.onProgress) == null || s.call(l, { stage: "convert", label: "选区浮动图批量嵌入…", ratio: void 0 }), (t == null ? void 0 : t.convertImagesInRangeToCell(e)) ?? 0;
|
|
1253
|
+
}),
|
|
1254
|
+
convertCellImagesInRangeToFloat: (e, l) => j({}, async (s) => {
|
|
1255
|
+
var i;
|
|
1256
|
+
return (i = s.onProgress) == null || i.call(s, { stage: "convert", label: "选区内嵌图批量浮动化…", ratio: void 0 }), (t == null ? void 0 : t.convertCellImagesInRangeToFloat(e, l)) ?? 0;
|
|
1257
|
+
}),
|
|
1258
|
+
openContextMenu: (e, l, s) => t == null ? void 0 : t.openContextMenu(e, l, s),
|
|
1259
|
+
closeContextMenu: () => t == null ? void 0 : t.closeContextMenu(),
|
|
1260
|
+
convertCellImageToFloat: (e, l, s) => (t == null ? void 0 : t.convertCellImageToFloat(e, l, s)) ?? !1,
|
|
1039
1261
|
insertRows: (e, l) => (t == null ? void 0 : t.insertRows(e, l)) ?? !1,
|
|
1040
1262
|
deleteRows: (e, l) => (t == null ? void 0 : t.deleteRows(e, l)) ?? !1,
|
|
1041
1263
|
insertCols: (e, l) => (t == null ? void 0 : t.insertCols(e, l)) ?? !1,
|
|
@@ -1046,142 +1268,235 @@ const Ol = { class: "tb-menu" }, Bl = {
|
|
|
1046
1268
|
canRedo: () => (t == null ? void 0 : t.canRedo()) ?? !1,
|
|
1047
1269
|
getEditingCell: () => (t == null ? void 0 : t.getEditingCell()) ?? null,
|
|
1048
1270
|
getCellSnapshot: (e, l) => (t == null ? void 0 : t.getCellSnapshot(e, l)) ?? null,
|
|
1271
|
+
inspectCell: (e, l) => (t == null ? void 0 : t.inspectCell(e, l)) ?? null,
|
|
1049
1272
|
beginEdit: (e, l) => (t == null ? void 0 : t.beginEdit(e, l)) ?? !1,
|
|
1050
1273
|
cancelEdit: () => t == null ? void 0 : t.cancelEdit(),
|
|
1051
1274
|
isEditing: () => (t == null ? void 0 : t.isEditing()) ?? !1,
|
|
1052
|
-
setColumnWidth: (e, l) => (t == null ? void 0 : t.setColumnWidth(e, l)) ??
|
|
1053
|
-
setRowHeight: (e, l) => (t == null ? void 0 : t.setRowHeight(e, l)) ??
|
|
1275
|
+
setColumnWidth: (e, l) => (t == null ? void 0 : t.setColumnWidth(e, l)) ?? 0,
|
|
1276
|
+
setRowHeight: (e, l) => (t == null ? void 0 : t.setRowHeight(e, l)) ?? 0,
|
|
1277
|
+
autoFitColumns: (e) => (t == null ? void 0 : t.autoFitColumns(e)) ?? 0,
|
|
1278
|
+
autoFitRows: (e) => (t == null ? void 0 : t.autoFitRows(e)) ?? 0,
|
|
1279
|
+
resetColumnWidth: (e) => (t == null ? void 0 : t.resetColumnWidth(e)) ?? 0,
|
|
1280
|
+
resetRowHeight: (e) => (t == null ? void 0 : t.resetRowHeight(e)) ?? 0,
|
|
1054
1281
|
isRecalcReady: () => (t == null ? void 0 : t.isRecalcReady()) ?? !1,
|
|
1282
|
+
getVirtualExtent: () => (t == null ? void 0 : t.getVirtualExtent()) ?? { rows: 0, cols: 0 },
|
|
1055
1283
|
isDirty: () => (t == null ? void 0 : t.isDirty()) ?? !1,
|
|
1056
1284
|
resetToOriginal: () => (t == null ? void 0 : t.resetToOriginal()) ?? !1,
|
|
1057
|
-
exportImage:
|
|
1058
|
-
downloadImage:
|
|
1059
|
-
exportPdf:
|
|
1060
|
-
downloadPdf:
|
|
1061
|
-
print:
|
|
1062
|
-
exportXlsx: (e) => t.exportXlsx(
|
|
1063
|
-
downloadXlsx: (e) => t.downloadXlsx(
|
|
1285
|
+
exportImage: Yt,
|
|
1286
|
+
downloadImage: Ce,
|
|
1287
|
+
exportPdf: el,
|
|
1288
|
+
downloadPdf: he,
|
|
1289
|
+
print: we,
|
|
1290
|
+
exportXlsx: (e) => j(e, (l) => t.exportXlsx(l)),
|
|
1291
|
+
downloadXlsx: (e) => j(e, (l) => t.downloadXlsx(l)),
|
|
1064
1292
|
exportJson: (e) => (t == null ? void 0 : t.exportJson(e)) ?? "{}",
|
|
1065
1293
|
downloadJson: (e) => t == null ? void 0 : t.downloadJson(e),
|
|
1066
1294
|
exportCsv: (e) => (t == null ? void 0 : t.exportCsv(e)) ?? "",
|
|
1067
1295
|
downloadCsv: (e) => t == null ? void 0 : t.downloadCsv(e),
|
|
1068
1296
|
// ---- 数据读取(委托独立函数,自动绑 date1904 + 默认当前表) ----
|
|
1069
|
-
getCellValue: (e, l,
|
|
1070
|
-
const
|
|
1071
|
-
return
|
|
1297
|
+
getCellValue: (e, l, s) => {
|
|
1298
|
+
const i = Me(s);
|
|
1299
|
+
return i ? bl(i, e, l) : null;
|
|
1072
1300
|
},
|
|
1073
|
-
getCellText: (e, l,
|
|
1074
|
-
var
|
|
1075
|
-
const
|
|
1076
|
-
return
|
|
1301
|
+
getCellText: (e, l, s) => {
|
|
1302
|
+
var m;
|
|
1303
|
+
const i = Me(s);
|
|
1304
|
+
return i ? yl(i, e, l, ((m = k.value) == null ? void 0 : m.date1904) ?? !1) : "";
|
|
1077
1305
|
},
|
|
1078
1306
|
getSheetData: (e, l) => {
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1307
|
+
const s = Me(l);
|
|
1308
|
+
return s ? gl(s, st(e)) : [];
|
|
1081
1309
|
},
|
|
1082
1310
|
getSheetJSON: (e, l) => {
|
|
1083
|
-
const
|
|
1084
|
-
return
|
|
1311
|
+
const s = Me(l);
|
|
1312
|
+
return s ? pl(s, st(e)) : [];
|
|
1085
1313
|
},
|
|
1086
|
-
getRangeData: (e, l,
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1314
|
+
getRangeData: (e, l, s) => {
|
|
1315
|
+
const i = Me(s);
|
|
1316
|
+
return i ? ml(i, e, st(l)) : [];
|
|
1089
1317
|
}
|
|
1090
1318
|
};
|
|
1091
|
-
function
|
|
1092
|
-
const l =
|
|
1093
|
-
return l ? l.sheets[e ??
|
|
1319
|
+
function Me(e) {
|
|
1320
|
+
const l = k.value;
|
|
1321
|
+
return l ? l.sheets[e ?? _.value] ?? null : null;
|
|
1094
1322
|
}
|
|
1095
|
-
function
|
|
1323
|
+
function st(e) {
|
|
1096
1324
|
var l;
|
|
1097
|
-
return { ...e, date1904: ((l =
|
|
1325
|
+
return { ...e, date1904: ((l = k.value) == null ? void 0 : l.date1904) ?? !1 };
|
|
1098
1326
|
}
|
|
1099
|
-
|
|
1100
|
-
const
|
|
1101
|
-
function
|
|
1327
|
+
$(Te);
|
|
1328
|
+
const H = (e) => Ne[e];
|
|
1329
|
+
function R(e) {
|
|
1102
1330
|
return { kind: "builtin", ...e };
|
|
1103
1331
|
}
|
|
1104
|
-
function
|
|
1105
|
-
var l,
|
|
1332
|
+
function al(e) {
|
|
1333
|
+
var l, s, i;
|
|
1106
1334
|
switch (e) {
|
|
1107
1335
|
case "find":
|
|
1108
|
-
return
|
|
1336
|
+
return R({
|
|
1109
1337
|
id: e,
|
|
1110
|
-
iconSvg:
|
|
1338
|
+
iconSvg: H("find"),
|
|
1111
1339
|
label: "查找",
|
|
1112
1340
|
title: "查找 (Ctrl+F)",
|
|
1113
|
-
active:
|
|
1114
|
-
onClick: () =>
|
|
1341
|
+
active: $e.value,
|
|
1342
|
+
onClick: () => $e.value ? $t() : wt()
|
|
1115
1343
|
});
|
|
1116
1344
|
case "filter":
|
|
1117
|
-
return
|
|
1345
|
+
return R({
|
|
1118
1346
|
id: e,
|
|
1119
|
-
iconSvg:
|
|
1347
|
+
iconSvg: H("filter"),
|
|
1120
1348
|
label: "筛选",
|
|
1121
1349
|
title: "切换自动筛选",
|
|
1122
|
-
active: !!((l =
|
|
1123
|
-
onClick:
|
|
1350
|
+
active: !!((l = ge.value) != null && l.autoFilterRange),
|
|
1351
|
+
onClick: ll
|
|
1124
1352
|
});
|
|
1125
1353
|
case "clear-filter":
|
|
1126
|
-
return
|
|
1354
|
+
return R({
|
|
1127
1355
|
id: e,
|
|
1128
|
-
iconSvg:
|
|
1356
|
+
iconSvg: H("clear-filter"),
|
|
1129
1357
|
label: "清除筛选",
|
|
1130
1358
|
title: "清除当前表全部筛选",
|
|
1131
1359
|
disabled: !(t != null && t.hasFilters()),
|
|
1132
1360
|
onClick: () => t == null ? void 0 : t.clearAllFilters()
|
|
1133
1361
|
});
|
|
1134
1362
|
case "copy":
|
|
1135
|
-
return
|
|
1363
|
+
return R({
|
|
1136
1364
|
id: e,
|
|
1137
|
-
iconSvg:
|
|
1365
|
+
iconSvg: H("copy"),
|
|
1138
1366
|
label: "复制",
|
|
1139
1367
|
title: "复制选区 (Ctrl+C)",
|
|
1140
|
-
disabled: !
|
|
1368
|
+
disabled: !Q.value,
|
|
1141
1369
|
onClick: () => void (t == null ? void 0 : t.copySelection())
|
|
1142
1370
|
});
|
|
1371
|
+
case "wrap-text": {
|
|
1372
|
+
const m = (t == null ? void 0 : t.getSelectionWrapState()) ?? "none";
|
|
1373
|
+
return R({
|
|
1374
|
+
id: e,
|
|
1375
|
+
iconSvg: H("wrap-text"),
|
|
1376
|
+
label: "自动换行",
|
|
1377
|
+
title: "自动换行(选区,WPS 风格 toggle)",
|
|
1378
|
+
active: m === "all",
|
|
1379
|
+
disabled: !Q.value || !a.editable,
|
|
1380
|
+
onClick: () => void (t == null ? void 0 : t.toggleWrapTextOnSelection())
|
|
1381
|
+
});
|
|
1382
|
+
}
|
|
1383
|
+
case "template": {
|
|
1384
|
+
const m = !!ve.value, S = fe.value, D = !!a.src && !a.workbook;
|
|
1385
|
+
return R({
|
|
1386
|
+
id: e,
|
|
1387
|
+
iconSvg: H("template"),
|
|
1388
|
+
label: "模板",
|
|
1389
|
+
title: D ? "模板仅对 JSON / 模型数据源生效;当前是 .xlsx 数据源,模板不可用" : m ? `模板已加载:${S || "(未命名)"}` : "为 JSON / 模型数据源套用 .xlsx 模板的样式(边框 / 字体 / 列宽 / 合并 等);模板的文字内容会被丢弃",
|
|
1390
|
+
active: m,
|
|
1391
|
+
disabled: D,
|
|
1392
|
+
items: [
|
|
1393
|
+
R({
|
|
1394
|
+
id: "tpl-default",
|
|
1395
|
+
label: (m ? "" : "✓ ") + "默认渲染",
|
|
1396
|
+
title: "不套模板,数据按默认样式渲染",
|
|
1397
|
+
disabled: !m,
|
|
1398
|
+
onClick: ft
|
|
1399
|
+
}),
|
|
1400
|
+
R({ id: "tpl-sep", type: "separator" }),
|
|
1401
|
+
R({
|
|
1402
|
+
id: "tpl-import",
|
|
1403
|
+
label: "导入 .xlsx 模板…",
|
|
1404
|
+
title: "选一份 .xlsx,把它的 styling(边框/字体/列宽/合并/freeze) 套到当前 JSON 数据上;模板的文字内容会被丢弃",
|
|
1405
|
+
onClick: Dt
|
|
1406
|
+
}),
|
|
1407
|
+
R({
|
|
1408
|
+
id: "tpl-clear",
|
|
1409
|
+
label: "清除模板",
|
|
1410
|
+
title: "切回默认样式渲染",
|
|
1411
|
+
disabled: !m,
|
|
1412
|
+
onClick: ft
|
|
1413
|
+
})
|
|
1414
|
+
]
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
case "image-tools": {
|
|
1418
|
+
const m = Q.value, S = t == null ? void 0 : t.getActiveCell(), D = (((s = ge.value) == null ? void 0 : s.images.length) ?? 0) > 0;
|
|
1419
|
+
return R({
|
|
1420
|
+
id: e,
|
|
1421
|
+
iconSvg: H("image-tools"),
|
|
1422
|
+
label: "图片工具",
|
|
1423
|
+
title: "浮动图 ⇄ 单元格内嵌图(WPS DISPIMG)互转",
|
|
1424
|
+
disabled: !a.editable,
|
|
1425
|
+
items: [
|
|
1426
|
+
R({
|
|
1427
|
+
id: "img-sel-to-cell",
|
|
1428
|
+
label: "选区:浮动 → 嵌入",
|
|
1429
|
+
title: '把选区里"中心格在选区内"的浮动图,就近嵌入',
|
|
1430
|
+
disabled: !m || !D,
|
|
1431
|
+
onClick: () => m && (t == null ? void 0 : t.convertImagesInRangeToCell(m))
|
|
1432
|
+
}),
|
|
1433
|
+
R({
|
|
1434
|
+
id: "img-sel-to-float",
|
|
1435
|
+
label: "选区:嵌入 → 浮动",
|
|
1436
|
+
title: "把选区内所有 DISPIMG 格拎成浮动图",
|
|
1437
|
+
disabled: !m,
|
|
1438
|
+
onClick: () => m && (t == null ? void 0 : t.convertCellImagesInRangeToFloat(m))
|
|
1439
|
+
}),
|
|
1440
|
+
R({ id: "img-sep", type: "separator" }),
|
|
1441
|
+
R({
|
|
1442
|
+
id: "img-all-to-cell",
|
|
1443
|
+
label: "整表:浮动 → 嵌入",
|
|
1444
|
+
title: "全表浮动图按几何就近嵌入各自单元格",
|
|
1445
|
+
disabled: !D,
|
|
1446
|
+
onClick: () => t == null ? void 0 : t.convertAllImagesToCells()
|
|
1447
|
+
}),
|
|
1448
|
+
R({
|
|
1449
|
+
id: "img-col-to-cell",
|
|
1450
|
+
label: "整列:浮动 → 嵌入(活动列)",
|
|
1451
|
+
title: "把中心落在活动列的浮动图就近嵌入",
|
|
1452
|
+
disabled: !D || !S,
|
|
1453
|
+
onClick: () => S && (t == null ? void 0 : t.convertAllImagesToCells(S.col))
|
|
1454
|
+
})
|
|
1455
|
+
]
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1143
1458
|
case "freeze": {
|
|
1144
|
-
const
|
|
1145
|
-
return
|
|
1459
|
+
const m = (i = ge.value) == null ? void 0 : i.freeze;
|
|
1460
|
+
return R({
|
|
1146
1461
|
id: e,
|
|
1147
|
-
iconSvg:
|
|
1462
|
+
iconSvg: H("freeze"),
|
|
1148
1463
|
label: "冻结",
|
|
1149
1464
|
title: "冻结/取消冻结(在活动单元格)",
|
|
1150
|
-
active: !!(
|
|
1151
|
-
onClick:
|
|
1465
|
+
active: !!(m && (m.frozenRows || m.frozenCols)),
|
|
1466
|
+
onClick: nl
|
|
1152
1467
|
});
|
|
1153
1468
|
}
|
|
1154
1469
|
case "export":
|
|
1155
|
-
return
|
|
1470
|
+
return R({
|
|
1156
1471
|
id: e,
|
|
1157
|
-
iconSvg:
|
|
1472
|
+
iconSvg: H("export"),
|
|
1158
1473
|
label: "导出",
|
|
1159
1474
|
title: "导出 / 打印",
|
|
1160
1475
|
items: [
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1476
|
+
R({ id: "export-png", label: "导出为图片 (PNG)", onClick: () => void Ce() }),
|
|
1477
|
+
R({ id: "export-pdf", label: "导出为 PDF (位图)", onClick: Ct }),
|
|
1478
|
+
R({ id: "export-pdf-vector", label: "导出为 PDF (矢量·文字可选)", onClick: ht }),
|
|
1479
|
+
R({ id: "export-print", label: "打印…", onClick: () => void we() }),
|
|
1480
|
+
R({ id: "export-sep", type: "separator" }),
|
|
1481
|
+
R({ id: "export-settings", label: "导出设置…", onClick: () => Ee.value = !0 })
|
|
1167
1482
|
]
|
|
1168
1483
|
});
|
|
1169
1484
|
case "zoom":
|
|
1170
|
-
return
|
|
1485
|
+
return R({
|
|
1171
1486
|
id: e,
|
|
1172
|
-
iconSvg:
|
|
1173
|
-
label: Math.round(
|
|
1487
|
+
iconSvg: H("zoom"),
|
|
1488
|
+
label: Math.round(J.value * 100) + "%",
|
|
1174
1489
|
title: "缩放",
|
|
1175
1490
|
items: [50, 75, 100, 125, 150, 200].map(
|
|
1176
|
-
(
|
|
1491
|
+
(m) => R({ id: "zoom-" + m, label: m + "%", active: Math.round(J.value * 100) === m, onClick: () => J.value = m / 100 })
|
|
1177
1492
|
)
|
|
1178
1493
|
});
|
|
1179
1494
|
default:
|
|
1180
1495
|
return null;
|
|
1181
1496
|
}
|
|
1182
1497
|
}
|
|
1183
|
-
function
|
|
1184
|
-
var
|
|
1498
|
+
function ot(e, l) {
|
|
1499
|
+
var s, i, m;
|
|
1185
1500
|
return {
|
|
1186
1501
|
id: e.id,
|
|
1187
1502
|
type: e.type,
|
|
@@ -1189,305 +1504,338 @@ const Ol = { class: "tb-menu" }, Bl = {
|
|
|
1189
1504
|
icon: e.icon,
|
|
1190
1505
|
label: e.label,
|
|
1191
1506
|
title: e.title,
|
|
1192
|
-
active: !!((
|
|
1193
|
-
disabled: !!((
|
|
1194
|
-
onClick: e.onClick ? () => e.onClick(
|
|
1195
|
-
items: (
|
|
1507
|
+
active: !!((s = e.active) != null && s.call(e, Te)),
|
|
1508
|
+
disabled: !!((i = e.disabled) != null && i.call(e, Te)),
|
|
1509
|
+
onClick: e.onClick ? () => e.onClick(Te) : void 0,
|
|
1510
|
+
items: (m = e.items) == null ? void 0 : m.map((S) => ot(S, l)),
|
|
1196
1511
|
kind: l
|
|
1197
1512
|
};
|
|
1198
1513
|
}
|
|
1199
|
-
const
|
|
1200
|
-
if (
|
|
1201
|
-
const e = Array.isArray(
|
|
1202
|
-
for (const
|
|
1203
|
-
if (typeof
|
|
1204
|
-
if (
|
|
1514
|
+
const at = T(() => {
|
|
1515
|
+
if (ne.value, Z.value, lt.value, nt.value, a.toolbar === !1) return [];
|
|
1516
|
+
const e = Array.isArray(a.toolbar) ? a.toolbar : ["find", "filter"], l = [];
|
|
1517
|
+
for (const s of e)
|
|
1518
|
+
if (typeof s == "string")
|
|
1519
|
+
if (s === "separator" || s === "|") l.push({ id: "sep-" + l.length, type: "separator", kind: "builtin" });
|
|
1205
1520
|
else {
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1521
|
+
const i = al(s);
|
|
1522
|
+
i && l.push(i);
|
|
1208
1523
|
}
|
|
1209
1524
|
else
|
|
1210
|
-
l.push(
|
|
1211
|
-
for (const
|
|
1212
|
-
for (const
|
|
1525
|
+
l.push(ot(s, "custom"));
|
|
1526
|
+
for (const s of b.value)
|
|
1527
|
+
for (const i of s.toolbar ?? []) l.push(ot(i, "plugin"));
|
|
1213
1528
|
return l;
|
|
1214
|
-
}),
|
|
1215
|
-
let
|
|
1216
|
-
function
|
|
1217
|
-
var
|
|
1218
|
-
|
|
1219
|
-
}
|
|
1220
|
-
function
|
|
1221
|
-
var
|
|
1222
|
-
|
|
1223
|
-
const e = (
|
|
1224
|
-
let
|
|
1225
|
-
|
|
1226
|
-
}, l = { viewer:
|
|
1227
|
-
for (const
|
|
1228
|
-
if (
|
|
1229
|
-
for (const [
|
|
1230
|
-
const
|
|
1231
|
-
typeof
|
|
1529
|
+
}), il = T(() => a.toolbar !== !1 && at.value.length > 0), Ve = /* @__PURE__ */ new Map();
|
|
1530
|
+
let Le = [];
|
|
1531
|
+
function de(e, l) {
|
|
1532
|
+
var s;
|
|
1533
|
+
A(e, l), (s = Ve.get(e)) == null || s.forEach((i) => i(l));
|
|
1534
|
+
}
|
|
1535
|
+
function St() {
|
|
1536
|
+
var s;
|
|
1537
|
+
Le.forEach((i) => i()), Le = [], Ve.clear();
|
|
1538
|
+
const e = (i, m) => {
|
|
1539
|
+
let S = Ve.get(i);
|
|
1540
|
+
S || Ve.set(i, S = /* @__PURE__ */ new Set()), S.add(m);
|
|
1541
|
+
}, l = { viewer: Te, on: e, redraw: () => Pe() };
|
|
1542
|
+
for (const i of b.value) {
|
|
1543
|
+
if (i.events)
|
|
1544
|
+
for (const [S, D] of Object.entries(i.events)) D && e(S, D);
|
|
1545
|
+
const m = (s = i.setup) == null ? void 0 : s.call(i, l);
|
|
1546
|
+
typeof m == "function" && Le.push(m);
|
|
1232
1547
|
}
|
|
1233
1548
|
}
|
|
1234
|
-
const
|
|
1235
|
-
let
|
|
1236
|
-
function
|
|
1237
|
-
const e = { rectOf:
|
|
1238
|
-
|
|
1549
|
+
const it = x(null);
|
|
1550
|
+
let ae = null;
|
|
1551
|
+
function ul() {
|
|
1552
|
+
const e = { rectOf: Ye, rectOfRange: et, tick: ne.value, workbook: k.value };
|
|
1553
|
+
ae == null || ae.render(b.value, e);
|
|
1239
1554
|
}
|
|
1240
|
-
return
|
|
1555
|
+
return z([ne, b], ul, { flush: "post" }), (e, l) => (c(), v("div", {
|
|
1241
1556
|
class: "excel-viewer",
|
|
1242
1557
|
ref_key: "rootEl",
|
|
1243
|
-
ref:
|
|
1244
|
-
onKeydown:
|
|
1558
|
+
ref: Lt,
|
|
1559
|
+
onKeydown: tl
|
|
1245
1560
|
}, [
|
|
1246
|
-
|
|
1561
|
+
w(k) ? ee(e.$slots, "header", {
|
|
1247
1562
|
key: 0,
|
|
1248
|
-
workbook:
|
|
1249
|
-
zoom:
|
|
1250
|
-
setZoom: (
|
|
1251
|
-
downloadImage:
|
|
1252
|
-
downloadPdf:
|
|
1253
|
-
print:
|
|
1563
|
+
workbook: w(k),
|
|
1564
|
+
zoom: J.value,
|
|
1565
|
+
setZoom: (s) => J.value = s,
|
|
1566
|
+
downloadImage: Ce,
|
|
1567
|
+
downloadPdf: he,
|
|
1568
|
+
print: we
|
|
1254
1569
|
}, () => [
|
|
1255
|
-
|
|
1256
|
-
"file-name":
|
|
1257
|
-
"
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1570
|
+
dt(zl, {
|
|
1571
|
+
"file-name": At.value,
|
|
1572
|
+
"template-name": fe.value,
|
|
1573
|
+
"sheet-count": w(k).sheets.filter((s) => s.state === "visible").length,
|
|
1574
|
+
zoom: J.value,
|
|
1575
|
+
"onUpdate:zoom": l[0] || (l[0] = (s) => J.value = s),
|
|
1576
|
+
onExportImage: l[1] || (l[1] = (s) => Ce()),
|
|
1577
|
+
onExportPdf: Ct,
|
|
1578
|
+
onExportPdfVector: ht,
|
|
1579
|
+
onPrint: l[2] || (l[2] = (s) => we()),
|
|
1580
|
+
onOpenSettings: l[3] || (l[3] = (s) => Ee.value = !0)
|
|
1581
|
+
}, null, 8, ["file-name", "template-name", "sheet-count", "zoom"])
|
|
1582
|
+
], !0) : M("", !0),
|
|
1583
|
+
w(k) && il.value ? ee(e.$slots, "toolbar", {
|
|
1268
1584
|
key: 1,
|
|
1269
|
-
items:
|
|
1585
|
+
items: at.value
|
|
1270
1586
|
}, () => [
|
|
1271
|
-
|
|
1272
|
-
], !0) :
|
|
1273
|
-
|
|
1274
|
-
n("span",
|
|
1275
|
-
l[
|
|
1276
|
-
|
|
1587
|
+
dt(Un, { items: at.value }, null, 8, ["items"])
|
|
1588
|
+
], !0) : M("", !0),
|
|
1589
|
+
w(k) ? (c(), v("div", Zn, [
|
|
1590
|
+
n("span", Qn, E(Qe.value || "—"), 1),
|
|
1591
|
+
l[16] || (l[16] = n("span", { class: "fx" }, "fx", -1)),
|
|
1592
|
+
Ot.value ? (c(), v("input", {
|
|
1593
|
+
key: 0,
|
|
1594
|
+
class: "content content-input",
|
|
1595
|
+
value: Y.value,
|
|
1596
|
+
title: Y.value,
|
|
1597
|
+
spellcheck: "false",
|
|
1598
|
+
onFocus: Ht,
|
|
1599
|
+
onInput: l[4] || (l[4] = (s) => Y.value = s.target.value),
|
|
1600
|
+
onKeydown: qt,
|
|
1601
|
+
onBlur: Kt
|
|
1602
|
+
}, null, 40, Yn)) : (c(), v("span", {
|
|
1603
|
+
key: 1,
|
|
1277
1604
|
class: "content",
|
|
1278
|
-
title:
|
|
1279
|
-
}, E(
|
|
1280
|
-
])) :
|
|
1605
|
+
title: bt.value
|
|
1606
|
+
}, E(bt.value), 9, es))
|
|
1607
|
+
])) : M("", !0),
|
|
1281
1608
|
n("div", {
|
|
1282
1609
|
class: "render-area",
|
|
1283
1610
|
ref_key: "renderAreaEl",
|
|
1284
|
-
ref:
|
|
1611
|
+
ref: pe
|
|
1285
1612
|
}, [
|
|
1286
1613
|
n("canvas", {
|
|
1287
1614
|
ref_key: "canvasEl",
|
|
1288
|
-
ref:
|
|
1615
|
+
ref: Ke,
|
|
1289
1616
|
class: "grid-canvas"
|
|
1290
1617
|
}, null, 512),
|
|
1291
1618
|
n("div", {
|
|
1292
1619
|
class: "ov",
|
|
1293
1620
|
ref_key: "ovMain",
|
|
1294
|
-
ref:
|
|
1621
|
+
ref: qe
|
|
1295
1622
|
}, null, 512),
|
|
1296
1623
|
n("div", {
|
|
1297
1624
|
class: "ov",
|
|
1298
1625
|
ref_key: "ovFCol",
|
|
1299
|
-
ref:
|
|
1626
|
+
ref: Je
|
|
1300
1627
|
}, null, 512),
|
|
1301
1628
|
n("div", {
|
|
1302
1629
|
class: "ov",
|
|
1303
1630
|
ref_key: "ovFRow",
|
|
1304
|
-
ref:
|
|
1631
|
+
ref: _e
|
|
1305
1632
|
}, null, 512),
|
|
1306
1633
|
n("div", {
|
|
1307
1634
|
class: "ov",
|
|
1308
1635
|
ref_key: "ovCorner",
|
|
1309
|
-
ref:
|
|
1636
|
+
ref: je
|
|
1310
1637
|
}, null, 512),
|
|
1311
1638
|
n("div", {
|
|
1312
1639
|
class: "scroller",
|
|
1313
1640
|
ref_key: "scrollerEl",
|
|
1314
|
-
ref:
|
|
1641
|
+
ref: le,
|
|
1315
1642
|
tabindex: "0",
|
|
1316
|
-
onScroll:
|
|
1317
|
-
onMousedown:
|
|
1318
|
-
onMousemove:
|
|
1319
|
-
onMouseup:
|
|
1320
|
-
onMouseleave:
|
|
1321
|
-
onDblclick:
|
|
1322
|
-
onKeydown:
|
|
1643
|
+
onScroll: Wt,
|
|
1644
|
+
onMousedown: _t,
|
|
1645
|
+
onMousemove: jt,
|
|
1646
|
+
onMouseup: Gt,
|
|
1647
|
+
onMouseleave: Xt,
|
|
1648
|
+
onDblclick: Zt,
|
|
1649
|
+
onKeydown: Qt,
|
|
1650
|
+
onContextmenu: Jt
|
|
1323
1651
|
}, [
|
|
1324
1652
|
n("div", {
|
|
1325
1653
|
class: "spacer",
|
|
1326
1654
|
ref_key: "spacerEl",
|
|
1327
|
-
ref:
|
|
1655
|
+
ref: Ge
|
|
1328
1656
|
}, null, 512)
|
|
1329
1657
|
], 544),
|
|
1330
|
-
|
|
1658
|
+
$e.value && w(k) ? (c(), ie(un, {
|
|
1331
1659
|
key: 0,
|
|
1332
|
-
query:
|
|
1333
|
-
"match-count":
|
|
1334
|
-
current:
|
|
1335
|
-
"match-case":
|
|
1336
|
-
"whole-cell":
|
|
1337
|
-
"onUpdate:query": l[
|
|
1338
|
-
var
|
|
1339
|
-
return (
|
|
1660
|
+
query: Se.value.query,
|
|
1661
|
+
"match-count": Se.value.count,
|
|
1662
|
+
current: Se.value.index,
|
|
1663
|
+
"match-case": Se.value.matchCase,
|
|
1664
|
+
"whole-cell": Se.value.wholeCell,
|
|
1665
|
+
"onUpdate:query": l[5] || (l[5] = (s) => {
|
|
1666
|
+
var i;
|
|
1667
|
+
return (i = w(t)) == null ? void 0 : i.setFindQuery(s);
|
|
1340
1668
|
}),
|
|
1341
|
-
"onUpdate:matchCase": l[
|
|
1342
|
-
var
|
|
1343
|
-
return (
|
|
1669
|
+
"onUpdate:matchCase": l[6] || (l[6] = (s) => {
|
|
1670
|
+
var i;
|
|
1671
|
+
return (i = w(t)) == null ? void 0 : i.setFindMatchCase(s);
|
|
1344
1672
|
}),
|
|
1345
|
-
"onUpdate:wholeCell": l[
|
|
1346
|
-
var
|
|
1347
|
-
return (
|
|
1673
|
+
"onUpdate:wholeCell": l[7] || (l[7] = (s) => {
|
|
1674
|
+
var i;
|
|
1675
|
+
return (i = w(t)) == null ? void 0 : i.setFindWholeCell(s);
|
|
1348
1676
|
}),
|
|
1349
|
-
onNext: l[
|
|
1350
|
-
var
|
|
1351
|
-
return (
|
|
1677
|
+
onNext: l[8] || (l[8] = (s) => {
|
|
1678
|
+
var i;
|
|
1679
|
+
return (i = w(t)) == null ? void 0 : i.findNext();
|
|
1352
1680
|
}),
|
|
1353
|
-
onPrev: l[
|
|
1354
|
-
var
|
|
1355
|
-
return (
|
|
1681
|
+
onPrev: l[9] || (l[9] = (s) => {
|
|
1682
|
+
var i;
|
|
1683
|
+
return (i = w(t)) == null ? void 0 : i.findPrev();
|
|
1356
1684
|
}),
|
|
1357
|
-
onClose:
|
|
1358
|
-
}, null, 8, ["query", "match-count", "current", "match-case", "whole-cell"])) :
|
|
1359
|
-
|
|
1685
|
+
onClose: $t
|
|
1686
|
+
}, null, 8, ["query", "match-count", "current", "match-case", "whole-cell"])) : M("", !0),
|
|
1687
|
+
oe.value ? (c(), ie(bn, {
|
|
1360
1688
|
key: 1,
|
|
1361
|
-
values:
|
|
1362
|
-
selected:
|
|
1363
|
-
x:
|
|
1364
|
-
y:
|
|
1365
|
-
"sort-dir":
|
|
1366
|
-
onApply: l[
|
|
1367
|
-
var
|
|
1368
|
-
return (
|
|
1689
|
+
values: oe.value.values,
|
|
1690
|
+
selected: oe.value.selected,
|
|
1691
|
+
x: oe.value.x,
|
|
1692
|
+
y: oe.value.y,
|
|
1693
|
+
"sort-dir": oe.value.sortDir,
|
|
1694
|
+
onApply: l[10] || (l[10] = (s) => {
|
|
1695
|
+
var i;
|
|
1696
|
+
return (i = w(t)) == null ? void 0 : i.applyFilterSelection(s);
|
|
1369
1697
|
}),
|
|
1370
|
-
onClear: l[
|
|
1371
|
-
var
|
|
1372
|
-
return (
|
|
1698
|
+
onClear: l[11] || (l[11] = (s) => {
|
|
1699
|
+
var i;
|
|
1700
|
+
return (i = w(t)) == null ? void 0 : i.clearFilterColumn();
|
|
1373
1701
|
}),
|
|
1374
|
-
onClose: l[
|
|
1375
|
-
var
|
|
1376
|
-
return (
|
|
1702
|
+
onClose: l[12] || (l[12] = (s) => {
|
|
1703
|
+
var i;
|
|
1704
|
+
return (i = w(t)) == null ? void 0 : i.closeFilterPopup();
|
|
1377
1705
|
}),
|
|
1378
|
-
onSort: l[
|
|
1379
|
-
var
|
|
1380
|
-
const
|
|
1381
|
-
(
|
|
1706
|
+
onSort: l[13] || (l[13] = (s) => {
|
|
1707
|
+
var m, S, D;
|
|
1708
|
+
const i = (m = oe.value) == null ? void 0 : m.col;
|
|
1709
|
+
(S = w(t)) == null || S.closeFilterPopup(), i != null && ((D = w(t)) == null || D.sortColumn(i, s));
|
|
1382
1710
|
})
|
|
1383
|
-
}, null, 8, ["values", "selected", "x", "y", "sort-dir"])) :
|
|
1384
|
-
n("div",
|
|
1385
|
-
|
|
1386
|
-
rectOf:
|
|
1387
|
-
rectOfRange:
|
|
1388
|
-
tick:
|
|
1711
|
+
}, null, 8, ["values", "selected", "x", "y", "sort-dir"])) : M("", !0),
|
|
1712
|
+
n("div", ts, [
|
|
1713
|
+
ee(e.$slots, "overlay", {
|
|
1714
|
+
rectOf: Ye,
|
|
1715
|
+
rectOfRange: et,
|
|
1716
|
+
tick: ne.value
|
|
1389
1717
|
}, void 0, !0),
|
|
1390
1718
|
n("div", {
|
|
1391
1719
|
ref_key: "pluginOvEl",
|
|
1392
|
-
ref:
|
|
1720
|
+
ref: it
|
|
1393
1721
|
}, null, 512)
|
|
1394
1722
|
]),
|
|
1395
1723
|
n("div", {
|
|
1396
1724
|
class: "editor-slot",
|
|
1397
1725
|
ref_key: "editorSlotEl",
|
|
1398
|
-
ref:
|
|
1726
|
+
ref: Xe
|
|
1399
1727
|
}, null, 512),
|
|
1400
|
-
|
|
1728
|
+
se.value ? (c(), v("div", {
|
|
1401
1729
|
key: 2,
|
|
1402
|
-
class:
|
|
1403
|
-
style:
|
|
1404
|
-
}, E(
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
progress:
|
|
1408
|
-
label:
|
|
1409
|
-
pct:
|
|
1730
|
+
class: B(["cell-tooltip", se.value.kind]),
|
|
1731
|
+
style: Be({ left: se.value.x + "px", top: se.value.y + "px" })
|
|
1732
|
+
}, E(se.value.text), 7)) : M("", !0),
|
|
1733
|
+
w(P) ? (c(), v("div", ls, [
|
|
1734
|
+
ee(e.$slots, "loading", {
|
|
1735
|
+
progress: w(te),
|
|
1736
|
+
label: gt.value,
|
|
1737
|
+
pct: me.value
|
|
1410
1738
|
}, () => [
|
|
1411
|
-
n("div",
|
|
1412
|
-
n("div",
|
|
1413
|
-
L(E(
|
|
1414
|
-
|
|
1739
|
+
n("div", ns, [
|
|
1740
|
+
n("div", ss, [
|
|
1741
|
+
L(E(gt.value), 1),
|
|
1742
|
+
me.value != null ? (c(), v("span", os, E(me.value) + "%", 1)) : M("", !0)
|
|
1415
1743
|
]),
|
|
1416
|
-
n("div",
|
|
1417
|
-
|
|
1744
|
+
n("div", as, [
|
|
1745
|
+
me.value != null ? (c(), v("div", {
|
|
1418
1746
|
key: 0,
|
|
1419
1747
|
class: "loader-fill",
|
|
1420
|
-
style:
|
|
1421
|
-
}, null, 4)) : (
|
|
1748
|
+
style: Be({ width: me.value + "%" })
|
|
1749
|
+
}, null, 4)) : (c(), v("div", is))
|
|
1422
1750
|
])
|
|
1423
1751
|
])
|
|
1424
1752
|
], !0)
|
|
1425
|
-
])) :
|
|
1426
|
-
|
|
1427
|
-
L("解析失败:" + E(
|
|
1753
|
+
])) : w(I) ? (c(), v("div", us, [
|
|
1754
|
+
ee(e.$slots, "error", { error: w(I) }, () => [
|
|
1755
|
+
L("解析失败:" + E(w(I)), 1)
|
|
1428
1756
|
], !0)
|
|
1429
|
-
])) :
|
|
1430
|
-
|
|
1431
|
-
l[
|
|
1757
|
+
])) : w(k) ? M("", !0) : (c(), v("div", rs, [
|
|
1758
|
+
ee(e.$slots, "empty", {}, () => [
|
|
1759
|
+
l[17] || (l[17] = L("拖入或选择一个 .xlsx 文件", -1))
|
|
1432
1760
|
], !0)
|
|
1433
1761
|
]))
|
|
1434
1762
|
], 512),
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
stats:
|
|
1438
|
-
range:
|
|
1763
|
+
w(k) ? (c(), v("div", ds, [
|
|
1764
|
+
ee(e.$slots, "statusbar", {
|
|
1765
|
+
stats: W.value,
|
|
1766
|
+
range: yt.value || Qe.value
|
|
1439
1767
|
}, () => [
|
|
1440
|
-
n("span",
|
|
1441
|
-
l[
|
|
1442
|
-
|
|
1443
|
-
n("span", null, "计数 " + E(
|
|
1444
|
-
n("span", null, "求和 " + E(
|
|
1445
|
-
n("span", null, "平均 " + E(
|
|
1446
|
-
n("span", null, "最大 " + E(
|
|
1447
|
-
n("span", null, "最小 " + E(
|
|
1448
|
-
], 64)) :
|
|
1768
|
+
n("span", cs, E(yt.value || Qe.value), 1),
|
|
1769
|
+
l[18] || (l[18] = n("div", { class: "grow" }, null, -1)),
|
|
1770
|
+
W.value && W.value.numCount > 0 ? (c(), v(U, { key: 0 }, [
|
|
1771
|
+
n("span", null, "计数 " + E(W.value.count), 1),
|
|
1772
|
+
n("span", null, "求和 " + E(ze(W.value.sum)), 1),
|
|
1773
|
+
n("span", null, "平均 " + E(ze(W.value.avg)), 1),
|
|
1774
|
+
n("span", null, "最大 " + E(ze(W.value.max)), 1),
|
|
1775
|
+
n("span", null, "最小 " + E(ze(W.value.min)), 1)
|
|
1776
|
+
], 64)) : W.value && W.value.count > 0 ? (c(), v("span", vs, "计数 " + E(W.value.count), 1)) : M("", !0)
|
|
1449
1777
|
], !0)
|
|
1450
|
-
])) :
|
|
1451
|
-
|
|
1778
|
+
])) : M("", !0),
|
|
1779
|
+
w(k) ? (c(), ie(Nl, {
|
|
1452
1780
|
key: 4,
|
|
1453
|
-
workbook:
|
|
1454
|
-
active:
|
|
1455
|
-
onSelect: l[
|
|
1456
|
-
}, null, 8, ["workbook", "active"])) :
|
|
1457
|
-
|
|
1781
|
+
workbook: w(k),
|
|
1782
|
+
active: _.value,
|
|
1783
|
+
onSelect: l[14] || (l[14] = (s) => _.value = s)
|
|
1784
|
+
}, null, 8, ["workbook", "active"])) : M("", !0),
|
|
1785
|
+
Ee.value && w(k) ? (c(), ie(ln, {
|
|
1458
1786
|
key: 5,
|
|
1459
|
-
selection:
|
|
1460
|
-
"sheet-count":
|
|
1461
|
-
onClose: l[
|
|
1462
|
-
onExport:
|
|
1463
|
-
}, null, 8, ["selection", "sheet-count"])) :
|
|
1787
|
+
selection: Q.value,
|
|
1788
|
+
"sheet-count": w(k).sheets.filter((s) => s.state === "visible").length,
|
|
1789
|
+
onClose: l[15] || (l[15] = (s) => Ee.value = !1),
|
|
1790
|
+
onExport: sl
|
|
1791
|
+
}, null, 8, ["selection", "sheet-count"])) : M("", !0),
|
|
1792
|
+
n("input", {
|
|
1793
|
+
ref_key: "templateInputEl",
|
|
1794
|
+
ref: mt,
|
|
1795
|
+
type: "file",
|
|
1796
|
+
accept: ".xlsx,.xlsm",
|
|
1797
|
+
hidden: "",
|
|
1798
|
+
onChange: zt
|
|
1799
|
+
}, null, 544),
|
|
1800
|
+
d.exportProgress !== !1 ? ee(e.$slots, "export-progress", {
|
|
1801
|
+
key: 6,
|
|
1802
|
+
state: ke.value,
|
|
1803
|
+
busy: Ae.value,
|
|
1804
|
+
cancel: xt
|
|
1805
|
+
}, () => [
|
|
1806
|
+
dt(Xn, {
|
|
1807
|
+
state: ke.value,
|
|
1808
|
+
busy: Ae.value,
|
|
1809
|
+
onCancel: xt
|
|
1810
|
+
}, null, 8, ["state", "busy"])
|
|
1811
|
+
], !0) : M("", !0)
|
|
1464
1812
|
], 544));
|
|
1465
1813
|
}
|
|
1466
|
-
}),
|
|
1467
|
-
install(
|
|
1468
|
-
|
|
1814
|
+
}), ms = /* @__PURE__ */ X(fs, [["__scopeId", "data-v-96e040f0"]]), bs = {
|
|
1815
|
+
install(d) {
|
|
1816
|
+
d.component("ExcelViewer", ms);
|
|
1469
1817
|
}
|
|
1470
1818
|
};
|
|
1471
1819
|
export {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1820
|
+
Cs as DEFAULT_THEME,
|
|
1821
|
+
ms as ExcelViewer,
|
|
1822
|
+
hs as canvasToBlob,
|
|
1823
|
+
ws as canvasToDataURL,
|
|
1824
|
+
$s as cellDisplayText,
|
|
1825
|
+
Ss as cellKey,
|
|
1826
|
+
bs as default,
|
|
1827
|
+
zs as definePlugin,
|
|
1828
|
+
Es as downloadBlob,
|
|
1829
|
+
Ts as formatValue,
|
|
1830
|
+
Ms as getCell,
|
|
1831
|
+
Fs as getCellStyle,
|
|
1832
|
+
yl as getCellText,
|
|
1833
|
+
bl as getCellValue,
|
|
1834
|
+
ml as getRangeData,
|
|
1835
|
+
gl as getSheetData,
|
|
1836
|
+
Is as getWorkbookJSON,
|
|
1489
1837
|
Ft as loadArrayBuffer,
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1838
|
+
Rs as mergeTheme,
|
|
1839
|
+
Ps as parseWorkbook,
|
|
1840
|
+
pl as sheetToJSON
|
|
1493
1841
|
};
|