@shwfed/config 2.3.28 → 2.4.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.
Files changed (146) hide show
  1. package/dist/mcp.mjs +3128 -1272
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-CQHS6cZe.js → config-BcQQl4v6.js} +1 -1
  4. package/dist/preview/assets/{config-fvkC2rB8.js → config-BdFIFUa_.js} +1 -1
  5. package/dist/preview/assets/{config-DDfTl9Cs.js → config-Bi9F-Jdh.js} +1 -1
  6. package/dist/preview/assets/{config-CJHPt8Gx.js → config-Bxkq2ZRm.js} +1 -1
  7. package/dist/preview/assets/{config-D0_1yZdF.js → config-C32yfrlg.js} +1 -1
  8. package/dist/preview/assets/{config--PcXQV_r.js → config-CHHX7vhb.js} +1 -1
  9. package/dist/preview/assets/{config-5KVDXgUF.js → config-CZ0f5xdI.js} +1 -1
  10. package/dist/preview/assets/{config-B5avpKJE.js → config-D9xGgFnF.js} +1 -1
  11. package/dist/preview/assets/{config-CNo3isHa.js → config-Ddh8pxIi.js} +1 -1
  12. package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-RM-qDh0R.js → definition.vue_vue_type_script_setup_true_lang-C_cjxvm1.js} +1 -1
  13. package/dist/preview/assets/{index-a2QwAots.css → index-BqOX70Hd.css} +1 -1
  14. package/dist/preview/assets/index-D-VR1i8D.js +659 -0
  15. package/dist/preview/assets/index-ihZGlPdX.js +1 -0
  16. package/dist/preview/assets/{runtime-BPjZQmcY.js → runtime-Bn8mqeDH.js} +1 -1
  17. package/dist/preview/assets/{runtime-DcrzodsN.js → runtime-Cc_Wk3o-.js} +1 -1
  18. package/dist/preview/assets/{runtime-BGTWf-O7.js → runtime-CttAjIgg.js} +1 -1
  19. package/dist/preview/assets/{runtime-Dy4ZmQ-n.js → runtime-Cx4f2UTl.js} +1 -1
  20. package/dist/preview/assets/{runtime-CCbyrqQT.js → runtime-D1dESjXR.js} +1 -1
  21. package/dist/preview/assets/{runtime-C_XX6a0C.js → runtime-DIEP1Xbh.js} +1 -1
  22. package/dist/preview/assets/{runtime-CtqwtTE_.js → runtime-DKceWuBx.js} +1 -1
  23. package/dist/preview/assets/{runtime-Dr_10emf.js → runtime-Dhid9O5c.js} +1 -1
  24. package/dist/preview/assets/{runtime-Bq3fmxeF.js → runtime-YMiqi6WY.js} +1 -1
  25. package/dist/preview/index.html +2 -2
  26. package/dist/runtime/components/block-layout-editor/index.d.vue.ts +10 -2
  27. package/dist/runtime/components/block-layout-editor/index.vue +44 -8
  28. package/dist/runtime/components/block-layout-editor/index.vue.d.ts +10 -2
  29. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.d.vue.ts +2 -0
  30. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/config.vue.d.ts +2 -0
  31. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.d.vue.ts +2 -0
  32. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/runtime.vue.d.ts +2 -0
  33. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.form/schema.d.ts +2 -0
  34. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.d.vue.ts +2 -0
  35. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/config.vue.d.ts +2 -0
  36. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.d.vue.ts +2 -0
  37. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/runtime.vue.d.ts +2 -0
  38. package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.table/schema.d.ts +3 -0
  39. package/dist/runtime/components/config/config.vue +35 -0
  40. package/dist/runtime/components/config/use-editor.d.ts +11 -1
  41. package/dist/runtime/components/config/use-editor.js +27 -1
  42. package/dist/runtime/components/form/config.vue +32 -0
  43. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +163 -0
  44. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +745 -0
  45. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +163 -0
  46. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
  47. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +383 -0
  48. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
  49. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +264 -0
  50. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +183 -0
  51. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +163 -0
  52. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +745 -0
  53. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +163 -0
  54. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.d.vue.ts +8 -0
  55. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +402 -0
  56. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue.d.ts +8 -0
  57. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +264 -0
  58. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +209 -0
  59. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +129 -0
  60. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +618 -0
  61. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +129 -0
  62. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
  63. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +501 -0
  64. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
  65. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +99 -0
  66. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +133 -0
  67. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +127 -0
  68. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +550 -0
  69. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +127 -0
  70. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
  71. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +496 -0
  72. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
  73. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +96 -0
  74. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +125 -0
  75. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +133 -0
  76. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +605 -0
  77. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +133 -0
  78. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.d.vue.ts +8 -0
  79. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +401 -0
  80. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue.d.ts +8 -0
  81. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +102 -0
  82. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +142 -0
  83. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +131 -0
  84. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +560 -0
  85. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +131 -0
  86. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.d.vue.ts +8 -0
  87. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +395 -0
  88. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue.d.ts +8 -0
  89. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +96 -0
  90. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +118 -0
  91. package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.d.ts +35 -0
  92. package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.js +31 -0
  93. package/dist/runtime/components/form/index.vue +7 -5
  94. package/dist/runtime/components/form/schema.d.ts +4 -0
  95. package/dist/runtime/components/form/schema.js +4 -0
  96. package/dist/runtime/components/form/unit-config.vue +45 -1
  97. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/config.vue +0 -22
  98. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/header.vue +3 -15
  99. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.d.ts +0 -1
  100. package/dist/runtime/components/table/columns/2026-04-14/com.shwfed.table.column.select/schema.js +0 -4
  101. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +183 -0
  102. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +931 -0
  103. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +183 -0
  104. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
  105. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +463 -0
  106. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
  107. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +283 -0
  108. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +275 -0
  109. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +183 -0
  110. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +931 -0
  111. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +183 -0
  112. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
  113. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +414 -0
  114. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
  115. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +283 -0
  116. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +275 -0
  117. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +133 -0
  118. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +632 -0
  119. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +133 -0
  120. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
  121. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +461 -0
  122. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
  123. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +93 -0
  124. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +161 -0
  125. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +131 -0
  126. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +563 -0
  127. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +131 -0
  128. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
  129. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +443 -0
  130. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
  131. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +90 -0
  132. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +153 -0
  133. package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.d.ts +35 -0
  134. package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.js +31 -0
  135. package/dist/runtime/components/table/config.vue +55 -82
  136. package/dist/runtime/components/table/schema.d.ts +4 -0
  137. package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +7 -0
  138. package/dist/runtime/components/ui/command/CommandItem.vue +13 -4
  139. package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +7 -0
  140. package/dist/runtime/share/clipboard.d.ts +26 -0
  141. package/dist/runtime/share/clipboard.js +82 -0
  142. package/dist/runtime/share/layout.d.ts +4 -0
  143. package/dist/runtime/share/layout.js +35 -0
  144. package/package.json +1 -1
  145. package/dist/preview/assets/index-DNd8J9Zv.js +0 -643
  146. package/dist/preview/assets/index-DrIMqXAa.js +0 -1
