@veltra/sheet 2.2.0 → 2.3.1

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.
Files changed (86) hide show
  1. package/dist/components/report/binding-badge.js +45 -21
  2. package/dist/components/report/designer/col-widths.js +18 -4
  3. package/dist/components/report/designer/conditional-rules/helpers.js +3 -3
  4. package/dist/components/report/designer/float-panel.js +73 -36
  5. package/dist/components/report/designer/rule-row.js +111 -127
  6. package/dist/components/report/designer/rules-dialog.js +5 -22
  7. package/dist/components/report/hub-dataset-editor.js +16 -1
  8. package/dist/components/report/preview-grid-size.js +32 -0
  9. package/dist/components/report/report-designer.js +75 -25
  10. package/dist/components/report/report-viewer.js +38 -25
  11. package/dist/components/report/style2.css +44 -39
  12. package/dist/components/report/use-report-designer.js +34 -12
  13. package/dist/components/report/use-report-viewer.js +6 -1
  14. package/dist/components/sheet/popups/border-popup.js +30 -2
  15. package/dist/components/sheet/popups/fill-color-popup.js +4 -3
  16. package/dist/components/sheet/popups/font-color-popup.js +2 -2
  17. package/dist/components/sheet/popups/font-size-popup.js +2 -2
  18. package/dist/components/sheet/sheet-context-menu.js +6 -3
  19. package/dist/components/sheet/sheet.js +8 -0
  20. package/dist/components/sheet/use-sheet-grid.js +14 -4
  21. package/dist/components/sheet/use-sheet-state.js +3 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +2 -2
  24. package/dist/report/binding.d.ts +49 -11
  25. package/dist/report/binding.js +186 -29
  26. package/dist/report/connector.js +1 -1
  27. package/dist/report/export-xlsx.d.ts +3 -5
  28. package/dist/report/export-xlsx.js +7 -10
  29. package/dist/report/index.d.ts +2 -2
  30. package/dist/report/render/aggregate.js +20 -8
  31. package/dist/report/template.d.ts +8 -4
  32. package/dist/report/template.js +5 -2
  33. package/dist/tools/apply-style.js +29 -0
  34. package/dist/tools/builtin.js +17 -17
  35. package/dist/tools/context.d.ts +38 -5
  36. package/dist/tools/context.js +38 -1
  37. package/dist/types/report-designer.d.ts +2 -0
  38. package/dist/types/report-viewer.d.ts +2 -2
  39. package/dist/types/sheet.d.ts +4 -0
  40. package/package.json +15 -6
  41. package/src/components/report/__test__/conditional-rules-helpers.test.ts +1 -0
  42. package/src/components/report/__test__/preview-grid-size.test.ts +63 -0
  43. package/src/components/report/__test__/report-designer.test.ts +76 -0
  44. package/src/components/report/__test__/report-viewer.test.ts +24 -1
  45. package/src/components/report/__test__/use-report-designer.test.ts +142 -10
  46. package/src/components/report/binding-badge.ts +39 -20
  47. package/src/components/report/designer/col-widths.ts +34 -11
  48. package/src/components/report/designer/conditional-rules/helpers.ts +6 -3
  49. package/src/components/report/designer/float-panel.vue +71 -27
  50. package/src/components/report/designer/rule-row.vue +67 -67
  51. package/src/components/report/designer/rules-dialog.vue +3 -19
  52. package/src/components/report/hub-dataset-editor.vue +19 -1
  53. package/src/components/report/preview-grid-size.ts +33 -0
  54. package/src/components/report/report-designer.vue +79 -15
  55. package/src/components/report/report-viewer.vue +37 -29
  56. package/src/components/report/style-designer.scss +45 -41
  57. package/src/components/report/use-report-designer.ts +63 -14
  58. package/src/components/report/use-report-viewer.ts +11 -2
  59. package/src/components/sheet/__test__/sheet-component.test.ts +37 -0
  60. package/src/components/sheet/__test__/sheet-context-menu.test.ts +3 -2
  61. package/src/components/sheet/popups/border-popup.vue +31 -3
  62. package/src/components/sheet/popups/fill-color-popup.vue +5 -4
  63. package/src/components/sheet/popups/font-color-popup.vue +2 -2
  64. package/src/components/sheet/popups/font-size-popup.vue +2 -2
  65. package/src/components/sheet/sheet-context-menu.ts +8 -2
  66. package/src/components/sheet/sheet.vue +2 -0
  67. package/src/components/sheet/use-sheet-grid.ts +17 -3
  68. package/src/components/sheet/use-sheet-state.ts +8 -3
  69. package/src/report/__test__/binding.test.ts +103 -1
  70. package/src/report/__test__/connector.test.ts +21 -0
  71. package/src/report/__test__/export-xlsx.test.ts +4 -4
  72. package/src/report/__test__/render.test.ts +102 -0
  73. package/src/report/__test__/template.test.ts +11 -0
  74. package/src/report/binding.ts +278 -47
  75. package/src/report/connector.ts +3 -2
  76. package/src/report/export-xlsx.ts +9 -14
  77. package/src/report/render/aggregate.ts +29 -8
  78. package/src/report/template.ts +8 -4
  79. package/src/tools/__test__/apply-style.test.ts +129 -0
  80. package/src/tools/apply-style.ts +41 -0
  81. package/src/tools/builtin.ts +18 -18
  82. package/src/tools/context.ts +67 -4
  83. package/src/tools/index.ts +1 -0
  84. package/src/types/report-designer.ts +2 -0
  85. package/src/types/report-viewer.ts +2 -2
  86. package/src/types/sheet.ts +4 -0
