@shwfed/config 2.3.28 → 2.3.29

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 (127) hide show
  1. package/dist/mcp.mjs +3124 -1268
  2. package/dist/module.json +1 -1
  3. package/dist/preview/assets/{config-fvkC2rB8.js → config-6IiXCmyu.js} +1 -1
  4. package/dist/preview/assets/{config--PcXQV_r.js → config-BJzUh1_G.js} +1 -1
  5. package/dist/preview/assets/{config-B5avpKJE.js → config-Bl80ye-i.js} +1 -1
  6. package/dist/preview/assets/{config-DDfTl9Cs.js → config-CZOeZ8ty.js} +1 -1
  7. package/dist/preview/assets/{config-CJHPt8Gx.js → config-DaZD4ZSa.js} +1 -1
  8. package/dist/preview/assets/{config-CNo3isHa.js → config-DhsbcNzx.js} +1 -1
  9. package/dist/preview/assets/{config-5KVDXgUF.js → config-Diuyh0Ex.js} +1 -1
  10. package/dist/preview/assets/{config-D0_1yZdF.js → config-aK67Rsw5.js} +1 -1
  11. package/dist/preview/assets/{config-CQHS6cZe.js → config-rpX_Mc6I.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_jU8d47.js} +1 -1
  13. package/dist/preview/assets/{index-a2QwAots.css → index-2eQR4s3q.css} +1 -1
  14. package/dist/preview/assets/index-DEF3_MKr.js +659 -0
  15. package/dist/preview/assets/index-Df-thth9.js +1 -0
  16. package/dist/preview/assets/{runtime-Dr_10emf.js → runtime-3p1K6te5.js} +1 -1
  17. package/dist/preview/assets/{runtime-C_XX6a0C.js → runtime-BcLnafic.js} +1 -1
  18. package/dist/preview/assets/{runtime-CtqwtTE_.js → runtime-CSaV-359.js} +1 -1
  19. package/dist/preview/assets/{runtime-CCbyrqQT.js → runtime-CjR8Vi5N.js} +1 -1
  20. package/dist/preview/assets/{runtime-BGTWf-O7.js → runtime-D_fJCKX_.js} +1 -1
  21. package/dist/preview/assets/{runtime-BPjZQmcY.js → runtime-DpeCgGEG.js} +1 -1
  22. package/dist/preview/assets/{runtime-DcrzodsN.js → runtime-K2a1x0TJ.js} +1 -1
  23. package/dist/preview/assets/{runtime-Dy4ZmQ-n.js → runtime-g9Zu3VNQ.js} +1 -1
  24. package/dist/preview/assets/{runtime-Bq3fmxeF.js → runtime-jTnh_6Dm.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/config.vue +35 -0
  30. package/dist/runtime/components/config/use-editor.d.ts +11 -1
  31. package/dist/runtime/components/config/use-editor.js +27 -1
  32. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.d.vue.ts +163 -0
  33. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue +745 -0
  34. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/config.vue.d.ts +163 -0
  35. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.d.vue.ts +8 -0
  36. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue +383 -0
  37. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/runtime.vue.d.ts +8 -0
  38. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.d.ts +264 -0
  39. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.multi/schema.js +183 -0
  40. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.d.vue.ts +163 -0
  41. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue +745 -0
  42. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/config.vue.d.ts +163 -0
  43. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.d.vue.ts +8 -0
  44. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue +402 -0
  45. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/runtime.vue.d.ts +8 -0
  46. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.d.ts +264 -0
  47. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.combobox.single/schema.js +209 -0
  48. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +129 -0
  49. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue +618 -0
  50. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +129 -0
  51. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
  52. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue +501 -0
  53. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
  54. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +99 -0
  55. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.multi/schema.js +133 -0
  56. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +127 -0
  57. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue +550 -0
  58. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +127 -0
  59. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
  60. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue +496 -0
  61. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
  62. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.d.ts +96 -0
  63. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.combobox.single/schema.js +125 -0
  64. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.d.vue.ts +133 -0
  65. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue +605 -0
  66. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/config.vue.d.ts +133 -0
  67. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.d.vue.ts +8 -0
  68. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue +401 -0
  69. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/runtime.vue.d.ts +8 -0
  70. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.d.ts +102 -0
  71. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.multi/schema.js +142 -0
  72. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.d.vue.ts +131 -0
  73. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue +560 -0
  74. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/config.vue.d.ts +131 -0
  75. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.d.vue.ts +8 -0
  76. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue +395 -0
  77. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/runtime.vue.d.ts +8 -0
  78. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.d.ts +96 -0
  79. package/dist/runtime/components/form/fields/2026-05-28/com.shwfed.form.field.tree.single/schema.js +118 -0
  80. package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.d.ts +35 -0
  81. package/dist/runtime/components/form/fields/2026-05-28/tree-combobox-shared.js +31 -0
  82. package/dist/runtime/components/form/unit-config.vue +45 -1
  83. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.d.vue.ts +183 -0
  84. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue +931 -0
  85. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/config.vue.d.ts +183 -0
  86. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.d.vue.ts +9 -0
  87. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue +463 -0
  88. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/runtime.vue.d.ts +9 -0
  89. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.d.ts +283 -0
  90. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-multi/schema.js +275 -0
  91. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.d.vue.ts +183 -0
  92. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue +931 -0
  93. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/config.vue.d.ts +183 -0
  94. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.d.vue.ts +9 -0
  95. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue +414 -0
  96. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/runtime.vue.d.ts +9 -0
  97. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.d.ts +283 -0
  98. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.combobox-single/schema.js +275 -0
  99. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +133 -0
  100. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue +632 -0
  101. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +133 -0
  102. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
  103. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue +461 -0
  104. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
  105. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +93 -0
  106. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-multi/schema.js +161 -0
  107. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +131 -0
  108. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue +563 -0
  109. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +131 -0
  110. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
  111. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue +443 -0
  112. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
  113. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.d.ts +90 -0
  114. package/dist/runtime/components/table/columns/2026-05-28/com.shwfed.table.column.tree-combobox-single/schema.js +153 -0
  115. package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.d.ts +35 -0
  116. package/dist/runtime/components/table/columns/2026-05-28/tree-combobox-shared.js +31 -0
  117. package/dist/runtime/components/table/config.vue +1 -30
  118. package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +7 -0
  119. package/dist/runtime/components/ui/command/CommandItem.vue +13 -4
  120. package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +7 -0
  121. package/dist/runtime/share/clipboard.d.ts +26 -0
  122. package/dist/runtime/share/clipboard.js +82 -0
  123. package/dist/runtime/share/layout.d.ts +4 -0
  124. package/dist/runtime/share/layout.js +35 -0
  125. package/package.json +1 -1
  126. package/dist/preview/assets/index-DNd8J9Zv.js +0 -643
  127. package/dist/preview/assets/index-DrIMqXAa.js +0 -1
@@ -0,0 +1,632 @@
1
+ <script setup>
2
+ import { computed, ref, watch } from "vue";
3
+ import { Icon } from "@iconify/vue";
4
+ import { ExpressionEditor } from "../../../../ui/expression-editor";
5
+ import { Field, FieldLabel } from "../../../../ui/field";
6
+ import {
7
+ InputGroup,
8
+ InputGroupAddon,
9
+ InputGroupButton,
10
+ InputGroupInput,
11
+ InputGroupNumberField
12
+ } from "../../../../ui/input-group";
13
+ import { Locale as LocaleField } from "../../../../ui/locale";
14
+ import { Markdown } from "../../../../ui/markdown";
15
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../../ui/select";
16
+ import { Separator } from "../../../../ui/separator";
17
+ import { Switch } from "../../../../ui/switch";
18
+ import DerivedValueEditor from "../../../../form/DerivedValueEditor.vue";
19
+ import { DataSource } from "../../../schema";
20
+ import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
21
+ import { schema } from "./schema";
22
+ defineOptions({ name: "ShwfedTableTreeComboboxMultiRendererConfig" });
23
+ const value = defineModel({ type: null, ...{ required: true } });
24
+ const fieldSchema = schema(() => {
25
+ });
26
+ const fieldTitle = (f) => getStructFieldTitle(fieldSchema, f) ?? f;
27
+ const fieldDescription = (f) => getStructFieldDescription(fieldSchema, f);
28
+ const dataSourceSchema = DataSource(() => {
29
+ });
30
+ const dataSourceFieldTitle = (f) => getStructFieldTitle(dataSourceSchema, f) ?? f;
31
+ const dataSourceFieldDescription = (f) => getStructFieldDescription(dataSourceSchema, f);
32
+ const ROW_VARS = {
33
+ row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
34
+ index: { type: "number", label: "\u884C\u7D22\u5F15" }
35
+ };
36
+ const ROW_NODE_VARS = {
37
+ ...ROW_VARS,
38
+ node: {
39
+ type: "dyn",
40
+ label: "\u5F53\u524D\u8282\u70B9",
41
+ description: "\u7531 `\u6570\u636E` \u8868\u8FBE\u5F0F\u8FD4\u56DE\u7684\u6BCF\u4E00\u9879\uFF1B\u7C7B\u578B\u5728\u914D\u7F6E\u65F6\u672A\u77E5\uFF08`dyn`\uFF09"
42
+ }
43
+ };
44
+ const ROW_JSON_VARS = {
45
+ ...ROW_VARS,
46
+ json: {
47
+ type: "optional<dyn>",
48
+ label: "HTTP \u54CD\u5E94\u4F53",
49
+ description: "\u5DF2\u89E3\u6790\u7684 JSON \u54CD\u5E94\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`"
50
+ }
51
+ };
52
+ const CASCADE_OPTIONS = [
53
+ {
54
+ value: "independent",
55
+ label: "\u72EC\u7ACB",
56
+ description: "\u52FE\u9009 / \u53D6\u6D88\u53EA\u4F5C\u7528\u4E8E\u5F53\u524D\u8282\u70B9\uFF1B\u7236\u5B50\u4E92\u4E0D\u5F71\u54CD"
57
+ },
58
+ {
59
+ value: "cascade-down",
60
+ label: "\u5411\u4E0B\u7EA7\u8054",
61
+ description: "\u52FE\u9009\u7236\u8282\u70B9\u81EA\u52A8\u52FE\u9009\u5176\u5168\u90E8\u53EF\u9009\u540E\u4EE3\uFF1B\u53D6\u6D88\u65F6\u540C\u7406\u3002\u7236\u8282\u70B9\u7684\u52FE\u9009\u72B6\u6001\u72EC\u7ACB\u8FFD\u8E2A"
62
+ },
63
+ {
64
+ value: "cascade-both",
65
+ label: "\u53CC\u5411\u7EA7\u8054",
66
+ description: "\u5728\u5411\u4E0B\u7EA7\u8054\u57FA\u7840\u4E0A\uFF0C\u7236\u8282\u70B9\u53CD\u6620\u540E\u4EE3\u52FE\u9009\u72B6\u6001\uFF08\u5168\u9009\u2192\u9009\u4E2D\u3001\u90E8\u5206\u2192\u534A\u9009\u3001\u5168\u4E0D\u9009\u2192\u672A\u9009\uFF09"
67
+ }
68
+ ];
69
+ const cascadeOpen = ref(false);
70
+ const hoveredCascade = ref(null);
71
+ watch(cascadeOpen, (isOpen) => {
72
+ hoveredCascade.value = isOpen ? value.value.cascade ?? "independent" : null;
73
+ });
74
+ const hoveredCascadeDescription = computed(
75
+ () => CASCADE_OPTIONS.find((o) => o.value === hoveredCascade.value)?.description
76
+ );
77
+ const bindingText = computed({
78
+ get: () => value.value.binding ?? "",
79
+ set: (v) => {
80
+ const trimmed = v.trim();
81
+ if (trimmed === "") {
82
+ const { binding: _omit, ...rest } = value.value;
83
+ value.value = rest;
84
+ } else {
85
+ value.value = { ...value.value, binding: trimmed };
86
+ }
87
+ }
88
+ });
89
+ function setOptionalExpression(key, next) {
90
+ if (next.length === 0) {
91
+ const { [key]: _omit, ...rest } = value.value;
92
+ value.value = rest;
93
+ } else {
94
+ value.value = { ...value.value, [key]: next };
95
+ }
96
+ }
97
+ function setDataSourceData(next) {
98
+ value.value = {
99
+ ...value.value,
100
+ dataSource: { ...value.value.dataSource, data: next }
101
+ };
102
+ }
103
+ function setDataSourceRequest(next) {
104
+ const trimmed = next.trim();
105
+ if (trimmed.length === 0) {
106
+ const { request: _omit, ...rest } = value.value.dataSource;
107
+ value.value = { ...value.value, dataSource: rest };
108
+ } else {
109
+ value.value = {
110
+ ...value.value,
111
+ dataSource: { ...value.value.dataSource, request: next }
112
+ };
113
+ }
114
+ }
115
+ const derivedModel = computed({
116
+ get: () => value.value.derived,
117
+ set: (v) => {
118
+ if (v == null) {
119
+ const { derived: _omit, ...rest } = value.value;
120
+ value.value = rest;
121
+ } else {
122
+ value.value = { ...value.value, derived: v };
123
+ }
124
+ }
125
+ });
126
+ </script>
127
+
128
+ <template>
129
+ <div class="space-y-5">
130
+ <!-- Identity: title + binding + placeholder + size -->
131
+ <div class="grid grid-cols-2 gap-x-6 gap-y-4">
132
+ <Field orientation="vertical">
133
+ <FieldLabel class="text-xs text-zinc-500">
134
+ <template
135
+ v-if="fieldDescription('title')"
136
+ #tooltip
137
+ >
138
+ <Markdown
139
+ :source="fieldDescription('title')"
140
+ block
141
+ class="prose prose-sm prose-zinc"
142
+ />
143
+ </template>
144
+ {{ fieldTitle("title") }}
145
+ </FieldLabel>
146
+ <LocaleField v-model="value.title" />
147
+ </Field>
148
+ <Field orientation="vertical">
149
+ <FieldLabel class="text-xs text-zinc-500">
150
+ <template
151
+ v-if="fieldDescription('tooltip')"
152
+ #tooltip
153
+ >
154
+ <Markdown
155
+ :source="fieldDescription('tooltip')"
156
+ block
157
+ class="prose prose-sm prose-zinc"
158
+ />
159
+ </template>
160
+ {{ fieldTitle("tooltip") }}
161
+ </FieldLabel>
162
+ <LocaleField
163
+ v-model="value.tooltip"
164
+ markdown
165
+ />
166
+ </Field>
167
+ </div>
168
+ <div class="grid grid-cols-2 gap-x-6 gap-y-4">
169
+ <Field orientation="vertical">
170
+ <FieldLabel class="text-xs text-zinc-500">
171
+ <template
172
+ v-if="fieldDescription('binding')"
173
+ #tooltip
174
+ >
175
+ <Markdown
176
+ :source="fieldDescription('binding')"
177
+ block
178
+ class="prose prose-sm prose-zinc"
179
+ />
180
+ </template>
181
+ {{ fieldTitle("binding") }}
182
+ </FieldLabel>
183
+ <InputGroup>
184
+ <InputGroupInput
185
+ v-model="bindingText"
186
+ placeholder="例:user.departmentIds"
187
+ class="font-mono"
188
+ />
189
+ </InputGroup>
190
+ </Field>
191
+ <Field orientation="vertical">
192
+ <FieldLabel class="text-xs text-zinc-500">
193
+ <template
194
+ v-if="fieldDescription('placeholder')"
195
+ #tooltip
196
+ >
197
+ <Markdown
198
+ :source="fieldDescription('placeholder')"
199
+ block
200
+ class="prose prose-sm prose-zinc"
201
+ />
202
+ </template>
203
+ {{ fieldTitle("placeholder") }}
204
+ </FieldLabel>
205
+ <LocaleField v-model="value.placeholder" />
206
+ </Field>
207
+ <Field orientation="vertical">
208
+ <FieldLabel class="text-xs text-zinc-500">
209
+ <template
210
+ v-if="fieldDescription('size')"
211
+ #tooltip
212
+ >
213
+ <Markdown
214
+ :source="fieldDescription('size')"
215
+ block
216
+ class="prose prose-sm prose-zinc"
217
+ />
218
+ </template>
219
+ {{ fieldTitle("size") }}
220
+ </FieldLabel>
221
+ <InputGroup>
222
+ <InputGroupNumberField
223
+ :model-value="value.size"
224
+ :disabled="value.grow"
225
+ :min="0"
226
+ @update:model-value="(v) => value = { ...value, size: v }"
227
+ />
228
+ <InputGroupAddon align="inline-end">
229
+ <InputGroupButton
230
+ :variant="value.grow ? 'primary' : 'ghost'"
231
+ size="xs"
232
+ @click="value = { ...value, grow: !value.grow }"
233
+ >
234
+ <Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
235
+ {{ fieldTitle("grow") }}
236
+ </InputGroupButton>
237
+ </InputGroupAddon>
238
+ </InputGroup>
239
+ </Field>
240
+ </div>
241
+
242
+ <!-- 数据源 -->
243
+ <h3 class="text-xs font-medium text-zinc-500">
244
+ {{ fieldTitle("dataSource") }}
245
+ </h3>
246
+
247
+ <Field orientation="vertical">
248
+ <FieldLabel class="text-xs text-zinc-500">
249
+ <template
250
+ v-if="dataSourceFieldDescription('request')"
251
+ #tooltip
252
+ >
253
+ <Markdown
254
+ :source="dataSourceFieldDescription('request')"
255
+ block
256
+ class="prose prose-sm prose-zinc"
257
+ />
258
+ </template>
259
+ {{ dataSourceFieldTitle("request") }}
260
+ </FieldLabel>
261
+ <ExpressionEditor
262
+ :model-value="value.dataSource.request ?? ''"
263
+ placeholder="如 http.get('/api/departments/tree')"
264
+ result-type="HttpRequest"
265
+ :extra-vars="ROW_VARS"
266
+ multiline
267
+ class="min-h-20"
268
+ @update:model-value="setDataSourceRequest"
269
+ />
270
+ </Field>
271
+
272
+ <Field orientation="vertical">
273
+ <FieldLabel class="text-xs text-zinc-500">
274
+ <template
275
+ v-if="dataSourceFieldDescription('data')"
276
+ #tooltip
277
+ >
278
+ <Markdown
279
+ :source="dataSourceFieldDescription('data')"
280
+ block
281
+ class="prose prose-sm prose-zinc"
282
+ />
283
+ </template>
284
+ {{ dataSourceFieldTitle("data") }}
285
+ </FieldLabel>
286
+ <ExpressionEditor
287
+ :model-value="value.dataSource.data"
288
+ placeholder="如 json.?value.roots.orValue([])"
289
+ result-type="list"
290
+ :extra-vars="ROW_JSON_VARS"
291
+ @update:model-value="setDataSourceData"
292
+ />
293
+ </Field>
294
+
295
+ <!-- 节点 -->
296
+ <h3 class="text-xs font-medium text-zinc-500">
297
+ 节点
298
+ </h3>
299
+
300
+ <div class="grid grid-cols-2 gap-3">
301
+ <Field orientation="vertical">
302
+ <FieldLabel class="text-xs text-zinc-500">
303
+ <template
304
+ v-if="fieldDescription('nodeKey')"
305
+ #tooltip
306
+ >
307
+ <Markdown
308
+ :source="fieldDescription('nodeKey')"
309
+ block
310
+ class="prose prose-sm prose-zinc"
311
+ />
312
+ </template>
313
+ {{ fieldTitle("nodeKey") }}
314
+ </FieldLabel>
315
+ <ExpressionEditor
316
+ :model-value="value.nodeKey"
317
+ placeholder="例:string(node.id)"
318
+ :result-type="['string', 'number', 'dyn']"
319
+ :extra-vars="ROW_NODE_VARS"
320
+ class="min-h-10"
321
+ @update:model-value="(v) => value = { ...value, nodeKey: v }"
322
+ />
323
+ </Field>
324
+
325
+ <Field orientation="vertical">
326
+ <FieldLabel class="text-xs text-zinc-500">
327
+ <template
328
+ v-if="fieldDescription('nodeChildren')"
329
+ #tooltip
330
+ >
331
+ <Markdown
332
+ :source="fieldDescription('nodeChildren')"
333
+ block
334
+ class="prose prose-sm prose-zinc"
335
+ />
336
+ </template>
337
+ {{ fieldTitle("nodeChildren") }}
338
+ </FieldLabel>
339
+ <ExpressionEditor
340
+ :model-value="value.nodeChildren"
341
+ placeholder="例:has(node.children) ? node.children : null"
342
+ result-type="list"
343
+ :extra-vars="ROW_NODE_VARS"
344
+ class="min-h-10"
345
+ @update:model-value="(v) => value = { ...value, nodeChildren: v }"
346
+ />
347
+ </Field>
348
+ </div>
349
+
350
+ <div class="grid grid-cols-2 gap-3">
351
+ <Field orientation="vertical">
352
+ <FieldLabel class="text-xs text-zinc-500">
353
+ <template
354
+ v-if="fieldDescription('nodeLabel')"
355
+ #tooltip
356
+ >
357
+ <Markdown
358
+ :source="fieldDescription('nodeLabel')"
359
+ block
360
+ class="prose prose-sm prose-zinc"
361
+ />
362
+ </template>
363
+ {{ fieldTitle("nodeLabel") }}
364
+ </FieldLabel>
365
+ <LocaleField
366
+ markdown
367
+ translate-hint="tree node label"
368
+ :model-value="value.nodeLabel"
369
+ @update:model-value="(v) => value = { ...value, nodeLabel: v }"
370
+ />
371
+ </Field>
372
+
373
+ <Field orientation="vertical">
374
+ <FieldLabel class="text-xs text-zinc-500">
375
+ <template
376
+ v-if="fieldDescription('nodeTooltip')"
377
+ #tooltip
378
+ >
379
+ <Markdown
380
+ :source="fieldDescription('nodeTooltip')"
381
+ block
382
+ class="prose prose-sm prose-zinc"
383
+ />
384
+ </template>
385
+ {{ fieldTitle("nodeTooltip") }}
386
+ </FieldLabel>
387
+ <LocaleField
388
+ markdown
389
+ translate-hint="tree node tooltip"
390
+ :model-value="value.nodeTooltip"
391
+ @update:model-value="(v) => value = { ...value, nodeTooltip: v }"
392
+ />
393
+ </Field>
394
+ </div>
395
+
396
+ <!-- 搜索: 额外关键词(节点作用域,返回字符串列表) -->
397
+ <Field orientation="vertical">
398
+ <FieldLabel class="text-xs text-zinc-500">
399
+ <template
400
+ v-if="fieldDescription('keywords')"
401
+ #tooltip
402
+ >
403
+ <Markdown
404
+ :source="fieldDescription('keywords')"
405
+ block
406
+ class="prose prose-sm prose-zinc"
407
+ />
408
+ </template>
409
+ {{ fieldTitle("keywords") }}
410
+ </FieldLabel>
411
+ <ExpressionEditor
412
+ :model-value="value.keywords ?? ''"
413
+ placeholder="例:[node.code, node.pinyin]"
414
+ result-type="list"
415
+ :extra-vars="ROW_NODE_VARS"
416
+ class="min-h-10"
417
+ @update:model-value="(v) => setOptionalExpression('keywords', v)"
418
+ />
419
+ </Field>
420
+
421
+ <!-- 行为: 节点可选条件 + 级联模式 + 默认全部展开 -->
422
+ <div class="grid grid-cols-3 gap-3">
423
+ <Field orientation="vertical">
424
+ <FieldLabel class="text-xs text-zinc-500">
425
+ <template
426
+ v-if="fieldDescription('nodeSelectable')"
427
+ #tooltip
428
+ >
429
+ <Markdown
430
+ :source="fieldDescription('nodeSelectable')"
431
+ block
432
+ class="prose prose-sm prose-zinc"
433
+ />
434
+ </template>
435
+ {{ fieldTitle("nodeSelectable") }}
436
+ </FieldLabel>
437
+ <ExpressionEditor
438
+ :model-value="value.nodeSelectable ?? ''"
439
+ placeholder="例:!has(node.disabled) || !node.disabled"
440
+ result-type="bool"
441
+ :extra-vars="ROW_NODE_VARS"
442
+ class="min-h-10"
443
+ @update:model-value="(v) => setOptionalExpression('nodeSelectable', v)"
444
+ />
445
+ </Field>
446
+
447
+ <Field orientation="vertical">
448
+ <FieldLabel class="text-xs text-zinc-500">
449
+ <template
450
+ v-if="fieldDescription('cascade')"
451
+ #tooltip
452
+ >
453
+ <Markdown
454
+ :source="fieldDescription('cascade')"
455
+ block
456
+ class="prose prose-sm prose-zinc"
457
+ />
458
+ </template>
459
+ {{ fieldTitle("cascade") }}
460
+ </FieldLabel>
461
+ <Select
462
+ v-model:open="cascadeOpen"
463
+ :model-value="value.cascade ?? 'independent'"
464
+ @update:model-value="(v) => value = { ...value, cascade: v }"
465
+ >
466
+ <SelectTrigger class="w-full">
467
+ <SelectValue />
468
+ </SelectTrigger>
469
+ <SelectContent>
470
+ <SelectItem
471
+ v-for="opt in CASCADE_OPTIONS"
472
+ :key="opt.value"
473
+ :value="opt.value"
474
+ @mouseenter="hoveredCascade = opt.value"
475
+ @focus="hoveredCascade = opt.value"
476
+ >
477
+ {{ opt.label }}
478
+ </SelectItem>
479
+ <div
480
+ v-if="hoveredCascadeDescription"
481
+ data-slot="cascade-description"
482
+ class="mt-1 border-t border-zinc-200 px-2 py-1.5 text-xs text-zinc-500"
483
+ >
484
+ {{ hoveredCascadeDescription }}
485
+ </div>
486
+ </SelectContent>
487
+ </Select>
488
+ </Field>
489
+
490
+ <Field orientation="vertical">
491
+ <FieldLabel class="text-xs text-zinc-500">
492
+ <template
493
+ v-if="fieldDescription('expandAll')"
494
+ #tooltip
495
+ >
496
+ <Markdown
497
+ :source="fieldDescription('expandAll')"
498
+ block
499
+ class="prose prose-sm prose-zinc"
500
+ />
501
+ </template>
502
+ {{ fieldTitle("expandAll") }}
503
+ </FieldLabel>
504
+ <div>
505
+ <Switch
506
+ :model-value="value.expandAll ?? false"
507
+ @update:model-value="(v) => value = { ...value, expandAll: v }"
508
+ />
509
+ </div>
510
+ </Field>
511
+ </div>
512
+
513
+ <!-- 通用: 隐藏 / 禁用 / 只读 + 派生值 -->
514
+ <div class="grid grid-cols-2 gap-x-6 gap-y-4">
515
+ <Field orientation="vertical">
516
+ <FieldLabel class="text-xs text-zinc-500">
517
+ <template
518
+ v-if="fieldDescription('hidden')"
519
+ #tooltip
520
+ >
521
+ <Markdown
522
+ :source="fieldDescription('hidden')"
523
+ block
524
+ class="prose prose-sm prose-zinc"
525
+ />
526
+ </template>
527
+ {{ fieldTitle("hidden") }}
528
+ </FieldLabel>
529
+ <ExpressionEditor
530
+ :model-value="value.hidden ?? ''"
531
+ placeholder="例:row.archived"
532
+ result-type="bool"
533
+ :extra-vars="ROW_VARS"
534
+ @update:model-value="(v) => setOptionalExpression('hidden', v)"
535
+ />
536
+ </Field>
537
+ <Field orientation="vertical">
538
+ <FieldLabel class="text-xs text-zinc-500">
539
+ <template
540
+ v-if="fieldDescription('disabled')"
541
+ #tooltip
542
+ >
543
+ <Markdown
544
+ :source="fieldDescription('disabled')"
545
+ block
546
+ class="prose prose-sm prose-zinc"
547
+ />
548
+ </template>
549
+ {{ fieldTitle("disabled") }}
550
+ </FieldLabel>
551
+ <ExpressionEditor
552
+ :model-value="value.disabled ?? ''"
553
+ placeholder="例:row.locked"
554
+ result-type="bool"
555
+ :extra-vars="ROW_VARS"
556
+ @update:model-value="(v) => setOptionalExpression('disabled', v)"
557
+ />
558
+ </Field>
559
+ <Field orientation="vertical">
560
+ <FieldLabel class="text-xs text-zinc-500">
561
+ <template
562
+ v-if="fieldDescription('readonly')"
563
+ #tooltip
564
+ >
565
+ <Markdown
566
+ :source="fieldDescription('readonly')"
567
+ block
568
+ class="prose prose-sm prose-zinc"
569
+ />
570
+ </template>
571
+ {{ fieldTitle("readonly") }}
572
+ </FieldLabel>
573
+ <ExpressionEditor
574
+ :model-value="value.readonly ?? ''"
575
+ placeholder="例:row.id != null"
576
+ result-type="bool"
577
+ :extra-vars="ROW_VARS"
578
+ @update:model-value="(v) => setOptionalExpression('readonly', v)"
579
+ />
580
+ </Field>
581
+ <Field
582
+ orientation="vertical"
583
+ class="col-span-2"
584
+ >
585
+ <FieldLabel class="text-xs text-zinc-500">
586
+ <template
587
+ v-if="fieldDescription('derived')"
588
+ #tooltip
589
+ >
590
+ <Markdown
591
+ :source="fieldDescription('derived')"
592
+ block
593
+ class="prose prose-sm prose-zinc"
594
+ />
595
+ </template>
596
+ {{ fieldTitle("derived") }}
597
+ </FieldLabel>
598
+ <DerivedValueEditor
599
+ v-model="derivedModel"
600
+ result-type="list"
601
+ placeholder="例:row.defaultIds"
602
+ />
603
+ </Field>
604
+ </div>
605
+
606
+ <Separator />
607
+ <div class="flex flex-wrap gap-x-8 gap-y-3">
608
+ <Field
609
+ orientation="horizontal"
610
+ class="w-auto gap-2"
611
+ >
612
+ <Switch
613
+ :model-value="value.enableSorting ?? false"
614
+ @update:model-value="(v) => value = { ...value, enableSorting: v }"
615
+ />
616
+ <FieldLabel class="text-sm text-zinc-600">
617
+ <template
618
+ v-if="fieldDescription('enableSorting')"
619
+ #tooltip
620
+ >
621
+ <Markdown
622
+ :source="fieldDescription('enableSorting')"
623
+ block
624
+ class="prose prose-sm prose-zinc"
625
+ />
626
+ </template>
627
+ {{ fieldTitle("enableSorting") }}
628
+ </FieldLabel>
629
+ </Field>
630
+ </div>
631
+ </div>
632
+ </template>