@@ -113,10 +113,12 @@ function isHidden(field) {
113
113
 
114
114
  <template>
115
115
  <ClientOnly>
116
- <FormUnitRenderer
117
- :unit="unit"
118
- :evaluate-media="evaluateMedia"
119
- :is-hidden="isHidden"
120
- />
116
+ <div :style="config.style">
117
+ <FormUnitRenderer
118
+ :unit="unit"
119
+ :evaluate-media="evaluateMedia"
120
+ :is-hidden="isHidden"
121
+ />
122
+ </div>
121
123
  </ClientOnly>
122
124
  </template>
@@ -80,6 +80,7 @@ export declare function FormUnit(configure: (env: Environment) => void): Schema.
80
80
  */
81
81
  export declare function registerFormVariablesIfAbsent(env: Environment): void;
82
82
  export declare function FormConfig(configure: (env: Environment) => void): Schema.refine<{
83
+ readonly style?: string | undefined;
83
84
  readonly initial?: {
84
85
  readonly data: string;
85
86
  readonly request?: string | undefined;
@@ -146,8 +147,10 @@ export declare function FormConfig(configure: (env: Environment) => void): Schem
146
147
  data: Schema.Schema<string, string, never>;
147
148
  }>>>;
148
149
  readonly: Schema.optional<Schema.Schema<string, string, never>>;
150
+ style: Schema.optional<typeof Schema.String>;
149
151
  }>>;
150
152
  export declare function createFormConfig(body: Omit<Schema.Schema.Type<ReturnType<typeof FormConfig>>, 'kind'>): {
153
+ style?: string | undefined;
151
154
  initial?: {
152
155
  readonly data: string;
153
156
  readonly request?: string | undefined;
@@ -188,4 +191,5 @@ export type FormConfigValue = Readonly<{
188
191
  kind: typeof KIND;
189
192
  initial?: InitialSource;
190
193
  readonly?: string;
194
+ style?: string;
191
195
  }> & FormUnitValue;
@@ -105,6 +105,10 @@ export function FormConfig(configure) {
105
105
  字段自身的「只读条件」会**覆盖**这里:未配置只读条件的字段跟随本表达式,配置了的以字段自己的结果为准(可在只读表单中单独放开某个字段)。
106
106
  `
107
107
  })),
108
+ style: Schema.optional(Schema.String).annotations({
109
+ title: "\u5BB9\u5668\u6837\u5F0F",
110
+ description: "\u5E94\u7528\u5728\u8868\u5355\u6700\u5916\u5C42\u5BB9\u5668\u4E0A\u7684 CSS \u6837\u5F0F\u5B57\u7B26\u4E32"
111
+ }),
108
112
  ...unitFields(formConfigure)
109
113
  }).pipe(Schema.filter(unitPlacementsFilter)).annotations({
110
114
  title: "FormConfig",
@@ -9,7 +9,8 @@ import {
9
9
  injectCELContext,
10
10
  provideCELContext
11
11
  } from "../../utils/cel-context";
12
- import { findFreePlacement, normalizeLayoutSet } from "../../share/layout";
12
+ import { findFreePlacement, normalizeLayoutSet, placeGroupAt } from "../../share/layout";
13
+ import { readClip, reidFragment, writeClip } from "../../share/clipboard";
13
14
  import { getLocalizedText } from "../../share/locale";
14
15
  import BlockLayoutEditor from "../block-layout-editor/index.vue";
15
16
  import LayoutsSidebar from "../block-layout-editor/sidebar.vue";
@@ -176,6 +177,47 @@ function removeFields(ids) {
176
177
  stack.value = stack.value.slice(0, -1);
177
178
  }
178
179
  }
180
+ async function copyFields(ids) {
181
+ const want = new Set(ids);
182
+ const items = unit.value.fields.filter((f) => want.has(f.id));
183
+ if (items.length === 0) return;
184
+ const ls = unit.value.layouts[activeLayoutIndex.value];
185
+ const placements = {};
186
+ if (ls) {
187
+ for (const id of ids) {
188
+ const p = ls.layout.placements[id];
189
+ if (p) placements[id] = p;
190
+ }
191
+ }
192
+ if (!await writeClip("form", items, placements)) {
193
+ toast.error("\u590D\u5236\u5931\u8D25");
194
+ return;
195
+ }
196
+ toast.success(`\u5DF2\u590D\u5236 ${items.length} \u4E2A\u5B57\u6BB5`);
197
+ }
198
+ async function pasteFields(target) {
199
+ const payload = await readClip();
200
+ if (!payload || payload.surface !== "form") return;
201
+ const { items, placements } = reidFragment(payload.items, payload.placements);
202
+ const pasted = items;
203
+ if (pasted.length === 0) return;
204
+ const place = placements;
205
+ if (place && Object.keys(place).length > 0) {
206
+ const i = activeLayoutIndex.value;
207
+ const nextLayouts = unit.value.layouts.map((ls, idx) => {
208
+ if (idx !== i) return ls;
209
+ const shifted = placeGroupAt(ls.layout.placements, place, target ?? { x: 1, y: 1 });
210
+ return normalizeLayoutSet({
211
+ ...ls,
212
+ layout: { ...ls.layout, placements: { ...ls.layout.placements, ...shifted } }
213
+ });
214
+ });
215
+ unit.value = { ...unit.value, fields: [...unit.value.fields, ...pasted], layouts: nextLayouts };
216
+ } else {
217
+ unit.value = { ...unit.value, fields: [...unit.value.fields, ...pasted] };
218
+ }
219
+ toast.success(`\u5DF2\u7C98\u8D34 ${pasted.length} \u4E2A\u5B57\u6BB5`);
220
+ }
179
221
  function updateActiveField(next) {
180
222
  const id = activeFieldId.value;
181
223
  if (!id) return;
@@ -434,6 +476,8 @@ function isExtraActive(id) {
434
476
  @drill-down="drillField"
435
477
  @delete-item="removeField"
436
478
  @delete-items="removeFields"
479
+ @copy-items="copyFields"
480
+ @paste="pasteFields"
437
481
  />
438
482
  </div>
439
483
  </div>
@@ -1,5 +1,4 @@
1
1
  <script setup>
2
- import { Switch } from "../../../../ui/switch";
3
2
  import { Separator } from "../../../../ui/separator";
4
3
  import { Field, FieldLabel } from "../../../../ui/field";
5
4
  import { ExpressionEditor } from "../../../../ui/expression-editor";
@@ -68,27 +67,6 @@ function updateOptionalString(key, next) {
68
67
  </SelectContent>
69
68
  </Select>
70
69
  </Field>
71
- <Field orientation="vertical">
72
- <FieldLabel class="text-xs text-zinc-500">
73
- <template
74
- v-if="fieldDescription('crossPage')"
75
- #tooltip
76
- >
77
- <Markdown
78
- :source="fieldDescription('crossPage')"
79
- block
80
- class="prose prose-sm prose-zinc"
81
- />
82
- </template>
83
- {{ fieldTitle("crossPage") }}
84
- </FieldLabel>
85
- <div class="flex h-9 items-center">
86
- <Switch
87
- :model-value="value.crossPage ?? false"
88
- @update:model-value="(v) => value.crossPage = v"
89
- />
90
- </div>
91
- </Field>
92
70
  </div>
93
71
  <Separator />
94
72
  <div class="grid grid-cols-2 gap-x-6 gap-y-4">
@@ -11,36 +11,24 @@ const { t } = useI18n({
11
11
  inheritLocale: true,
12
12
  messages: {
13
13
  zh: {
14
- "select-all-rows-on-page": "\u9009\u62E9\u5F53\u524D\u9875\u5168\u90E8\u884C",
15
14
  "select-all-rows": "\u9009\u62E9\u5168\u90E8\u884C"
16
15
  },
17
16
  en: {
18
- "select-all-rows-on-page": "Select all rows on page",
19
17
  "select-all-rows": "Select all rows"
20
18
  },
21
19
  ja: {
22
- "select-all-rows-on-page": "\u73FE\u5728\u306E\u30DA\u30FC\u30B8\u306E\u3059\u3079\u3066\u306E\u884C\u3092\u9078\u629E",
23
20
  "select-all-rows": "\u3059\u3079\u3066\u306E\u884C\u3092\u9078\u629E"
24
21
  }
25
22
  }
26
23
  });
27
24
  const table = computed(() => props.ctx.table);
28
- const crossPage = computed(() => props.column.crossPage ?? false);
29
25
  const hidden = computed(() => props.column.mode === "radio");
30
- const indeterminate = computed(
31
- () => crossPage.value ? table.value.getIsSomePageRowsSelected() : table.value.getIsSomeRowsSelected()
32
- );
33
- const checked = computed(
34
- () => crossPage.value ? table.value.getIsAllPageRowsSelected() : table.value.getIsAllRowsSelected()
35
- );
26
+ const indeterminate = computed(() => table.value.getIsSomeRowsSelected());
27
+ const checked = computed(() => table.value.getIsAllRowsSelected());
36
28
  const modelValue = computed(
37
29
  () => checked.value ? true : indeterminate.value ? "indeterminate" : false
38
30
  );
39
31
  function onUpdate(value) {
40
- if (crossPage.value) {
41
- table.value.toggleAllPageRowsSelected(value === true);
42
- return;
43
- }
44
32
  table.value.toggleAllRowsSelected(value === true);
45
33
  }
46
34
  </script>
@@ -52,7 +40,7 @@ function onUpdate(value) {
52
40
  >
53
41
  <Checkbox
54
42
  :model-value="modelValue"
55
- :aria-label="crossPage ? t('select-all-rows-on-page') : t('select-all-rows')"
43
+ :aria-label="t('select-all-rows')"
56
44
  class="w-4 h-4 bg-white"
57
45
  @update:model-value="onUpdate"
58
46
  />
@@ -11,7 +11,6 @@ export declare function schema(configure: (env: Environment) => void): Schema.St
11
11
  mode: Schema.optionalWith<Schema.Literal<["radio", "checkbox"]>, {
12
12
  default: () => "checkbox";
13
13
  }>;
14
- crossPage: Schema.optional<Schema.SchemaClass<boolean, boolean, never>>;
15
14
  enableRowSelection: Schema.optional<Schema.Schema<string, string, never>>;
16
15
  enableMultiRowSelection: Schema.optional<Schema.Schema<string, string, never>>;
17
16
  id: Schema.refine<string, typeof Schema.String>;
@@ -25,10 +25,6 @@ export function schema(configure) {
25
25
  title: "\u6A21\u5F0F",
26
26
  description: "\u9009\u62E9\u6A21\u5F0F\uFF0Cradio \u4E3A\u5355\u9009\uFF0Ccheckbox \u4E3A\u591A\u9009"
27
27
  }), { default: () => "checkbox" }),
28
- crossPage: Schema.optional(Schema.Boolean.annotations({
29
- title: "\u8BB0\u5FC6\u9009\u4E2D\u9879",
30
- description: "\u662F\u5426\u652F\u6301\u8DE8\u9875\u9009\u62E9"
31
- })),
32
28
  enableRowSelection: Schema.optional(CelRowSelectionPredicate).annotations({
33
29
  title: "\u884C\u53EF\u9009\u4E2D",
34
30
  description: "\u884C\u662F\u5426\u53EF\u9009\u4E2D\u7684 CEL \u8868\u8FBE\u5F0F"
@@ -0,0 +1,183 @@
1
+ import { type Value } from './schema.js';
2
+ type __VLS_ModelProps = {
3
+ modelValue: Value;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:modelValue": (value: {
7
+ readonly size?: number | undefined;
8
+ readonly disabled?: string | undefined;
9
+ readonly type: "com.shwfed.table.column.combobox-multi";
10
+ readonly id: string;
11
+ readonly title: readonly [{
12
+ readonly locale: "zh";
13
+ readonly message: string;
14
+ }, ...{
15
+ readonly locale: "en" | "ja" | "ko";
16
+ readonly message: string;
17
+ }[]];
18
+ readonly hidden?: string | undefined;
19
+ readonly tooltip?: readonly [{
20
+ readonly locale: "zh";
21
+ readonly message: string;
22
+ }, ...{
23
+ readonly locale: "en" | "ja" | "ko";
24
+ readonly message: string;
25
+ }[]] | undefined;
26
+ readonly compatibilityDate: "2026-05-28";
27
+ readonly groupId?: string | undefined;
28
+ readonly placeholder?: readonly [{
29
+ readonly locale: "zh";
30
+ readonly message: string;
31
+ }, ...{
32
+ readonly locale: "en" | "ja" | "ko";
33
+ readonly message: string;
34
+ }[]] | undefined;
35
+ readonly readonly?: string | undefined;
36
+ readonly write: {
37
+ readonly kind: "binding";
38
+ readonly binding: string;
39
+ } | {
40
+ readonly onChange?: string | undefined;
41
+ readonly kind: "remote";
42
+ readonly triggers?: readonly {
43
+ readonly target: string;
44
+ readonly operation: string;
45
+ }[] | undefined;
46
+ readonly accessor: string;
47
+ readonly successMessage?: string | undefined;
48
+ };
49
+ readonly grow?: boolean | undefined;
50
+ readonly options: {
51
+ readonly kind: "remote";
52
+ readonly request: string;
53
+ readonly options: string;
54
+ readonly optionValue: string;
55
+ readonly optionLabel: readonly [{
56
+ readonly locale: "zh";
57
+ readonly message: string;
58
+ }, ...{
59
+ readonly locale: "en" | "ja" | "ko";
60
+ readonly message: string;
61
+ }[]];
62
+ readonly optionKeywords?: string | undefined;
63
+ } | {
64
+ readonly kind: "static";
65
+ readonly items: readonly {
66
+ readonly label: readonly [{
67
+ readonly locale: "zh";
68
+ readonly message: string;
69
+ }, ...{
70
+ readonly locale: "en" | "ja" | "ko";
71
+ readonly message: string;
72
+ }[]];
73
+ readonly id: string;
74
+ readonly tooltip?: readonly [{
75
+ readonly locale: "zh";
76
+ readonly message: string;
77
+ }, ...{
78
+ readonly locale: "en" | "ja" | "ko";
79
+ readonly message: string;
80
+ }[]] | undefined;
81
+ readonly value: {
82
+ readonly value: string;
83
+ readonly kind: "text";
84
+ } | {
85
+ readonly value: number;
86
+ readonly kind: "number";
87
+ };
88
+ readonly keywords?: readonly string[] | undefined;
89
+ }[];
90
+ };
91
+ readonly enableSorting?: boolean | undefined;
92
+ }) => any;
93
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
94
+ "onUpdate:modelValue"?: ((value: {
95
+ readonly size?: number | undefined;
96
+ readonly disabled?: string | undefined;
97
+ readonly type: "com.shwfed.table.column.combobox-multi";
98
+ readonly id: string;
99
+ readonly title: readonly [{
100
+ readonly locale: "zh";
101
+ readonly message: string;
102
+ }, ...{
103
+ readonly locale: "en" | "ja" | "ko";
104
+ readonly message: string;
105
+ }[]];
106
+ readonly hidden?: string | undefined;
107
+ readonly tooltip?: readonly [{
108
+ readonly locale: "zh";
109
+ readonly message: string;
110
+ }, ...{
111
+ readonly locale: "en" | "ja" | "ko";
112
+ readonly message: string;
113
+ }[]] | undefined;
114
+ readonly compatibilityDate: "2026-05-28";
115
+ readonly groupId?: string | undefined;
116
+ readonly placeholder?: readonly [{
117
+ readonly locale: "zh";
118
+ readonly message: string;
119
+ }, ...{
120
+ readonly locale: "en" | "ja" | "ko";
121
+ readonly message: string;
122
+ }[]] | undefined;
123
+ readonly readonly?: string | undefined;
124
+ readonly write: {
125
+ readonly kind: "binding";
126
+ readonly binding: string;
127
+ } | {
128
+ readonly onChange?: string | undefined;
129
+ readonly kind: "remote";
130
+ readonly triggers?: readonly {
131
+ readonly target: string;
132
+ readonly operation: string;
133
+ }[] | undefined;
134
+ readonly accessor: string;
135
+ readonly successMessage?: string | undefined;
136
+ };
137
+ readonly grow?: boolean | undefined;
138
+ readonly options: {
139
+ readonly kind: "remote";
140
+ readonly request: string;
141
+ readonly options: string;
142
+ readonly optionValue: string;
143
+ readonly optionLabel: readonly [{
144
+ readonly locale: "zh";
145
+ readonly message: string;
146
+ }, ...{
147
+ readonly locale: "en" | "ja" | "ko";
148
+ readonly message: string;
149
+ }[]];
150
+ readonly optionKeywords?: string | undefined;
151
+ } | {
152
+ readonly kind: "static";
153
+ readonly items: readonly {
154
+ readonly label: readonly [{
155
+ readonly locale: "zh";
156
+ readonly message: string;
157
+ }, ...{
158
+ readonly locale: "en" | "ja" | "ko";
159
+ readonly message: string;
160
+ }[]];
161
+ readonly id: string;
162
+ readonly tooltip?: readonly [{
163
+ readonly locale: "zh";
164
+ readonly message: string;
165
+ }, ...{
166
+ readonly locale: "en" | "ja" | "ko";
167
+ readonly message: string;
168
+ }[]] | undefined;
169
+ readonly value: {
170
+ readonly value: string;
171
+ readonly kind: "text";
172
+ } | {
173
+ readonly value: number;
174
+ readonly kind: "number";
175
+ };
176
+ readonly keywords?: readonly string[] | undefined;
177
+ }[];
178
+ };
179
+ readonly enableSorting?: boolean | undefined;
180
+ }) => any) | undefined;
181
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
182
+ declare const _default: typeof __VLS_export;
183
+ export default _default;