@@ -1,33 +1,34 @@
1
- import { formatBindingPlaceholder, inferReportPreset } from "../../report/binding.js";
1
+ import { formatBindingPlaceholderParts, inferReportPreset } from "../../report/binding.js";
2
2
  import { CustomLayout } from "@veltra/sheet-core";
3
3
  //#region src/components/report/binding-badge.ts
4
- /** 绑定徽章预设配色(设计态富渲染徽章;canvas 绘制需具体色值,无法消费 CSS 变量) */
5
4
  const REPORT_PRESET_BADGE_COLORS = {
6
5
  groupHeader: {
7
- bg: "#dbeafe",
8
- fg: "#1d4ed8"
6
+ cell: "#eef4ff",
7
+ fg: "#2f54eb"
9
8
  },
10
9
  detail: {
11
- bg: "#d1fae5",
12
- fg: "#047857"
10
+ cell: "#effaf3",
11
+ fg: "#1f9254"
13
12
  },
14
13
  subtotal: {
15
- bg: "#fef3c7",
16
- fg: "#b45309"
14
+ cell: "#fff7e6",
15
+ fg: "#d46b08"
17
16
  },
18
17
  grandTotal: {
19
- bg: "#ffe4e6",
20
- fg: "#be123c"
18
+ cell: "#fff1f0",
19
+ fg: "#cf1322"
21
20
  },
22
21
  cross: {
23
- bg: "#ede9fe",
24
- fg: "#6d28d9"
22
+ cell: "#f8f5ff",
23
+ fg: "#5f3dc4"
25
24
  }
26
25
  };
27
26
  const CUSTOM_PRESET_BADGE_COLOR = {
28
- bg: "#f3f4f6",
29
- fg: "#374151"
27
+ cell: "#f7f8fa",
28
+ fg: "#495057"
30
29
  };
