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