@hankchen/canvas-editor-vue 0.6.1 → 0.8.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/dist/{useDataSourceSchema-CG9EGzwc.js → DropdownMenu-CeUNKMDQ.js} +70 -84
- package/dist/ExpressionPathPicker-DchGsK70.js +739 -0
- package/dist/{canvas-CptBzpwT.js → canvas-DuvO27sj.js} +506 -485
- package/dist/canvas.js +1 -1
- package/dist/index.js +14 -15
- package/dist/layer-panel/TemplateTableForm.d.ts +1 -27
- package/dist/{layer-panel-Cz-tmbJJ.js → layer-panel-BouAYiDq.js} +231 -257
- package/dist/layer-panel.js +1 -1
- package/dist/property-panel/PropertyField.d.ts +9 -2
- package/dist/property-panel/fieldSchema.d.ts +28 -10
- package/dist/property-panel/fields/RowsPathField.d.ts +17 -0
- package/dist/property-panel/fields/index.d.ts +1 -0
- package/dist/property-panel/fields/intrinsicSize.d.ts +9 -0
- package/dist/property-panel/usePropertyPanel.d.ts +11 -2
- package/dist/{property-panel-OBqd6D8W.js → property-panel-BkfqRva4.js} +371 -271
- package/dist/property-panel.js +2 -2
- package/dist/resourceTemplate-D-DKEo7Z.js +33 -0
- package/dist/shared/ExpressionPathPicker.d.ts +9 -2
- package/dist/shared/index.d.ts +13 -10
- package/dist/shared/pathPickerModel.d.ts +16 -3
- package/dist/shared/popupPosition.d.ts +2 -2
- package/dist/shared/rowsPathPickerSource.d.ts +15 -0
- package/dist/shared/useDataSourceSchema.d.ts +6 -0
- package/dist/{shared-wuupBoZg.js → shared-CRDKDSpa.js} +22 -22
- package/dist/shared.js +9 -10
- package/dist/{status-bar-DCuK2R88.js → status-bar-DBf5kIXY.js} +6 -6
- package/dist/status-bar.js +1 -1
- package/dist/style.css +1 -1
- package/dist/uploadFile-mXJVPEzm.js +653 -0
- package/dist/{useTransientFeedback-CTjmMmFF.js → useTransientFeedback-BN_O7V2w.js} +43 -28
- package/package.json +2 -2
- package/dist/popupPosition-Ck5Gsvjy.js +0 -526
- package/dist/resourceTemplate-cdcQtp9a.js +0 -246
- package/dist/shared/rowsPathCompletionSource.d.ts +0 -3
- package/dist/shared/usePathCompletion.d.ts +0 -18
- package/dist/uploadFile-DbB-KhII.js +0 -520
- package/dist/usePathCompletion-Do17CQ6l.js +0 -220
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./createLucideIcon-SCvtEGVf.js";
|
|
2
2
|
import { i as t, r as n, t as r } from "./layerPath-uy2ywyld.js";
|
|
3
|
-
import {
|
|
4
|
-
import { c as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
var ae = e({
|
|
3
|
+
import { c as i, o as a, p as o, t as s } from "./ExpressionPathPicker-DchGsK70.js";
|
|
4
|
+
import { a as c, d as l, i as ee, s as u, t as d, u as f } from "./useTransientFeedback-BN_O7V2w.js";
|
|
5
|
+
import { t as te } from "./DropdownMenu-CeUNKMDQ.js";
|
|
6
|
+
import { Fragment as ne, computed as p, createBlock as re, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createVNode as _, defineComponent as v, nextTick as ie, normalizeClass as y, normalizeStyle as ae, onScopeDispose as b, openBlock as x, ref as S, renderList as oe, shallowRef as C, toDisplayString as w, unref as T, vModelText as se, watch as ce, withCtx as E, withDirectives as le, withKeys as D, withModifiers as O } from "vue";
|
|
7
|
+
var ue = e({
|
|
9
8
|
name: "eye-off",
|
|
10
9
|
size: 24,
|
|
11
10
|
node: [
|
|
@@ -26,7 +25,7 @@ var ae = e({
|
|
|
26
25
|
key: "1ooewy"
|
|
27
26
|
}]
|
|
28
27
|
]
|
|
29
|
-
}),
|
|
28
|
+
}), de = e({
|
|
30
29
|
name: "eye",
|
|
31
30
|
size: 24,
|
|
32
31
|
node: [["path", {
|
|
@@ -38,7 +37,7 @@ var ae = e({
|
|
|
38
37
|
r: "3",
|
|
39
38
|
key: "1v7zrd"
|
|
40
39
|
}]]
|
|
41
|
-
}),
|
|
40
|
+
}), fe = e({
|
|
42
41
|
name: "grip-vertical",
|
|
43
42
|
size: 24,
|
|
44
43
|
node: [
|
|
@@ -79,7 +78,7 @@ var ae = e({
|
|
|
79
78
|
key: "f4zoj3"
|
|
80
79
|
}]
|
|
81
80
|
]
|
|
82
|
-
}),
|
|
81
|
+
}), pe = e({
|
|
83
82
|
name: "lock-open",
|
|
84
83
|
size: 24,
|
|
85
84
|
node: [["rect", {
|
|
@@ -95,7 +94,7 @@ var ae = e({
|
|
|
95
94
|
key: "1mm8w8"
|
|
96
95
|
}]],
|
|
97
96
|
aliases: ["unlock"]
|
|
98
|
-
}),
|
|
97
|
+
}), me = e({
|
|
99
98
|
name: "lock",
|
|
100
99
|
size: 24,
|
|
101
100
|
node: [["rect", {
|
|
@@ -110,7 +109,7 @@ var ae = e({
|
|
|
110
109
|
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
111
110
|
key: "fwvmzm"
|
|
112
111
|
}]]
|
|
113
|
-
}),
|
|
112
|
+
}), he = e({
|
|
114
113
|
name: "pencil",
|
|
115
114
|
size: 24,
|
|
116
115
|
node: [["path", {
|
|
@@ -123,7 +122,7 @@ var ae = e({
|
|
|
123
122
|
});
|
|
124
123
|
//#endregion
|
|
125
124
|
//#region ../canvas-editor/src/editing/layerPanel.ts
|
|
126
|
-
function
|
|
125
|
+
function k(e) {
|
|
127
126
|
switch (e.type) {
|
|
128
127
|
case "TableLayer": return e.template === null ? [{
|
|
129
128
|
key: "rows",
|
|
@@ -149,7 +148,7 @@ function P(e) {
|
|
|
149
148
|
}];
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
|
-
function
|
|
151
|
+
function A(e) {
|
|
153
152
|
switch (e.type) {
|
|
154
153
|
case "TextLayer":
|
|
155
154
|
case "ImageLayer":
|
|
@@ -157,22 +156,22 @@ function F(e) {
|
|
|
157
156
|
default: return null;
|
|
158
157
|
}
|
|
159
158
|
}
|
|
160
|
-
var
|
|
161
|
-
function
|
|
162
|
-
let t =
|
|
159
|
+
var j = "{{…}}";
|
|
160
|
+
function M(e) {
|
|
161
|
+
let t = A(e);
|
|
163
162
|
if (t === null) return "";
|
|
164
163
|
let n = o(t).parts.flatMap((e) => e.kind === "fragment" && e.expr !== "" ? [e.expr] : []);
|
|
165
|
-
return n.length === 0 ?
|
|
164
|
+
return n.length === 0 ? j : n.map((e) => `{{${e}}}`).join(" ");
|
|
166
165
|
}
|
|
167
|
-
function
|
|
166
|
+
function N(e, t, n, i) {
|
|
168
167
|
let a = [];
|
|
169
|
-
for (let { key: n, layers: r } of
|
|
168
|
+
for (let { key: n, layers: r } of k(e)) for (let e = 0; e < r.length; e += 1) {
|
|
170
169
|
let o = n === "rows" ? "row" : n === "cells" ? "cell" : n === "template" ? "templateRow" : "content", s = n === "content" ? [...t, "content"] : n === "template" ? [...t, "template"] : [
|
|
171
170
|
...t,
|
|
172
171
|
n,
|
|
173
172
|
e
|
|
174
173
|
];
|
|
175
|
-
a.push(
|
|
174
|
+
a.push(N(r[e], s, o, i));
|
|
176
175
|
}
|
|
177
176
|
return {
|
|
178
177
|
type: e.type,
|
|
@@ -181,17 +180,17 @@ function R(e, t, n, i) {
|
|
|
181
180
|
name: e.name,
|
|
182
181
|
visible: e.visible,
|
|
183
182
|
locked: r(t, i),
|
|
184
|
-
expressionPrefix:
|
|
183
|
+
expressionPrefix: M(e),
|
|
185
184
|
...e.type === "TableLayer" ? { templated: e.template !== null } : null,
|
|
186
185
|
children: a
|
|
187
186
|
};
|
|
188
187
|
}
|
|
189
|
-
function
|
|
188
|
+
function P(e, t = []) {
|
|
190
189
|
let n = [];
|
|
191
|
-
for (let r = e.layers.length - 1; r >= 0; --r) n.push(
|
|
190
|
+
for (let r = e.layers.length - 1; r >= 0; --r) n.push(N(e.layers[r], ["layers", r], "root", t));
|
|
192
191
|
return n;
|
|
193
192
|
}
|
|
194
|
-
var
|
|
193
|
+
var F = [
|
|
195
194
|
{
|
|
196
195
|
id: "heading",
|
|
197
196
|
fontSize: 40
|
|
@@ -204,7 +203,7 @@ var B = [
|
|
|
204
203
|
id: "body",
|
|
205
204
|
fontSize: 16
|
|
206
205
|
}
|
|
207
|
-
],
|
|
206
|
+
], I = [
|
|
208
207
|
{
|
|
209
208
|
id: "free",
|
|
210
209
|
ratio: null
|
|
@@ -244,7 +243,7 @@ var B = [
|
|
|
244
243
|
h: 16
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
|
-
],
|
|
246
|
+
], L = [
|
|
248
247
|
{
|
|
249
248
|
kind: "layer",
|
|
250
249
|
type: "TextLayer",
|
|
@@ -274,129 +273,100 @@ var B = [
|
|
|
274
273
|
label: "模板表",
|
|
275
274
|
title: "新增模板表(行模板 + 数据行展开)"
|
|
276
275
|
}
|
|
277
|
-
],
|
|
276
|
+
], R = {
|
|
278
277
|
heading: "标题",
|
|
279
278
|
subheading: "副标题",
|
|
280
279
|
body: "正文"
|
|
281
|
-
},
|
|
280
|
+
}, z = F.map(({ id: e, fontSize: t }) => ({
|
|
282
281
|
kind: "text-preset",
|
|
283
282
|
preset: e,
|
|
284
|
-
label:
|
|
283
|
+
label: R[e],
|
|
285
284
|
shortcut: `${t}号`,
|
|
286
|
-
title: `画拉建${
|
|
285
|
+
title: `画拉建${R[e]}文本层(字号 ${t},点击后在画布拖拽定落位与尺寸,Esc 取消)`
|
|
287
286
|
}));
|
|
288
|
-
function
|
|
287
|
+
function B(e) {
|
|
289
288
|
return e === null ? "任意宽高" : e.w === e.h ? "正方形" : e.w > e.h ? "横向" : "纵向";
|
|
290
289
|
}
|
|
291
|
-
var
|
|
290
|
+
var V = I.flatMap(({ id: e, ratio: t }) => e === "free" ? [] : [{
|
|
292
291
|
kind: "ratio-preset",
|
|
293
292
|
preset: e,
|
|
294
293
|
label: e,
|
|
295
|
-
shortcut:
|
|
296
|
-
title: `画拉建 ${e} 图片层(${
|
|
297
|
-
}]),
|
|
294
|
+
shortcut: B(t),
|
|
295
|
+
title: `画拉建 ${e} 图片层(${B(t)},画拉中按住 Shift 临时自由;点击后在画布拖拽定落位与尺寸,Esc 取消)`
|
|
296
|
+
}]), H = L.map((e) => e.kind === "layer" ? e.type === "TextLayer" ? {
|
|
298
297
|
...e,
|
|
299
|
-
children:
|
|
298
|
+
children: z
|
|
300
299
|
} : e.type === "ImageLayer" ? {
|
|
301
300
|
...e,
|
|
302
|
-
children:
|
|
303
|
-
} : e : e),
|
|
304
|
-
function
|
|
305
|
-
return `画拉建${e}(${t}),${
|
|
301
|
+
children: V
|
|
302
|
+
} : e : e), U = L;
|
|
303
|
+
function ge(e, t) {
|
|
304
|
+
return `画拉建${e}(${t}),${u}`;
|
|
306
305
|
}
|
|
307
306
|
//#endregion
|
|
308
307
|
//#region src/layer-panel/TemplateTableForm.vue?vue&type=script&setup=true&lang.ts
|
|
309
|
-
var
|
|
310
|
-
key: 0,
|
|
311
|
-
class: "px-2 pb-1 text-[11px] text-cn-danger"
|
|
312
|
-
}, X = { class: "flex gap-1 p-1" }, fe = /* @__PURE__ */ S({
|
|
308
|
+
var W = { class: "mx-1 my-1" }, G = { class: "flex gap-1 p-1" }, K = ["disabled"], q = /* @__PURE__ */ v({
|
|
313
309
|
__name: "TemplateTableForm",
|
|
314
310
|
props: { editor: {} },
|
|
315
311
|
emits: ["confirm", "cancel"],
|
|
316
312
|
setup(e, { emit: t }) {
|
|
317
|
-
let n = e, r = t,
|
|
318
|
-
function
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
target: u,
|
|
328
|
-
enabled: () => !0,
|
|
329
|
-
resolve: (e) => l.value?.(e) ?? null,
|
|
330
|
-
popupEl: g(() => p.value?.rootEl ?? null)
|
|
331
|
-
});
|
|
332
|
-
function S(e) {
|
|
333
|
-
if (e.key === "Enter") {
|
|
334
|
-
if (h.open && h.items.length > 0) return;
|
|
335
|
-
e.preventDefault(), s();
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
e.key === "Escape" && (h.open ? e.stopPropagation() : r("cancel"));
|
|
339
|
-
}
|
|
340
|
-
return (e, t) => (w(), y("div", null, [
|
|
341
|
-
t[3] ||= b("p", { class: "px-2 pt-1 text-[11px] leading-4 text-cn-muted" }, "模板行按数据行路径展开成表", -1),
|
|
342
|
-
j(b("input", {
|
|
343
|
-
ref_key: "rowsPathInputEl",
|
|
344
|
-
ref: u,
|
|
345
|
-
"onUpdate:modelValue": t[0] ||= (e) => a.value = e,
|
|
313
|
+
let n = e, r = t, i = S("");
|
|
314
|
+
function o() {
|
|
315
|
+
i.value !== "" && r("confirm", i.value);
|
|
316
|
+
}
|
|
317
|
+
let l = c(n.editor), ee = p(() => a(l.value));
|
|
318
|
+
return (e, t) => (x(), h("div", null, [
|
|
319
|
+
t[2] ||= g("p", { class: "px-2 pt-1 text-[11px] leading-4 text-cn-muted" }, "模板行按取行路径展开成表", -1),
|
|
320
|
+
g("div", W, [_(s, {
|
|
321
|
+
modelValue: i.value,
|
|
322
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.value = e,
|
|
346
323
|
"data-template-rows-path": "",
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
o.value ? (w(), y("p", Y, "rowsPath 必填")) : v("", !0),
|
|
354
|
-
b("div", X, [b("button", {
|
|
324
|
+
mode: "rowsPath",
|
|
325
|
+
source: ee.value,
|
|
326
|
+
"aria-label": "取行路径",
|
|
327
|
+
placeholder: "未选择行路径"
|
|
328
|
+
}, null, 8, ["modelValue", "source"])]),
|
|
329
|
+
g("div", G, [g("button", {
|
|
355
330
|
type: "button",
|
|
356
331
|
"data-template-confirm": "",
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
332
|
+
disabled: i.value === "",
|
|
333
|
+
class: "flex-1 rounded bg-cn-accent/20 px-2 py-1 text-[12px] text-cn-accent hover:bg-cn-accent/30 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-cn-accent/20",
|
|
334
|
+
onClick: o
|
|
335
|
+
}, " 创建 ", 8, K), g("button", {
|
|
360
336
|
type: "button",
|
|
361
337
|
"data-template-cancel": "",
|
|
362
338
|
class: "flex-1 rounded px-2 py-1 text-[12px] text-cn-muted hover:text-cn-fg",
|
|
363
|
-
onClick: t[
|
|
364
|
-
}, " 取消 ")])
|
|
365
|
-
x(i, {
|
|
366
|
-
ref_key: "pathPopupRef",
|
|
367
|
-
ref: p,
|
|
368
|
-
state: O(h),
|
|
369
|
-
onSelect: O(_)
|
|
370
|
-
}, null, 8, ["state", "onSelect"])
|
|
339
|
+
onClick: t[1] ||= (e) => r("cancel")
|
|
340
|
+
}, " 取消 ")])
|
|
371
341
|
]));
|
|
372
342
|
}
|
|
373
343
|
});
|
|
374
344
|
//#endregion
|
|
375
345
|
//#region src/layer-panel/useLayerPanel.ts
|
|
376
|
-
function
|
|
377
|
-
let t =
|
|
346
|
+
function J(e) {
|
|
347
|
+
let t = C(e.store.doc), n = C(e.store.ui.selection), r = C(e.store.ui.hovered), i = C(e.store.ui.renaming), a = C(e.store.ui.lockedPaths), o = e.subscribe((o) => {
|
|
378
348
|
o.scope === "doc" ? (t.value = e.store.doc, n.value = e.store.ui.selection, r.value = e.store.ui.hovered, i.value = e.store.ui.renaming, a.value = e.store.ui.lockedPaths) : o.branch === "selection" ? n.value = e.store.ui.selection : o.branch === "hovered" ? r.value = e.store.ui.hovered : o.branch === "renaming" ? i.value = e.store.ui.renaming : o.branch === "lockedPaths" && (a.value = e.store.ui.lockedPaths);
|
|
379
349
|
});
|
|
380
|
-
return
|
|
381
|
-
outline:
|
|
382
|
-
selection:
|
|
383
|
-
hovered:
|
|
384
|
-
renaming:
|
|
350
|
+
return b(o, !0), {
|
|
351
|
+
outline: p(() => t.value ? P(t.value, a.value) : []),
|
|
352
|
+
selection: p(() => n.value),
|
|
353
|
+
hovered: p(() => r.value),
|
|
354
|
+
renaming: p(() => i.value)
|
|
385
355
|
};
|
|
386
356
|
}
|
|
387
|
-
function
|
|
357
|
+
function Y(e, t) {
|
|
388
358
|
return t > 0 && e < t / 2;
|
|
389
359
|
}
|
|
390
360
|
//#endregion
|
|
391
361
|
//#region src/layer-panel/LayerPanel.vue?vue&type=script&setup=true&lang.ts
|
|
392
|
-
var
|
|
362
|
+
var _e = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rounded-xl border border-cn-line bg-cn-bg text-cn-fg shadow-[0_16px_40px_-12px_rgba(2,6,23,0.55)]" }, ve = { class: "sticky top-0 z-10 flex items-center justify-between border-b border-cn-line bg-cn-bg-elevated/95 px-3.5 py-2.5" }, ye = { class: "flex items-center gap-1" }, be = [
|
|
393
363
|
"aria-expanded",
|
|
394
364
|
"onClick",
|
|
395
365
|
"onKeydown"
|
|
396
|
-
],
|
|
366
|
+
], xe = {
|
|
397
367
|
key: 0,
|
|
398
368
|
class: "mx-3.5 my-4 rounded-lg border border-dashed border-cn-line px-3 py-6 text-center text-[11px] leading-5 text-cn-muted"
|
|
399
|
-
},
|
|
369
|
+
}, Se = [
|
|
400
370
|
"data-key",
|
|
401
371
|
"draggable",
|
|
402
372
|
"onClick",
|
|
@@ -404,38 +374,42 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
404
374
|
"onDragstart",
|
|
405
375
|
"onDragover",
|
|
406
376
|
"onDrop"
|
|
407
|
-
],
|
|
377
|
+
], Ce = ["onDragstart"], we = ["title"], Te = ["onDblclick"], Ee = [
|
|
408
378
|
"title",
|
|
409
379
|
"aria-pressed",
|
|
410
380
|
"onClick"
|
|
411
|
-
],
|
|
381
|
+
], De = [
|
|
412
382
|
"title",
|
|
413
383
|
"aria-pressed",
|
|
414
384
|
"onClick"
|
|
415
|
-
],
|
|
385
|
+
], Oe = ["onClick"], ke = [
|
|
416
386
|
"disabled",
|
|
417
387
|
"title",
|
|
418
388
|
"onClick"
|
|
419
|
-
],
|
|
389
|
+
], Ae = ["onClick"], je = ["onClick"], Me = [
|
|
420
390
|
"disabled",
|
|
421
391
|
"title",
|
|
422
392
|
"onClick"
|
|
423
|
-
],
|
|
393
|
+
], X = /* @__PURE__ */ v({
|
|
424
394
|
__name: "LayerPanel",
|
|
425
395
|
props: { editor: {} },
|
|
426
396
|
setup(e) {
|
|
427
|
-
let r = e,
|
|
428
|
-
if (e.kind === "template-table")
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
397
|
+
let r = e, a = `解锁图层(${l("toggleLayerLock", f())})`, o = `图层已锁定(${l("toggleLayerLock", f())} 解锁后可删除)`, s = J(r.editor), v = c(r.editor), b = S(!1), C = p(() => b.value ? [] : H.map((e) => {
|
|
398
|
+
if (e.kind === "template-table") {
|
|
399
|
+
let t = v.value === null;
|
|
400
|
+
return {
|
|
401
|
+
label: e.label,
|
|
402
|
+
title: t ? ee : e.title,
|
|
403
|
+
disabled: t,
|
|
404
|
+
dataAttrs: { "data-add-layer": "template-table" },
|
|
405
|
+
keepsOpen: !0,
|
|
406
|
+
run: () => {
|
|
407
|
+
b.value = !0;
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
437
411
|
let t = { "data-add-layer": e.type }, n = () => {
|
|
438
|
-
r.editor.armLayerCreate(e.type),
|
|
412
|
+
r.editor.armLayerCreate(e.type), d().show(u);
|
|
439
413
|
};
|
|
440
414
|
return e.children === void 0 ? {
|
|
441
415
|
label: e.label,
|
|
@@ -457,21 +431,21 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
457
431
|
...t.kind === "text-preset" ? { "data-text-preset": t.preset } : { "data-ratio-preset": t.preset }
|
|
458
432
|
},
|
|
459
433
|
run: () => {
|
|
460
|
-
r.editor.armLayerCreate(e.type, t.preset),
|
|
434
|
+
r.editor.armLayerCreate(e.type, t.preset), d().show(ge(e.label, t.label));
|
|
461
435
|
}
|
|
462
436
|
}))
|
|
463
437
|
};
|
|
464
438
|
}));
|
|
465
|
-
function
|
|
466
|
-
r.editor.armTemplateTableCreate(e),
|
|
439
|
+
function k(e, t) {
|
|
440
|
+
r.editor.armTemplateTableCreate(e), d().show(u), t();
|
|
467
441
|
}
|
|
468
|
-
function
|
|
469
|
-
|
|
442
|
+
function A(e) {
|
|
443
|
+
b.value = !1, e();
|
|
470
444
|
}
|
|
471
|
-
function
|
|
472
|
-
|
|
445
|
+
function j() {
|
|
446
|
+
b.value = !1;
|
|
473
447
|
}
|
|
474
|
-
function
|
|
448
|
+
function M(e, t) {
|
|
475
449
|
switch (e.role) {
|
|
476
450
|
case "root": return e.name === "" ? `${e.type} ${t}` : e.name;
|
|
477
451
|
case "row": return `行 ${Number(e.path[e.path.length - 1]) + 1}`;
|
|
@@ -480,7 +454,7 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
480
454
|
case "content": return e.type;
|
|
481
455
|
}
|
|
482
456
|
}
|
|
483
|
-
let
|
|
457
|
+
let N = p(() => {
|
|
484
458
|
let e = [], t = /* @__PURE__ */ new Map();
|
|
485
459
|
function r(i, a, o, s) {
|
|
486
460
|
let c = i.role === "row" ? i.path.slice(0, -2) : i.role === "templateRow" ? i.path.slice(0, -1) : s, l = 0;
|
|
@@ -488,42 +462,42 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
488
462
|
key: i.path.join("."),
|
|
489
463
|
node: i,
|
|
490
464
|
indentLevel: a,
|
|
491
|
-
label:
|
|
465
|
+
label: M(i, l),
|
|
492
466
|
indexInGroup: o,
|
|
493
467
|
tablePath: c,
|
|
494
468
|
inTemplate: n(i.path),
|
|
495
469
|
draggable: i.role === "root" || i.role === "row" || i.role === "cell"
|
|
496
470
|
}), i.children.forEach((e, t) => r(e, a + 1, t, c));
|
|
497
471
|
}
|
|
498
|
-
return
|
|
499
|
-
}),
|
|
500
|
-
function
|
|
472
|
+
return s.outline.value.forEach((e, t) => r(e, 0, t, null)), e;
|
|
473
|
+
}), P = p(() => N.value.length > 0);
|
|
474
|
+
function F(e) {
|
|
501
475
|
r.editor.setSelection(e.node.path);
|
|
502
476
|
}
|
|
503
|
-
function
|
|
477
|
+
function I(e) {
|
|
504
478
|
r.editor.setHovered(e === null ? null : e.node.path);
|
|
505
479
|
}
|
|
506
|
-
function
|
|
480
|
+
function L(e) {
|
|
507
481
|
r.editor.addTableRow(e.node.path);
|
|
508
482
|
}
|
|
509
|
-
function
|
|
483
|
+
function R(e) {
|
|
510
484
|
r.editor.addTableCell(e.node.path);
|
|
511
485
|
}
|
|
512
|
-
function
|
|
486
|
+
function z(e) {
|
|
513
487
|
r.editor.addTemplateCell(e.node.path.slice(0, -1));
|
|
514
488
|
}
|
|
515
|
-
function
|
|
489
|
+
function B(e) {
|
|
516
490
|
r.editor.deleteLayer(e.node.path);
|
|
517
491
|
}
|
|
518
|
-
function
|
|
492
|
+
function V(e) {
|
|
519
493
|
r.editor.toggleLayerVisibility(e.node.path);
|
|
520
494
|
}
|
|
521
|
-
function
|
|
495
|
+
function U(e) {
|
|
522
496
|
r.editor.toggleLayerLock(e.node.path);
|
|
523
497
|
}
|
|
524
|
-
let
|
|
525
|
-
function
|
|
526
|
-
let r =
|
|
498
|
+
let W = S(null), G = S(null);
|
|
499
|
+
function K(e) {
|
|
500
|
+
let r = W.value;
|
|
527
501
|
if (!r) return !1;
|
|
528
502
|
if (r.kind === "root") return e.node.role === "root";
|
|
529
503
|
if (r.kind === "row") return e.node.role === "row";
|
|
@@ -531,11 +505,11 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
531
505
|
let i = n(r.cellPath);
|
|
532
506
|
return i === e.inTemplate ? !i || t(r.cellPath.slice(0, -2), e.node.path.slice(0, -2)) : !1;
|
|
533
507
|
}
|
|
534
|
-
function
|
|
508
|
+
function X(e) {
|
|
535
509
|
return e.node.role === "root";
|
|
536
510
|
}
|
|
537
|
-
function
|
|
538
|
-
e.draggable && (
|
|
511
|
+
function Z(e, t) {
|
|
512
|
+
e.draggable && (W.value = e.node.role === "root" ? {
|
|
539
513
|
kind: "root",
|
|
540
514
|
from: e.indexInGroup
|
|
541
515
|
} : e.node.role === "row" ? {
|
|
@@ -549,74 +523,74 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
549
523
|
cellPath: e.node.path
|
|
550
524
|
}, t.dataTransfer?.setData("text/plain", e.key), t.dataTransfer && (t.dataTransfer.effectAllowed = "move"));
|
|
551
525
|
}
|
|
552
|
-
function
|
|
553
|
-
|
|
526
|
+
function Ne(e, t) {
|
|
527
|
+
X(e) || Z(e, t);
|
|
554
528
|
}
|
|
555
|
-
function
|
|
556
|
-
if (!
|
|
529
|
+
function Pe(e) {
|
|
530
|
+
if (!X(e)) return e.draggable || void 0;
|
|
557
531
|
}
|
|
558
|
-
function
|
|
559
|
-
if (!
|
|
560
|
-
let n = t.currentTarget.getBoundingClientRect(), r =
|
|
561
|
-
t.preventDefault(),
|
|
532
|
+
function Fe(e, t) {
|
|
533
|
+
if (!K(e)) return;
|
|
534
|
+
let n = t.currentTarget.getBoundingClientRect(), r = Y(t.clientY - n.top, n.height);
|
|
535
|
+
t.preventDefault(), G.value = {
|
|
562
536
|
key: e.key,
|
|
563
537
|
edge: r ? "before" : "after"
|
|
564
538
|
};
|
|
565
539
|
}
|
|
566
|
-
function
|
|
567
|
-
if (!
|
|
568
|
-
let n =
|
|
540
|
+
function Ie(e, t) {
|
|
541
|
+
if (!K(e)) return;
|
|
542
|
+
let n = G.value, i = W.value;
|
|
569
543
|
if (!i || !n || n.key !== e.key) return;
|
|
570
544
|
t.preventDefault();
|
|
571
545
|
let a = n.edge === "before" ? e.indexInGroup : e.indexInGroup + 1;
|
|
572
|
-
i.kind === "root" ? r.editor.moveRootLayer(i.from, a) : i.kind === "row" ? e.tablePath !== null && e.tablePath.join(".") === i.tablePath.join(".") ? r.editor.moveTableRow(i.tablePath, i.from, a) : r.editor.moveTableRowToTable(i.rowPath, e.tablePath, a) : r.editor.moveTableCellToRow(i.cellPath, e.node.path.slice(0, -2), a),
|
|
573
|
-
}
|
|
574
|
-
function Fe() {
|
|
575
|
-
G.value = null, K.value = null;
|
|
546
|
+
i.kind === "root" ? r.editor.moveRootLayer(i.from, a) : i.kind === "row" ? e.tablePath !== null && e.tablePath.join(".") === i.tablePath.join(".") ? r.editor.moveTableRow(i.tablePath, i.from, a) : r.editor.moveTableRowToTable(i.rowPath, e.tablePath, a) : r.editor.moveTableCellToRow(i.cellPath, e.node.path.slice(0, -2), a), W.value = null, G.value = null;
|
|
576
547
|
}
|
|
577
|
-
function
|
|
578
|
-
|
|
548
|
+
function Le() {
|
|
549
|
+
W.value = null, G.value = null;
|
|
579
550
|
}
|
|
580
|
-
function
|
|
581
|
-
return t(
|
|
551
|
+
function Re(e) {
|
|
552
|
+
return t(s.selection.value, e.node.path);
|
|
582
553
|
}
|
|
583
|
-
let Z = T(""), Q = null, Re = null;
|
|
584
554
|
function ze(e) {
|
|
585
|
-
|
|
586
|
-
}
|
|
587
|
-
function Be(e) {
|
|
588
|
-
return t(d.renaming.value, e.node.path);
|
|
555
|
+
return t(s.hovered.value, e.node.path);
|
|
589
556
|
}
|
|
557
|
+
let Q = S(""), $ = null, Be = null;
|
|
590
558
|
function Ve(e) {
|
|
591
|
-
|
|
559
|
+
Be = e instanceof HTMLInputElement ? e : null;
|
|
560
|
+
}
|
|
561
|
+
function He(e) {
|
|
562
|
+
return t(s.renaming.value, e.node.path);
|
|
563
|
+
}
|
|
564
|
+
function Ue(e) {
|
|
565
|
+
X(e) && r.editor.beginRename(e.node.path);
|
|
592
566
|
}
|
|
593
|
-
function
|
|
594
|
-
let e =
|
|
595
|
-
if (
|
|
567
|
+
function We() {
|
|
568
|
+
let e = Q.value.trim();
|
|
569
|
+
if ($ !== null && e === $.trim()) {
|
|
596
570
|
r.editor.cancelRename();
|
|
597
571
|
return;
|
|
598
572
|
}
|
|
599
573
|
r.editor.commitRename(e);
|
|
600
574
|
}
|
|
601
|
-
function
|
|
575
|
+
function Ge() {
|
|
602
576
|
r.editor.cancelRename();
|
|
603
577
|
}
|
|
604
|
-
return
|
|
578
|
+
return ce(s.renaming, async (e) => {
|
|
605
579
|
if (e === null) {
|
|
606
|
-
|
|
580
|
+
$ = null;
|
|
607
581
|
return;
|
|
608
582
|
}
|
|
609
|
-
let n =
|
|
610
|
-
|
|
611
|
-
let r =
|
|
583
|
+
let n = N.value.find((n) => t(n.node.path, e));
|
|
584
|
+
Q.value = n?.label ?? "", $ = Q.value, await ie();
|
|
585
|
+
let r = Be;
|
|
612
586
|
r && (r.focus({ preventScroll: !0 }), r.select());
|
|
613
|
-
}), (e, t) => (
|
|
614
|
-
|
|
587
|
+
}), (e, t) => (x(), h("aside", _e, [
|
|
588
|
+
g("header", ve, [t[7] ||= g("span", { class: "text-[12px] font-medium tracking-wide text-cn-fg/90" }, "图层", -1), g("div", ye, [_(te, {
|
|
615
589
|
label: "新增图层",
|
|
616
|
-
items:
|
|
617
|
-
onClosed:
|
|
590
|
+
items: C.value,
|
|
591
|
+
onClosed: j
|
|
618
592
|
}, {
|
|
619
|
-
trigger:
|
|
593
|
+
trigger: E(({ open: e, toggle: t, triggerRef: n, onKeydown: r }) => [g("button", {
|
|
620
594
|
ref: n,
|
|
621
595
|
type: "button",
|
|
622
596
|
"data-add-menu": "",
|
|
@@ -626,151 +600,151 @@ var he = { class: "cn-props flex w-[232px] shrink-0 flex-col overflow-y-auto rou
|
|
|
626
600
|
class: "flex size-6 items-center justify-center rounded border border-cn-field-line bg-cn-field text-[13px] leading-none text-cn-fg/80 hover:border-cn-accent/40 hover:text-cn-accent",
|
|
627
601
|
onClick: t,
|
|
628
602
|
onKeydown: r
|
|
629
|
-
}, " + ", 40,
|
|
630
|
-
body:
|
|
603
|
+
}, " + ", 40, be)]),
|
|
604
|
+
body: E(({ closeMenu: e }) => [b.value ? (x(), re(q, {
|
|
631
605
|
key: 0,
|
|
632
606
|
editor: r.editor,
|
|
633
|
-
onConfirm: (t) =>
|
|
634
|
-
onCancel: (t) =>
|
|
607
|
+
onConfirm: (t) => k(t, e),
|
|
608
|
+
onCancel: (t) => A(e)
|
|
635
609
|
}, null, 8, [
|
|
636
610
|
"editor",
|
|
637
611
|
"onConfirm",
|
|
638
612
|
"onCancel"
|
|
639
|
-
])) :
|
|
613
|
+
])) : m("", !0)]),
|
|
640
614
|
_: 1
|
|
641
615
|
}, 8, ["items"])])]),
|
|
642
|
-
|
|
643
|
-
|
|
616
|
+
P.value ? m("", !0) : (x(), h("p", xe, " 画布还没有图层,用上方按钮新增 ")),
|
|
617
|
+
g("ul", {
|
|
644
618
|
class: "cn-layers__tree flex flex-col gap-0.5 px-1.5 py-1",
|
|
645
|
-
onDragend:
|
|
646
|
-
}, [(
|
|
619
|
+
onDragend: Le
|
|
620
|
+
}, [(x(!0), h(ne, null, oe(N.value, (e) => (x(), h("li", {
|
|
647
621
|
key: e.key,
|
|
648
622
|
"data-key": e.key,
|
|
649
|
-
draggable:
|
|
650
|
-
class:
|
|
651
|
-
"cn-layers__row--selected":
|
|
652
|
-
"cn-layers__row--hovered":
|
|
653
|
-
"cn-layers__row--hidden":
|
|
623
|
+
draggable: Pe(e),
|
|
624
|
+
class: y(["cn-layers__row group flex cursor-default select-none items-center gap-1 py-1 pr-1 text-[12px]", {
|
|
625
|
+
"cn-layers__row--selected": Re(e),
|
|
626
|
+
"cn-layers__row--hovered": ze(e) && !Re(e),
|
|
627
|
+
"cn-layers__row--hidden": X(e) && !e.node.visible,
|
|
654
628
|
"cn-layers__row--template": e.inTemplate,
|
|
655
|
-
"cursor-grab": e.draggable && !
|
|
656
|
-
"cn-layers__row--drop-before":
|
|
657
|
-
"cn-layers__row--drop-after":
|
|
629
|
+
"cursor-grab": e.draggable && !X(e),
|
|
630
|
+
"cn-layers__row--drop-before": G.value?.key === e.key && G.value?.edge === "before",
|
|
631
|
+
"cn-layers__row--drop-after": G.value?.key === e.key && G.value?.edge === "after"
|
|
658
632
|
}]),
|
|
659
|
-
style:
|
|
660
|
-
onClick: (t) =>
|
|
661
|
-
onMouseenter: (t) =>
|
|
662
|
-
onMouseleave: t[6] ||= (e) =>
|
|
663
|
-
onDragstart: (t) =>
|
|
664
|
-
onDragover: (t) =>
|
|
665
|
-
onDrop: (t) =>
|
|
633
|
+
style: ae({ paddingLeft: `${4 + e.indentLevel * 14}px` }),
|
|
634
|
+
onClick: (t) => F(e),
|
|
635
|
+
onMouseenter: (t) => I(e),
|
|
636
|
+
onMouseleave: t[6] ||= (e) => I(null),
|
|
637
|
+
onDragstart: (t) => Ne(e, t),
|
|
638
|
+
onDragover: (t) => Fe(e, t),
|
|
639
|
+
onDrop: (t) => Ie(e, t)
|
|
666
640
|
}, [
|
|
667
|
-
|
|
641
|
+
X(e) ? (x(), h("span", {
|
|
668
642
|
key: 0,
|
|
669
643
|
"data-drag-handle": "",
|
|
670
644
|
draggable: "true",
|
|
671
645
|
title: "拖动排序",
|
|
672
646
|
class: "cn-layers__handle shrink-0",
|
|
673
|
-
onDragstart: (t) =>
|
|
674
|
-
}, [
|
|
675
|
-
icon:
|
|
647
|
+
onDragstart: (t) => Z(e, t)
|
|
648
|
+
}, [_(i, {
|
|
649
|
+
icon: T(fe),
|
|
676
650
|
size: 12,
|
|
677
651
|
"stroke-width": 2.5
|
|
678
|
-
}, null, 8, ["icon"])], 40,
|
|
679
|
-
e.node.expressionPrefix === "" ?
|
|
652
|
+
}, null, 8, ["icon"])], 40, Ce)) : m("", !0),
|
|
653
|
+
e.node.expressionPrefix === "" ? m("", !0) : (x(), h("span", {
|
|
680
654
|
key: 1,
|
|
681
655
|
class: "cn-layers__prefix",
|
|
682
656
|
title: e.node.expressionPrefix
|
|
683
|
-
},
|
|
684
|
-
|
|
657
|
+
}, w(e.node.expressionPrefix), 9, we)),
|
|
658
|
+
He(e) ? le((x(), h("input", {
|
|
685
659
|
key: 2,
|
|
686
660
|
ref_for: !0,
|
|
687
|
-
ref:
|
|
688
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
661
|
+
ref: Ve,
|
|
662
|
+
"onUpdate:modelValue": t[0] ||= (e) => Q.value = e,
|
|
689
663
|
"data-rename-input": "",
|
|
690
664
|
"aria-label": "图层重命名",
|
|
691
665
|
class: "cn-layers__rename-input min-w-0 flex-1",
|
|
692
|
-
onClick: t[1] ||=
|
|
693
|
-
onDblclick: t[2] ||=
|
|
694
|
-
onKeydown: [t[3] ||=
|
|
695
|
-
onBlur: t[5] ||= (e) =>
|
|
696
|
-
}, null, 544)), [[
|
|
666
|
+
onClick: t[1] ||= O(() => {}, ["stop"]),
|
|
667
|
+
onDblclick: t[2] ||= O(() => {}, ["stop"]),
|
|
668
|
+
onKeydown: [t[3] ||= D(O((e) => We(), ["prevent"]), ["enter"]), t[4] ||= D(O((e) => Ge(), ["prevent"]), ["esc"])],
|
|
669
|
+
onBlur: t[5] ||= (e) => We()
|
|
670
|
+
}, null, 544)), [[se, Q.value]]) : (x(), h("span", {
|
|
697
671
|
key: 3,
|
|
698
672
|
class: "cn-layers__label min-w-0 flex-1 truncate font-mono text-[11px] leading-4",
|
|
699
|
-
onDblclick: (t) =>
|
|
700
|
-
},
|
|
701
|
-
|
|
673
|
+
onDblclick: (t) => Ue(e)
|
|
674
|
+
}, w(e.label), 41, Te)),
|
|
675
|
+
X(e) ? (x(), h("button", {
|
|
702
676
|
key: 4,
|
|
703
677
|
type: "button",
|
|
704
678
|
"data-visibility": "",
|
|
705
|
-
class:
|
|
679
|
+
class: y(["cn-layers__eye size-5 shrink-0 items-center justify-center rounded text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent", e.node.visible ? "hidden group-hover:flex" : "flex"]),
|
|
706
680
|
title: e.node.visible ? "隐藏图层(最终输出不含该层)" : "显示图层",
|
|
707
681
|
"aria-pressed": !e.node.visible,
|
|
708
|
-
onClick:
|
|
709
|
-
}, [
|
|
710
|
-
icon: e.node.visible ?
|
|
682
|
+
onClick: O((t) => V(e), ["stop"])
|
|
683
|
+
}, [_(i, {
|
|
684
|
+
icon: e.node.visible ? T(de) : T(ue),
|
|
711
685
|
size: 11,
|
|
712
686
|
"stroke-width": 2
|
|
713
|
-
}, null, 8, ["icon"])], 10,
|
|
714
|
-
|
|
687
|
+
}, null, 8, ["icon"])], 10, Ee)) : m("", !0),
|
|
688
|
+
X(e) ? (x(), h("button", {
|
|
715
689
|
key: 5,
|
|
716
690
|
type: "button",
|
|
717
691
|
"data-lock": "",
|
|
718
|
-
class:
|
|
719
|
-
title: e.node.locked ?
|
|
692
|
+
class: y(["cn-layers__lock size-5 shrink-0 items-center justify-center rounded text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent", e.node.locked ? "flex" : "hidden group-hover:flex"]),
|
|
693
|
+
title: e.node.locked ? a : "锁定图层(画布不可点选/拖动/删除,渲染照常)",
|
|
720
694
|
"aria-pressed": e.node.locked,
|
|
721
|
-
onClick:
|
|
722
|
-
}, [
|
|
723
|
-
icon: e.node.locked ?
|
|
695
|
+
onClick: O((t) => U(e), ["stop"])
|
|
696
|
+
}, [_(i, {
|
|
697
|
+
icon: e.node.locked ? T(me) : T(pe),
|
|
724
698
|
size: 11,
|
|
725
699
|
"stroke-width": 2
|
|
726
|
-
}, null, 8, ["icon"])], 10,
|
|
727
|
-
|
|
700
|
+
}, null, 8, ["icon"])], 10, De)) : m("", !0),
|
|
701
|
+
X(e) ? (x(), h("button", {
|
|
728
702
|
key: 6,
|
|
729
703
|
type: "button",
|
|
730
704
|
"data-rename": "",
|
|
731
705
|
class: "cn-layers__delete hidden size-5 shrink-0 items-center justify-center rounded text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent group-hover:flex",
|
|
732
706
|
title: "重命名(双击名称或 F2)",
|
|
733
|
-
onClick:
|
|
734
|
-
}, [
|
|
735
|
-
icon:
|
|
707
|
+
onClick: O((t) => Ue(e), ["stop"])
|
|
708
|
+
}, [_(i, {
|
|
709
|
+
icon: T(he),
|
|
736
710
|
size: 11,
|
|
737
711
|
"stroke-width": 2
|
|
738
|
-
}, null, 8, ["icon"])], 8,
|
|
739
|
-
e.node.role === "root" && e.node.type === "TableLayer" ? (
|
|
712
|
+
}, null, 8, ["icon"])], 8, Oe)) : m("", !0),
|
|
713
|
+
e.node.role === "root" && e.node.type === "TableLayer" ? (x(), h("button", {
|
|
740
714
|
key: 7,
|
|
741
715
|
type: "button",
|
|
742
716
|
"data-add-row": "",
|
|
743
717
|
class: "cn-layers__delete hidden size-5 shrink-0 items-center justify-center rounded text-[10px] leading-none text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent group-hover:flex disabled:cursor-not-allowed disabled:text-cn-muted/50 disabled:hover:bg-transparent",
|
|
744
718
|
disabled: e.node.templated === !0,
|
|
745
719
|
title: e.node.templated === !0 ? "模板态不可加行——行由数据展开" : "加行(缺省行 + 缺省格与文本,行宽=表宽)",
|
|
746
|
-
onClick:
|
|
747
|
-
}, " +行 ", 8,
|
|
748
|
-
e.node.role === "row" ? (
|
|
720
|
+
onClick: O((t) => L(e), ["stop"])
|
|
721
|
+
}, " +行 ", 8, ke)) : m("", !0),
|
|
722
|
+
e.node.role === "row" ? (x(), h("button", {
|
|
749
723
|
key: 8,
|
|
750
724
|
type: "button",
|
|
751
725
|
"data-add-cell": "",
|
|
752
726
|
class: "cn-layers__delete hidden size-5 shrink-0 items-center justify-center rounded text-[10px] leading-none text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent group-hover:flex",
|
|
753
727
|
title: "加格(缺省格 + 文本内容,行高取最高格)",
|
|
754
|
-
onClick:
|
|
755
|
-
}, " +格 ", 8,
|
|
756
|
-
e.node.role === "templateRow" ? (
|
|
728
|
+
onClick: O((t) => R(e), ["stop"])
|
|
729
|
+
}, " +格 ", 8, Ae)) : m("", !0),
|
|
730
|
+
e.node.role === "templateRow" ? (x(), h("button", {
|
|
757
731
|
key: 9,
|
|
758
732
|
type: "button",
|
|
759
733
|
"data-add-template-cell": "",
|
|
760
734
|
class: "cn-layers__delete hidden size-5 shrink-0 items-center justify-center rounded text-[10px] leading-none text-cn-muted hover:bg-cn-accent/15 hover:text-cn-accent group-hover:flex",
|
|
761
735
|
title: "加格(缺省格 + 文本内容,零高度耦合——行高由数据展开定稿)",
|
|
762
|
-
onClick:
|
|
763
|
-
}, " +格 ", 8,
|
|
764
|
-
|
|
736
|
+
onClick: O((t) => z(e), ["stop"])
|
|
737
|
+
}, " +格 ", 8, je)) : m("", !0),
|
|
738
|
+
g("button", {
|
|
765
739
|
type: "button",
|
|
766
740
|
class: "cn-layers__delete hidden size-5 shrink-0 items-center justify-center rounded text-[10px] leading-none text-cn-muted hover:bg-cn-danger/15 hover:text-cn-danger group-hover:flex disabled:cursor-not-allowed disabled:text-cn-muted/50 disabled:hover:bg-transparent disabled:hover:text-cn-muted/50",
|
|
767
741
|
disabled: e.node.role === "templateRow" || e.node.locked,
|
|
768
742
|
title: e.node.role === "templateRow" ? "行模板由表持有——转换回普通表请用 V2 转换入口" : e.node.locked ? o : "删除(含子层)",
|
|
769
|
-
onClick:
|
|
770
|
-
}, " ✕ ", 8,
|
|
771
|
-
], 46,
|
|
743
|
+
onClick: O((t) => B(e), ["stop"])
|
|
744
|
+
}, " ✕ ", 8, Me)
|
|
745
|
+
], 46, Se))), 128))], 32)
|
|
772
746
|
]));
|
|
773
747
|
}
|
|
774
748
|
});
|
|
775
749
|
//#endregion
|
|
776
|
-
export {
|
|
750
|
+
export { U as a, z as c, q as i, H as l, Y as n, L as o, J as r, V as s, X as t };
|