30
+ /** 徽章字段标签文字色(中性深灰,与强调色形成层次) */
31
+ const BADGE_LABEL_COLOR = "#343a40";
31
32
  function resolveBadgeColor(binding) {
32
33
  const preset = inferReportPreset(binding);
33
34
  return preset ? REPORT_PRESET_BADGE_COLORS[preset] : CUSTOM_PRESET_BADGE_COLOR;
@@ -37,16 +38,16 @@ function createBindingBadgeStyleResolver(getBindingAt) {
37
38
  return (addr, base) => {
38
39
  const binding = getBindingAt(addr);
39
40
  if (!binding) return base;
40
- const { bg } = resolveBadgeColor(binding);
41
+ const { cell } = resolveBadgeColor(binding);
41
42
  return {
42
43
  ...base,
43
- fill: { color: bg }
44
+ fill: { color: cell }
44
45
  };
45
46
  };
46
47
  }
47
48
  /**
48
49
  * 绑定格富渲染徽章(ADR-0004 `resolveCellRenderer` 首个消费者):
49
- * 绑定单元格由纯文本占位符升级为带预设色彩的徽章(底色 + 占位文案),
50
+ * 绑定单元格渲染为左对齐徽章(强调色聚合标签 + 中性色字段标签),
50
51
  * 未绑定格返回 `undefined` 回落默认渲染。
51
52
  */
52
53
  function createBindingBadgeRenderer(getBindingAt, resolveLabel) {
@@ -54,17 +55,40 @@ function createBindingBadgeRenderer(getBindingAt, resolveLabel) {
54
55
  const binding = getBindingAt(addr);
55
56
  if (!binding) return void 0;
56
57
  const { fg } = resolveBadgeColor(binding);
58
+ const { tag, label } = formatBindingPlaceholderParts(binding, resolveLabel);
57
59
  const rootContainer = new CustomLayout.Container({
58
60
  display: "flex",
59
61
  flexDirection: "row",
60
- justifyContent: "center",
62
+ justifyContent: "flex-start",
61
63
  alignItems: "center"
62
64
  });
65
+ const tagEl = new CustomLayout.Tag({
66
+ text: tag,
67
+ textStyle: {
68
+ fontSize: 10,
69
+ fontWeight: 600,
70
+ fill: "#ffffff"
71
+ },
72
+ panel: {
73
+ visible: true,
74
+ fill: fg,
75
+ cornerRadius: 3
76
+ },
77
+ padding: [
78
+ 1,
79
+ 4,
80
+ 1,
81
+ 4
82
+ ],
83
+ marginLeft: 6,
84
+ marginRight: 5
85
+ });
86
+ rootContainer.add(tagEl);
63
87
  rootContainer.add(new CustomLayout.Text({
64
- text: formatBindingPlaceholder(binding, resolveLabel),
88
+ text: label,
65
89
  fontSize: 11,
66
- fontWeight: 600,
67
- fill: fg
90
+ fontWeight: 500,
91
+ fill: BADGE_LABEL_COLOR
68
92
  }));
69
93
  return {
70
94
  rootContainer,
@@ -1,15 +1,29 @@
1
1
  //#region src/components/report/designer/col-widths.ts
2
- /** 经 SheetGrid → VTable 写入指定列宽 */
2
+ /** 行号列数(隐藏行头时为 0;与 GridCoords 探测一致) */
3
+ function seriesNumberColCount(table) {
4
+ const rowOffset = table.columnHeaderLevelCount;
5
+ let col = 0;
6
+ while (col < table.colCount && table.isSeriesNumber(col, rowOffset)) col++;
7
+ return col;
8
+ }
9
+ /** 将模型列宽写入 VTable(模型 → grid 同步辅助) */
3
10
  function applyGridColWidths(grid, widths) {
4
11
  if (!grid) return;
5
12
  const table = grid.getTable();
6
- for (const [sheetCol, width] of widths) table.setColWidth(sheetCol + 1, width);
13
+ const colOffset = seriesNumberColCount(table);
14
+ for (const [sheetCol, width] of widths) table.setColWidth(sheetCol + colOffset, width);
15
+ }
16
+ /** 把列宽条目写入 Sheet 模型(不进 undo,对称 setColWidth) */
17
+ function applySheetColWidths(sheet, widths) {
18
+ if (!sheet) return;
19
+ for (const [col, width] of widths) sheet.setColWidth(col, width);
7
20
  }
8
21
  /** 从当前网格读取指定模型列宽度;网格未就绪时返回 null */
9
22
  function readGridColWidths(grid, cols) {
10
23
  if (!grid) return null;
11
24
  const table = grid.getTable();
12
- return cols.map((sheetCol) => [sheetCol, table.getColWidth(sheetCol + 1)]);
25
+ const colOffset = seriesNumberColCount(table);
26
+ return cols.map((sheetCol) => [sheetCol, table.getColWidth(sheetCol + colOffset)]);
13
27
  }
14
28
  //#endregion
15
- export { applyGridColWidths, readGridColWidths };
29
+ export { applyGridColWidths, applySheetColWidths, readGridColWidths };
@@ -18,7 +18,7 @@ const RULE_SCOPE_OPTIONS = [{
18
18
  /** 求值字段下拉:缺省项表示本格绑定字段 */
19
19
  function ruleEvalFieldOptions(bindingField, datasetFields) {
20
20
  return [{
21
- value: void 0,
21
+ value: "",
22
22
  label: "本格字段"
23
23
  }, ...datasetFields.filter((field) => field.name !== bindingField).map((field) => ({
24
24
  value: field.name,
@@ -61,8 +61,8 @@ function defaultRuleValue(operator, fieldType) {
61
61
  }
62
62
  function defaultRuleStyle() {
63
63
  return {
64
- fill: { color: "#FEE2E2" },
65
- font: { color: "#DC2626" }
64
+ fill: { color: "#FEF3C7" },
65
+ font: { color: "#B45309" }
66
66
  };
67
67
  }
68
68
  function createDraftItem(rule, fieldType = "number", _bindingField) {
@@ -1,5 +1,5 @@
1
+ import { formatBindingPlaceholder, formatCellAddress, formatParentCandidateLabel, inferReportPreset, isReductionAggregate } from "../../../report/binding.js";
1
2
  import { resolveGridOverlayLayout } from "./cell-coords.js";
2
- import { formatBindingPlaceholder, formatCellAddress, inferReportPreset } from "../../../report/binding.js";
3
3
  import { readCellOverlayRect, resolveBindingFloatPanelPosition, useGridOverlaySync } from "./use-grid-overlay.js";
4
4
  import { REPORT_PRESET_OPTIONS, presetBindingDefaults } from "./role.js";
5
5
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, openBlock, ref, toDisplayString, toRef, unref, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
@@ -20,6 +20,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
20
20
  rowParentCandidates: {},
21
21
  colParentCandidates: {},
22
22
  resolveFieldLabel: { type: Function },
23
+ getBindingAt: { type: Function },
23
24
  hostEl: {},
24
25
  getGrid: { type: Function }
25
26
  },
@@ -47,7 +48,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
47
48
  });
48
49
  return options;
49
50
  });
50
- const aggregateOptions = [
51
+ const ALL_AGGREGATE_OPTIONS = [
51
52
  {
52
53
  value: "list",
53
54
  label: "明细"
@@ -77,6 +78,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
77
78
  label: "最小"
78
79
  }
79
80
  ];
81
+ const REDUCTION_AGGREGATE_OPTIONS = ALL_AGGREGATE_OPTIONS.filter((item) => isReductionAggregate(item.value));
80
82
  const expandOptions = [
81
83
  {
82
84
  value: "down",
@@ -112,18 +114,40 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
112
114
  if (!props.binding) return "detail";
113
115
  return inferReportPreset(props.binding) ?? CUSTOM_PRESET_VALUE;
114
116
  });
117
+ const showAggregateSelect = computed(() => {
118
+ const preset = currentPresetValue.value;
119
+ return preset === CUSTOM_PRESET_VALUE || preset === "subtotal" || preset === "grandTotal" || preset === "cross";
120
+ });
121
+ const showExpandSelect = computed(() => {
122
+ const preset = currentPresetValue.value;
123
+ return preset === CUSTOM_PRESET_VALUE || preset === "groupHeader" || preset === "detail";
124
+ });
125
+ const aggregateOptions = computed(() => currentPresetValue.value === CUSTOM_PRESET_VALUE ? ALL_AGGREGATE_OPTIONS : REDUCTION_AGGREGATE_OPTIONS);
115
126
  const summaryText = computed(() => {
116
127
  if (!props.binding) return "";
117
- return formatBindingPlaceholder(props.binding, props.resolveFieldLabel);
128
+ const parts = [formatBindingPlaceholder(props.binding, props.resolveFieldLabel)];
129
+ if (props.binding.rowParent && props.resolvedRowParentLabel !== "—") {
130
+ const parent = props.getBindingAt?.(props.binding.rowParent);
131
+ const name = parent ? props.resolveFieldLabel?.(parent.dataset, parent.field) ?? parent.field : props.resolvedRowParentLabel;
132
+ parts.push(`行父格 ${name} ${props.resolvedRowParentLabel}`);
133
+ }
134
+ if (props.binding.colParent && props.resolvedColParentLabel !== "—") {
135
+ const parent = props.getBindingAt?.(props.binding.colParent);
136
+ const name = parent ? props.resolveFieldLabel?.(parent.dataset, parent.field) ?? parent.field : props.resolvedColParentLabel;
137
+ parts.push(`列父格 ${name} ${props.resolvedColParentLabel}`);
138
+ }
139
+ return parts.join(" · ");
118
140
  });
119
- const rowParentOptions = computed(() => props.rowParentCandidates.map((addr) => ({
120
- value: formatCellAddress(addr),
121
- label: formatCellAddress(addr)
122
- })));
123
- const colParentOptions = computed(() => props.colParentCandidates.map((addr) => ({
124
- value: formatCellAddress(addr),
125
- label: formatCellAddress(addr)
126
- })));
141
+ function candidateOption(addr) {
142
+ const value = formatCellAddress(addr);
143
+ const binding = props.getBindingAt?.(addr);
144
+ return {
145
+ value,
146
+ label: binding ? formatParentCandidateLabel(addr, binding, props.resolveFieldLabel) : value
147
+ };
148
+ }
149
+ const rowParentOptions = computed(() => props.rowParentCandidates.map(candidateOption));
150
+ const colParentOptions = computed(() => props.colParentCandidates.map(candidateOption));
127
151
  const rowParentSelectValue = computed(() => props.binding?.rowParent ? formatCellAddress(props.binding.rowParent) : void 0);
128
152
  const colParentSelectValue = computed(() => props.binding?.colParent ? formatCellAddress(props.binding.colParent) : void 0);
129
153
  const visible = computed(() => !!props.binding && !!props.cell && inView.value);
@@ -132,8 +156,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
132
156
  top: `${panelTop.value}px`
133
157
  }));
134
158
  watch(() => [props.cell?.row, props.cell?.col], () => {
159
+ if (props.parentPickMode) return;
135
160
  expanded.value = false;
136
161
  });
162
+ watch(() => props.parentPickMode, (mode) => {
163
+ if (mode) expanded.value = true;
164
+ });
137
165
  watch(expanded, () => {
138
166
  nextTick(() => updatePosition());
139
167
  });
@@ -146,7 +174,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
146
174
  emit("patch", presetBindingDefaults(preset));
147
175
  }
148
176
  function aggregateDefaultExpand(aggregate) {
149
- return aggregate === "sum" || aggregate === "avg" || aggregate === "count" || aggregate === "max" || aggregate === "min" ? "none" : "down";
177
+ return isReductionAggregate(aggregate) ? "none" : "down";
150
178
  }
151
179
  function onAggregate(aggregate) {
152
180
  emit("patch", {
@@ -236,20 +264,26 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
236
264
  "model-value",
237
265
  "options"
238
266
  ]),
239
- createVNode(unref(USelect), {
267
+ showAggregateSelect.value ? (openBlock(), createBlock(unref(USelect), {
268
+ key: 0,
240
269
  size: "small",
241
270
  class: normalizeClass([unref(cls).e("select"), unref(cls).em("select", "aggregate")]),
242
271
  "model-value": __props.binding.aggregate,
243
- options: aggregateOptions,
272
+ options: aggregateOptions.value,
244
273
  "onUpdate:modelValue": onAggregate
245
- }, null, 8, ["class", "model-value"]),
246
- createVNode(unref(USelect), {
274
+ }, null, 8, [
275
+ "class",
276
+ "model-value",
277
+ "options"
278
+ ])) : createCommentVNode("v-if", true),
279
+ showExpandSelect.value ? (openBlock(), createBlock(unref(USelect), {
280
+ key: 1,
247
281
  size: "small",
248
282
  class: normalizeClass([unref(cls).e("select"), unref(cls).em("select", "expand")]),
249
283
  "model-value": __props.binding.expand,
250
284
  options: expandOptions,
251
285
  "onUpdate:modelValue": onExpand
252
- }, null, 8, ["class", "model-value"]),
286
+ }, null, 8, ["class", "model-value"])) : createCommentVNode("v-if", true),
253
287
  createVNode(unref(UButton), {
254
288
  size: "small",
255
289
  plain: "",
@@ -258,12 +292,21 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
258
292
  default: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode("条件样式", -1)])]),
259
293
  _: 1
260
294
  }),
295
+ createVNode(unref(UButton), {
296
+ size: "small",
297
+ text: "",
298
+ type: "danger",
299
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("remove"))
300
+ }, {
301
+ default: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode("删除绑定", -1)])]),
302
+ _: 1
303
+ }),
261
304
  createVNode(unref(UButton), {
262
305
  size: "small",
263
306
  text: "",
264
307
  class: normalizeClass(unref(cls).e("expand")),
265
308
  title: expanded.value ? "收起" : "展开更多",
266
- onClick: _cache[1] || (_cache[1] = ($event) => expanded.value = !expanded.value)
309
+ onClick: _cache[2] || (_cache[2] = ($event) => expanded.value = !expanded.value)
267
310
  }, {
268
311
  default: withCtx(() => [createTextVNode(toDisplayString(expanded.value ? "收起" : "展开"), 1)]),
269
312
  _: 1
@@ -292,7 +335,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
292
335
  size: "small",
293
336
  plain: "",
294
337
  type: __props.parentPickMode === "row" ? "primary" : void 0,
295
- onClick: _cache[2] || (_cache[2] = ($event) => emit("start-parent-pick", "row"))
338
+ onClick: _cache[3] || (_cache[3] = ($event) => emit("start-parent-pick", "row"))
296
339
  }, {
297
340
  default: withCtx(() => [createTextVNode(toDisplayString(__props.parentPickMode === "row" ? "点选目标格…" : "设置行方向父格"), 1)]),
298
341
  _: 1
@@ -315,9 +358,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
315
358
  size: "small",
316
359
  text: "",
317
360
  type: "danger",
318
- onClick: _cache[3] || (_cache[3] = ($event) => emit("clear-parent", "row"))
361
+ onClick: _cache[4] || (_cache[4] = ($event) => emit("clear-parent", "row"))
319
362
  }, {
320
- default: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode(" 清除 ", -1)])]),
363
+ default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode(" 清除 ", -1)])]),
321
364
  _: 1
322
365
  })) : createCommentVNode("v-if", true)
323
366
  ], 2)
@@ -330,7 +373,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
330
373
  size: "small",
331
374
  plain: "",
332
375
  type: __props.parentPickMode === "col" ? "primary" : void 0,
333
- onClick: _cache[4] || (_cache[4] = ($event) => emit("start-parent-pick", "col"))
376
+ onClick: _cache[5] || (_cache[5] = ($event) => emit("start-parent-pick", "col"))
334
377
  }, {
335
378
  default: withCtx(() => [createTextVNode(toDisplayString(__props.parentPickMode === "col" ? "点选目标格…" : "设置列方向父格"), 1)]),
336
379
  _: 1
@@ -353,30 +396,24 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
353
396
  size: "small",
354
397
  text: "",
355
398
  type: "danger",
356
- onClick: _cache[5] || (_cache[5] = ($event) => emit("clear-parent", "col"))
399
+ onClick: _cache[6] || (_cache[6] = ($event) => emit("clear-parent", "col"))
357
400
  }, {
358
- default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode(" 清除 ", -1)])]),
401
+ default: withCtx(() => [..._cache[13] || (_cache[13] = [createTextVNode(" 清除 ", -1)])]),
359
402
  _: 1
360
403
  })) : createCommentVNode("v-if", true)
361
404
  ], 2)
362
405
  ], 2),
363
- createElementVNode("footer", { class: normalizeClass(unref(cls).e("footer")) }, [__props.parentPickMode ? (openBlock(), createBlock(unref(UButton), {
406
+ __props.parentPickMode ? (openBlock(), createElementBlock("footer", {
364
407
  key: 0,
408
+ class: normalizeClass(unref(cls).e("footer"))
409
+ }, [createVNode(unref(UButton), {
365
410
  size: "small",
366
411
  plain: "",
367
- onClick: _cache[6] || (_cache[6] = ($event) => emit("cancel-parent-pick"))
368
- }, {
369
- default: withCtx(() => [..._cache[13] || (_cache[13] = [createTextVNode(" 取消点选 ", -1)])]),
370
- _: 1
371
- })) : createCommentVNode("v-if", true), createVNode(unref(UButton), {
372
- size: "small",
373
- type: "danger",
374
- plain: "",
375
- onClick: _cache[7] || (_cache[7] = ($event) => emit("remove"))
412
+ onClick: _cache[7] || (_cache[7] = ($event) => emit("cancel-parent-pick"))
376
413
  }, {
377
- default: withCtx(() => [..._cache[14] || (_cache[14] = [createTextVNode("删除绑定", -1)])]),
414
+ default: withCtx(() => [..._cache[14] || (_cache[14] = [createTextVNode("取消点选", -1)])]),
378
415
  _: 1
379
- })], 2)
416
+ })], 2)) : createCommentVNode("v-if", true)
380
417
  ], 2)) : createCommentVNode("v-if", true)], 38)), [[vShow, visible.value]]) : createCommentVNode("v-if", true);
381
418
  };
382
419
  }