@shwfed/config 2.3.26 → 2.3.28
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/mcp.mjs +1211 -701
- package/dist/module.json +1 -1
- package/dist/preview/assets/{config-BkimX91E.js → config--PcXQV_r.js} +1 -1
- package/dist/preview/assets/{config-CO2iovZD.js → config-5KVDXgUF.js} +1 -1
- package/dist/preview/assets/{config-u1rl9w2L.js → config-B5avpKJE.js} +1 -1
- package/dist/preview/assets/{config-DgZ4NYoA.js → config-CJHPt8Gx.js} +1 -1
- package/dist/preview/assets/{config-ypYLVfRE.js → config-CNo3isHa.js} +1 -1
- package/dist/preview/assets/{config-Cm9t0CvW.js → config-CQHS6cZe.js} +1 -1
- package/dist/preview/assets/{config-DPFHMkHc.js → config-D0_1yZdF.js} +1 -1
- package/dist/preview/assets/{config-Dzqe6v-x.js → config-DDfTl9Cs.js} +1 -1
- package/dist/preview/assets/{config-BATy87wV.js → config-fvkC2rB8.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-CliXxe84.js → definition.vue_vue_type_script_setup_true_lang-RM-qDh0R.js} +1 -1
- package/dist/preview/assets/index-DNd8J9Zv.js +643 -0
- package/dist/preview/assets/index-DrIMqXAa.js +1 -0
- package/dist/preview/assets/index-a2QwAots.css +1 -0
- package/dist/preview/assets/{runtime-Dtc1ETUF.js → runtime-BGTWf-O7.js} +1 -1
- package/dist/preview/assets/{runtime-B_FMZ5eD.js → runtime-BPjZQmcY.js} +1 -1
- package/dist/preview/assets/{runtime-BTROwcw4.js → runtime-Bq3fmxeF.js} +1 -1
- package/dist/preview/assets/{runtime-Dsx8Y56q.js → runtime-CCbyrqQT.js} +1 -1
- package/dist/preview/assets/{runtime-T_tUqLxO.js → runtime-C_XX6a0C.js} +1 -1
- package/dist/preview/assets/{runtime-BR6-W3u_.js → runtime-CtqwtTE_.js} +1 -1
- package/dist/preview/assets/{runtime-D1xLbTQ9.js → runtime-DcrzodsN.js} +1 -1
- package/dist/preview/assets/{runtime-CTpsTb-X.js → runtime-Dr_10emf.js} +1 -1
- package/dist/preview/assets/{runtime-Cj0kLSqP.js → runtime-Dy4ZmQ-n.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue +57 -3
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/config.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.d.vue.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue +1 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/runtime.vue.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.d.ts +2 -0
- package/dist/runtime/components/config/blocks/2026-05-06/com.shwfed.block.tabs/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-23/com.shwfed.form.field.tree.multi/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.d.vue.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue +593 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/config.vue.d.ts +127 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue +465 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.d.ts +95 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.multi/schema.js +112 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.d.vue.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue +525 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/config.vue.d.ts +125 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue +460 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.d.ts +92 -0
- package/dist/runtime/components/form/fields/2026-05-26/com.shwfed.form.field.tree.combobox.single/schema.js +104 -0
- package/dist/runtime/components/form/fields/2026-05-26/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/form/fields/2026-05-26/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/columns/2026-05-25/com.shwfed.table.column.combobox-multi/runtime.vue +36 -13
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi/runtime.vue +36 -12
- package/dist/runtime/components/table/columns/2026-05-26/com.shwfed.table.column.combobox-multi.remote/runtime.vue +0 -1
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.d.vue.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue +607 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/config.vue.d.ts +131 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue +447 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.d.ts +90 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-multi/schema.js +143 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.d.vue.ts +129 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue +538 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/config.vue.d.ts +129 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.d.vue.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue +429 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/runtime.vue.d.ts +9 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.d.ts +87 -0
- package/dist/runtime/components/table/columns/2026-05-27/com.shwfed.table.column.tree-combobox-single/schema.js +135 -0
- package/dist/runtime/components/table/columns/2026-05-27/tree-combobox-shared.d.ts +35 -0
- package/dist/runtime/components/table/columns/2026-05-27/tree-combobox-shared.js +31 -0
- package/dist/runtime/components/table/config.vue +29 -0
- package/dist/runtime/components/ui/command/CommandItem.vue +12 -4
- package/dist/runtime/components/ui/tree/Tree.d.vue.ts +2 -0
- package/dist/runtime/components/ui/tree/Tree.vue +7 -2
- package/dist/runtime/components/ui/tree/Tree.vue.d.ts +2 -0
- package/dist/runtime/components/ui/tree/TreeNode.vue +16 -26
- package/package.json +1 -1
- package/dist/preview/assets/index-6rM4rqXR.js +0 -1
- package/dist/preview/assets/index-BCE-G4Ha.css +0 -1
- package/dist/preview/assets/index-wBVA0mNO.js +0 -643
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
4
|
+
import DerivedValueEditor from "../../../DerivedValueEditor.vue";
|
|
5
|
+
import { Field, FieldLabel } from "../../../../ui/field";
|
|
6
|
+
import { InputGroup, InputGroupInput } from "../../../../ui/input-group";
|
|
7
|
+
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
8
|
+
import { Markdown } from "../../../../ui/markdown";
|
|
9
|
+
import {
|
|
10
|
+
Select,
|
|
11
|
+
SelectContent,
|
|
12
|
+
SelectItem,
|
|
13
|
+
SelectTrigger,
|
|
14
|
+
SelectValue
|
|
15
|
+
} from "../../../../ui/select";
|
|
16
|
+
import { Switch } from "../../../../ui/switch";
|
|
17
|
+
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
18
|
+
import { DEFAULT_FIELD_ORIENTATION, FIELD_ORIENTATION_OPTIONS } from "../../../utils/common";
|
|
19
|
+
import { DataSource } from "../../../../table/schema";
|
|
20
|
+
import { schema } from "./schema";
|
|
21
|
+
defineOptions({ name: "ShwfedTreeComboboxSingleFieldConfig" });
|
|
22
|
+
const value = defineModel({ type: null, ...{ required: true } });
|
|
23
|
+
const fieldSchema = schema(() => {
|
|
24
|
+
});
|
|
25
|
+
const fieldTitle = (f) => getStructFieldTitle(fieldSchema, f) ?? f;
|
|
26
|
+
const fieldDescription = (f) => getStructFieldDescription(fieldSchema, f);
|
|
27
|
+
const dataSourceSchema = DataSource(() => {
|
|
28
|
+
});
|
|
29
|
+
const dataSourceFieldTitle = (f) => getStructFieldTitle(dataSourceSchema, f) ?? f;
|
|
30
|
+
const dataSourceFieldDescription = (f) => getStructFieldDescription(dataSourceSchema, f);
|
|
31
|
+
const nodeExtraVars = {
|
|
32
|
+
node: {
|
|
33
|
+
type: "dyn",
|
|
34
|
+
label: "\u5F53\u524D\u8282\u70B9",
|
|
35
|
+
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"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const nodeJsonExtraVars = {
|
|
39
|
+
json: {
|
|
40
|
+
type: "optional<dyn>",
|
|
41
|
+
label: "HTTP \u54CD\u5E94\u4F53",
|
|
42
|
+
description: "\u5DF2\u89E3\u6790\u7684 JSON \u54CD\u5E94\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`"
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const bindingText = computed({
|
|
46
|
+
get: () => value.value.binding ?? "",
|
|
47
|
+
set: (next) => {
|
|
48
|
+
const trimmed = next.trim();
|
|
49
|
+
if (trimmed.length === 0) {
|
|
50
|
+
const { binding: _omit, ...rest } = value.value;
|
|
51
|
+
value.value = rest;
|
|
52
|
+
} else {
|
|
53
|
+
value.value = { ...value.value, binding: trimmed };
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
function setDataSourceData(next) {
|
|
58
|
+
value.value = {
|
|
59
|
+
...value.value,
|
|
60
|
+
dataSource: { ...value.value.dataSource, data: next }
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function setDataSourceRequest(next) {
|
|
64
|
+
const trimmed = next.trim();
|
|
65
|
+
if (trimmed.length === 0) {
|
|
66
|
+
const { request: _omit, ...rest } = value.value.dataSource;
|
|
67
|
+
value.value = { ...value.value, dataSource: rest };
|
|
68
|
+
} else {
|
|
69
|
+
value.value = {
|
|
70
|
+
...value.value,
|
|
71
|
+
dataSource: { ...value.value.dataSource, request: next }
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function setOptionalExpression(key, next) {
|
|
76
|
+
if (next.length === 0) {
|
|
77
|
+
const { [key]: _omit, ...rest } = value.value;
|
|
78
|
+
value.value = rest;
|
|
79
|
+
} else {
|
|
80
|
+
value.value = { ...value.value, [key]: next };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<div class="flex flex-col gap-3">
|
|
87
|
+
<!-- Row 1: 内部名称 + 绑定路径 -->
|
|
88
|
+
<div class="grid grid-cols-2 gap-3">
|
|
89
|
+
<Field orientation="vertical">
|
|
90
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
91
|
+
<template
|
|
92
|
+
v-if="fieldDescription('displayName')"
|
|
93
|
+
#tooltip
|
|
94
|
+
>
|
|
95
|
+
<Markdown
|
|
96
|
+
:source="fieldDescription('displayName')"
|
|
97
|
+
block
|
|
98
|
+
class="prose prose-sm prose-zinc"
|
|
99
|
+
/>
|
|
100
|
+
</template>
|
|
101
|
+
{{ fieldTitle("displayName") }}
|
|
102
|
+
</FieldLabel>
|
|
103
|
+
<InputGroup>
|
|
104
|
+
<InputGroupInput
|
|
105
|
+
:model-value="value.displayName ?? ''"
|
|
106
|
+
placeholder="例:所属部门"
|
|
107
|
+
@update:model-value="(v) => {
|
|
108
|
+
const s = String(v ?? '');
|
|
109
|
+
value = { ...value, displayName: s.length > 0 ? s : void 0 };
|
|
110
|
+
}"
|
|
111
|
+
/>
|
|
112
|
+
</InputGroup>
|
|
113
|
+
</Field>
|
|
114
|
+
|
|
115
|
+
<Field orientation="vertical">
|
|
116
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
117
|
+
<template
|
|
118
|
+
v-if="fieldDescription('binding')"
|
|
119
|
+
#tooltip
|
|
120
|
+
>
|
|
121
|
+
<Markdown
|
|
122
|
+
:source="fieldDescription('binding')"
|
|
123
|
+
block
|
|
124
|
+
class="prose prose-sm prose-zinc"
|
|
125
|
+
/>
|
|
126
|
+
</template>
|
|
127
|
+
{{ fieldTitle("binding") }}
|
|
128
|
+
</FieldLabel>
|
|
129
|
+
<InputGroup>
|
|
130
|
+
<InputGroupInput
|
|
131
|
+
v-model="bindingText"
|
|
132
|
+
placeholder="例:user.departmentId"
|
|
133
|
+
class="font-mono"
|
|
134
|
+
/>
|
|
135
|
+
</InputGroup>
|
|
136
|
+
</Field>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<!-- Row 2: 标签 + 占位符 + 提示 -->
|
|
140
|
+
<div class="grid grid-cols-3 gap-3">
|
|
141
|
+
<Field orientation="vertical">
|
|
142
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
143
|
+
<template
|
|
144
|
+
v-if="fieldDescription('label')"
|
|
145
|
+
#tooltip
|
|
146
|
+
>
|
|
147
|
+
<Markdown
|
|
148
|
+
:source="fieldDescription('label')"
|
|
149
|
+
block
|
|
150
|
+
class="prose prose-sm prose-zinc"
|
|
151
|
+
/>
|
|
152
|
+
</template>
|
|
153
|
+
{{ fieldTitle("label") }}
|
|
154
|
+
</FieldLabel>
|
|
155
|
+
<LocaleField
|
|
156
|
+
translate-hint="form field label"
|
|
157
|
+
:model-value="value.label"
|
|
158
|
+
@update:model-value="(v) => value = { ...value, label: v }"
|
|
159
|
+
/>
|
|
160
|
+
</Field>
|
|
161
|
+
|
|
162
|
+
<Field orientation="vertical">
|
|
163
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
164
|
+
<template
|
|
165
|
+
v-if="fieldDescription('placeholder')"
|
|
166
|
+
#tooltip
|
|
167
|
+
>
|
|
168
|
+
<Markdown
|
|
169
|
+
:source="fieldDescription('placeholder')"
|
|
170
|
+
block
|
|
171
|
+
class="prose prose-sm prose-zinc"
|
|
172
|
+
/>
|
|
173
|
+
</template>
|
|
174
|
+
{{ fieldTitle("placeholder") }}
|
|
175
|
+
</FieldLabel>
|
|
176
|
+
<LocaleField
|
|
177
|
+
:model-value="value.placeholder"
|
|
178
|
+
@update:model-value="(v) => value = { ...value, placeholder: v }"
|
|
179
|
+
/>
|
|
180
|
+
</Field>
|
|
181
|
+
|
|
182
|
+
<Field orientation="vertical">
|
|
183
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
184
|
+
<template
|
|
185
|
+
v-if="fieldDescription('tooltip')"
|
|
186
|
+
#tooltip
|
|
187
|
+
>
|
|
188
|
+
<Markdown
|
|
189
|
+
:source="fieldDescription('tooltip')"
|
|
190
|
+
block
|
|
191
|
+
class="prose prose-sm prose-zinc"
|
|
192
|
+
/>
|
|
193
|
+
</template>
|
|
194
|
+
{{ fieldTitle("tooltip") }}
|
|
195
|
+
</FieldLabel>
|
|
196
|
+
<LocaleField
|
|
197
|
+
markdown
|
|
198
|
+
translate-hint="form field tooltip"
|
|
199
|
+
:model-value="value.tooltip"
|
|
200
|
+
@update:model-value="(v) => value = { ...value, tooltip: v }"
|
|
201
|
+
/>
|
|
202
|
+
</Field>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
<!-- Row 3: orientation -->
|
|
206
|
+
<div class="grid grid-cols-3 gap-3">
|
|
207
|
+
<Field orientation="vertical">
|
|
208
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
209
|
+
<template
|
|
210
|
+
v-if="fieldDescription('orientation')"
|
|
211
|
+
#tooltip
|
|
212
|
+
>
|
|
213
|
+
<Markdown
|
|
214
|
+
:source="fieldDescription('orientation')"
|
|
215
|
+
block
|
|
216
|
+
class="prose prose-sm prose-zinc"
|
|
217
|
+
/>
|
|
218
|
+
</template>
|
|
219
|
+
{{ fieldTitle("orientation") }}
|
|
220
|
+
</FieldLabel>
|
|
221
|
+
<Select
|
|
222
|
+
:model-value="value.orientation ?? DEFAULT_FIELD_ORIENTATION"
|
|
223
|
+
@update:model-value="(v) => value = { ...value, orientation: v }"
|
|
224
|
+
>
|
|
225
|
+
<SelectTrigger class="w-full">
|
|
226
|
+
<SelectValue />
|
|
227
|
+
</SelectTrigger>
|
|
228
|
+
<SelectContent>
|
|
229
|
+
<SelectItem
|
|
230
|
+
v-for="opt in FIELD_ORIENTATION_OPTIONS"
|
|
231
|
+
:key="opt.value"
|
|
232
|
+
:value="opt.value"
|
|
233
|
+
>
|
|
234
|
+
{{ opt.label }}
|
|
235
|
+
</SelectItem>
|
|
236
|
+
</SelectContent>
|
|
237
|
+
</Select>
|
|
238
|
+
</Field>
|
|
239
|
+
</div>
|
|
240
|
+
|
|
241
|
+
<!-- 数据源 -->
|
|
242
|
+
<h3 class="text-xs font-medium text-zinc-500">
|
|
243
|
+
{{ fieldTitle("dataSource") }}
|
|
244
|
+
</h3>
|
|
245
|
+
|
|
246
|
+
<Field orientation="vertical">
|
|
247
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
248
|
+
<template
|
|
249
|
+
v-if="dataSourceFieldDescription('request')"
|
|
250
|
+
#tooltip
|
|
251
|
+
>
|
|
252
|
+
<Markdown
|
|
253
|
+
:source="dataSourceFieldDescription('request')"
|
|
254
|
+
block
|
|
255
|
+
class="prose prose-sm prose-zinc"
|
|
256
|
+
/>
|
|
257
|
+
</template>
|
|
258
|
+
{{ dataSourceFieldTitle("request") }}
|
|
259
|
+
</FieldLabel>
|
|
260
|
+
<ExpressionEditor
|
|
261
|
+
:model-value="value.dataSource.request ?? ''"
|
|
262
|
+
placeholder="如 http.get('/api/departments/tree')"
|
|
263
|
+
result-type="HttpRequest"
|
|
264
|
+
multiline
|
|
265
|
+
class="min-h-20"
|
|
266
|
+
@update:model-value="setDataSourceRequest"
|
|
267
|
+
/>
|
|
268
|
+
</Field>
|
|
269
|
+
|
|
270
|
+
<Field orientation="vertical">
|
|
271
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
272
|
+
<template
|
|
273
|
+
v-if="dataSourceFieldDescription('data')"
|
|
274
|
+
#tooltip
|
|
275
|
+
>
|
|
276
|
+
<Markdown
|
|
277
|
+
:source="dataSourceFieldDescription('data')"
|
|
278
|
+
block
|
|
279
|
+
class="prose prose-sm prose-zinc"
|
|
280
|
+
/>
|
|
281
|
+
</template>
|
|
282
|
+
{{ dataSourceFieldTitle("data") }}
|
|
283
|
+
</FieldLabel>
|
|
284
|
+
<ExpressionEditor
|
|
285
|
+
:model-value="value.dataSource.data"
|
|
286
|
+
placeholder="如 json.?value.roots.orValue([])"
|
|
287
|
+
result-type="list"
|
|
288
|
+
:extra-vars="nodeJsonExtraVars"
|
|
289
|
+
@update:model-value="setDataSourceData"
|
|
290
|
+
/>
|
|
291
|
+
</Field>
|
|
292
|
+
|
|
293
|
+
<!-- 节点 -->
|
|
294
|
+
<h3 class="text-xs font-medium text-zinc-500">
|
|
295
|
+
节点
|
|
296
|
+
</h3>
|
|
297
|
+
|
|
298
|
+
<div class="grid grid-cols-2 gap-3">
|
|
299
|
+
<Field orientation="vertical">
|
|
300
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
301
|
+
<template
|
|
302
|
+
v-if="fieldDescription('nodeKey')"
|
|
303
|
+
#tooltip
|
|
304
|
+
>
|
|
305
|
+
<Markdown
|
|
306
|
+
:source="fieldDescription('nodeKey')"
|
|
307
|
+
block
|
|
308
|
+
class="prose prose-sm prose-zinc"
|
|
309
|
+
/>
|
|
310
|
+
</template>
|
|
311
|
+
{{ fieldTitle("nodeKey") }}
|
|
312
|
+
</FieldLabel>
|
|
313
|
+
<ExpressionEditor
|
|
314
|
+
:model-value="value.nodeKey"
|
|
315
|
+
placeholder="例:string(node.id)"
|
|
316
|
+
:result-type="['string', 'number', 'dyn']"
|
|
317
|
+
:extra-vars="nodeExtraVars"
|
|
318
|
+
class="min-h-10"
|
|
319
|
+
@update:model-value="(v) => value = { ...value, nodeKey: v }"
|
|
320
|
+
/>
|
|
321
|
+
</Field>
|
|
322
|
+
|
|
323
|
+
<Field orientation="vertical">
|
|
324
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
325
|
+
<template
|
|
326
|
+
v-if="fieldDescription('nodeChildren')"
|
|
327
|
+
#tooltip
|
|
328
|
+
>
|
|
329
|
+
<Markdown
|
|
330
|
+
:source="fieldDescription('nodeChildren')"
|
|
331
|
+
block
|
|
332
|
+
class="prose prose-sm prose-zinc"
|
|
333
|
+
/>
|
|
334
|
+
</template>
|
|
335
|
+
{{ fieldTitle("nodeChildren") }}
|
|
336
|
+
</FieldLabel>
|
|
337
|
+
<ExpressionEditor
|
|
338
|
+
:model-value="value.nodeChildren"
|
|
339
|
+
placeholder="例:has(node.children) ? node.children : null"
|
|
340
|
+
result-type="list"
|
|
341
|
+
:extra-vars="nodeExtraVars"
|
|
342
|
+
class="min-h-10"
|
|
343
|
+
@update:model-value="(v) => value = { ...value, nodeChildren: v }"
|
|
344
|
+
/>
|
|
345
|
+
</Field>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<div class="grid grid-cols-2 gap-3">
|
|
349
|
+
<Field orientation="vertical">
|
|
350
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
351
|
+
<template
|
|
352
|
+
v-if="fieldDescription('nodeLabel')"
|
|
353
|
+
#tooltip
|
|
354
|
+
>
|
|
355
|
+
<Markdown
|
|
356
|
+
:source="fieldDescription('nodeLabel')"
|
|
357
|
+
block
|
|
358
|
+
class="prose prose-sm prose-zinc"
|
|
359
|
+
/>
|
|
360
|
+
</template>
|
|
361
|
+
{{ fieldTitle("nodeLabel") }}
|
|
362
|
+
</FieldLabel>
|
|
363
|
+
<LocaleField
|
|
364
|
+
markdown
|
|
365
|
+
translate-hint="tree node label"
|
|
366
|
+
:model-value="value.nodeLabel"
|
|
367
|
+
@update:model-value="(v) => value = { ...value, nodeLabel: v }"
|
|
368
|
+
/>
|
|
369
|
+
</Field>
|
|
370
|
+
|
|
371
|
+
<Field orientation="vertical">
|
|
372
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
373
|
+
<template
|
|
374
|
+
v-if="fieldDescription('nodeTooltip')"
|
|
375
|
+
#tooltip
|
|
376
|
+
>
|
|
377
|
+
<Markdown
|
|
378
|
+
:source="fieldDescription('nodeTooltip')"
|
|
379
|
+
block
|
|
380
|
+
class="prose prose-sm prose-zinc"
|
|
381
|
+
/>
|
|
382
|
+
</template>
|
|
383
|
+
{{ fieldTitle("nodeTooltip") }}
|
|
384
|
+
</FieldLabel>
|
|
385
|
+
<LocaleField
|
|
386
|
+
markdown
|
|
387
|
+
translate-hint="tree node tooltip"
|
|
388
|
+
:model-value="value.nodeTooltip"
|
|
389
|
+
@update:model-value="(v) => value = { ...value, nodeTooltip: v }"
|
|
390
|
+
/>
|
|
391
|
+
</Field>
|
|
392
|
+
</div>
|
|
393
|
+
|
|
394
|
+
<!-- 行为: 节点可选条件 + 默认全部展开 -->
|
|
395
|
+
<div class="grid grid-cols-2 gap-3">
|
|
396
|
+
<Field orientation="vertical">
|
|
397
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
398
|
+
<template
|
|
399
|
+
v-if="fieldDescription('nodeSelectable')"
|
|
400
|
+
#tooltip
|
|
401
|
+
>
|
|
402
|
+
<Markdown
|
|
403
|
+
:source="fieldDescription('nodeSelectable')"
|
|
404
|
+
block
|
|
405
|
+
class="prose prose-sm prose-zinc"
|
|
406
|
+
/>
|
|
407
|
+
</template>
|
|
408
|
+
{{ fieldTitle("nodeSelectable") }}
|
|
409
|
+
</FieldLabel>
|
|
410
|
+
<ExpressionEditor
|
|
411
|
+
:model-value="value.nodeSelectable ?? ''"
|
|
412
|
+
placeholder="例:!has(node.disabled) || !node.disabled"
|
|
413
|
+
result-type="bool"
|
|
414
|
+
:extra-vars="nodeExtraVars"
|
|
415
|
+
class="min-h-10"
|
|
416
|
+
@update:model-value="(v) => setOptionalExpression('nodeSelectable', v)"
|
|
417
|
+
/>
|
|
418
|
+
</Field>
|
|
419
|
+
|
|
420
|
+
<Field orientation="vertical">
|
|
421
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
422
|
+
<template
|
|
423
|
+
v-if="fieldDescription('expandAll')"
|
|
424
|
+
#tooltip
|
|
425
|
+
>
|
|
426
|
+
<Markdown
|
|
427
|
+
:source="fieldDescription('expandAll')"
|
|
428
|
+
block
|
|
429
|
+
class="prose prose-sm prose-zinc"
|
|
430
|
+
/>
|
|
431
|
+
</template>
|
|
432
|
+
{{ fieldTitle("expandAll") }}
|
|
433
|
+
</FieldLabel>
|
|
434
|
+
<div>
|
|
435
|
+
<Switch
|
|
436
|
+
:model-value="value.expandAll ?? false"
|
|
437
|
+
@update:model-value="(v) => value = { ...value, expandAll: v }"
|
|
438
|
+
/>
|
|
439
|
+
</div>
|
|
440
|
+
</Field>
|
|
441
|
+
</div>
|
|
442
|
+
|
|
443
|
+
<!-- 通用: 隐藏 / 禁用 / 只读 + 派生值 -->
|
|
444
|
+
<div class="grid grid-cols-3 gap-3">
|
|
445
|
+
<Field orientation="vertical">
|
|
446
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
447
|
+
<template #tooltip>
|
|
448
|
+
<Markdown
|
|
449
|
+
:source="fieldDescription('hidden') ?? '\u8FD4\u56DE `true` \u65F6\u5B57\u6BB5\u5728\u6240\u6709\u5E03\u5C40\u4E2D\u90FD\u4E0D\u6E32\u67D3'"
|
|
450
|
+
block
|
|
451
|
+
class="prose prose-sm prose-zinc"
|
|
452
|
+
/>
|
|
453
|
+
</template>
|
|
454
|
+
{{ fieldTitle("hidden") }}
|
|
455
|
+
</FieldLabel>
|
|
456
|
+
<ExpressionEditor
|
|
457
|
+
:model-value="value.hidden ?? ''"
|
|
458
|
+
placeholder="例:form.role == 'guest'"
|
|
459
|
+
result-type="bool"
|
|
460
|
+
class="min-h-10"
|
|
461
|
+
@update:model-value="(v) => setOptionalExpression('hidden', v)"
|
|
462
|
+
/>
|
|
463
|
+
</Field>
|
|
464
|
+
|
|
465
|
+
<Field orientation="vertical">
|
|
466
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
467
|
+
<template #tooltip>
|
|
468
|
+
<Markdown
|
|
469
|
+
:source="fieldDescription('disabled') ?? '\u8FD4\u56DE `true` \u65F6\u4ECD\u6E32\u67D3\u4F46\u4E0D\u53EF\u9009\u62E9'"
|
|
470
|
+
block
|
|
471
|
+
class="prose prose-sm prose-zinc"
|
|
472
|
+
/>
|
|
473
|
+
</template>
|
|
474
|
+
{{ fieldTitle("disabled") }}
|
|
475
|
+
</FieldLabel>
|
|
476
|
+
<ExpressionEditor
|
|
477
|
+
:model-value="value.disabled ?? ''"
|
|
478
|
+
placeholder="例:form.status == 'locked'"
|
|
479
|
+
result-type="bool"
|
|
480
|
+
class="min-h-10"
|
|
481
|
+
@update:model-value="(v) => setOptionalExpression('disabled', v)"
|
|
482
|
+
/>
|
|
483
|
+
</Field>
|
|
484
|
+
|
|
485
|
+
<Field orientation="vertical">
|
|
486
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
487
|
+
<template #tooltip>
|
|
488
|
+
<Markdown
|
|
489
|
+
:source="fieldDescription('readonly') ?? '\u8FD4\u56DE `true` \u65F6\u4EC5\u4EE5\u7EAF\u6587\u672C\u5C55\u793A\u5F53\u524D\u5DF2\u9009\u9879\u7684\u6807\u7B7E'"
|
|
490
|
+
block
|
|
491
|
+
class="prose prose-sm prose-zinc"
|
|
492
|
+
/>
|
|
493
|
+
</template>
|
|
494
|
+
{{ fieldTitle("readonly") }}
|
|
495
|
+
</FieldLabel>
|
|
496
|
+
<ExpressionEditor
|
|
497
|
+
:model-value="value.readonly ?? ''"
|
|
498
|
+
placeholder="例:form.id != null"
|
|
499
|
+
result-type="bool"
|
|
500
|
+
class="min-h-10"
|
|
501
|
+
@update:model-value="(v) => setOptionalExpression('readonly', v)"
|
|
502
|
+
/>
|
|
503
|
+
</Field>
|
|
504
|
+
</div>
|
|
505
|
+
|
|
506
|
+
<Field orientation="vertical">
|
|
507
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
508
|
+
<template #tooltip>
|
|
509
|
+
<Markdown
|
|
510
|
+
:source="fieldDescription('derived')"
|
|
511
|
+
block
|
|
512
|
+
class="prose prose-sm prose-zinc"
|
|
513
|
+
/>
|
|
514
|
+
</template>
|
|
515
|
+
{{ fieldTitle("derived") }}
|
|
516
|
+
</FieldLabel>
|
|
517
|
+
<DerivedValueEditor
|
|
518
|
+
:model-value="value.derived"
|
|
519
|
+
:result-type="['string', 'number', 'dyn']"
|
|
520
|
+
placeholder="例:form.defaultDepartmentId"
|
|
521
|
+
@update:model-value="(v) => value = { ...value, derived: v }"
|
|
522
|
+
/>
|
|
523
|
+
</Field>
|
|
524
|
+
</div>
|
|
525
|
+
</template>
|
|
@@ -0,0 +1,125 @@
|
|
|
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 label?: readonly [{
|
|
8
|
+
readonly locale: "zh";
|
|
9
|
+
readonly message: string;
|
|
10
|
+
}, ...{
|
|
11
|
+
readonly locale: "en" | "ja" | "ko";
|
|
12
|
+
readonly message: string;
|
|
13
|
+
}[]] | undefined;
|
|
14
|
+
readonly disabled?: string | undefined;
|
|
15
|
+
readonly type: "com.shwfed.form.field.tree.combobox.single";
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly hidden?: string | undefined;
|
|
18
|
+
readonly tooltip?: readonly [{
|
|
19
|
+
readonly locale: "zh";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
}, ...{
|
|
22
|
+
readonly locale: "en" | "ja" | "ko";
|
|
23
|
+
readonly message: string;
|
|
24
|
+
}[]] | undefined;
|
|
25
|
+
readonly displayName?: string | undefined;
|
|
26
|
+
readonly compatibilityDate: "2026-05-26";
|
|
27
|
+
readonly orientation?: "vertical" | "floating" | 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 binding?: string | undefined;
|
|
37
|
+
readonly derived?: {
|
|
38
|
+
readonly mode: "formula" | "prefill";
|
|
39
|
+
readonly expression: string;
|
|
40
|
+
} | undefined;
|
|
41
|
+
readonly dataSource: {
|
|
42
|
+
readonly data: string;
|
|
43
|
+
readonly request?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
readonly nodeKey: string;
|
|
46
|
+
readonly nodeChildren: string;
|
|
47
|
+
readonly nodeLabel: readonly [{
|
|
48
|
+
readonly locale: "zh";
|
|
49
|
+
readonly message: string;
|
|
50
|
+
}, ...{
|
|
51
|
+
readonly locale: "en" | "ja" | "ko";
|
|
52
|
+
readonly message: string;
|
|
53
|
+
}[]];
|
|
54
|
+
readonly expandAll: boolean;
|
|
55
|
+
readonly nodeTooltip?: readonly [{
|
|
56
|
+
readonly locale: "zh";
|
|
57
|
+
readonly message: string;
|
|
58
|
+
}, ...{
|
|
59
|
+
readonly locale: "en" | "ja" | "ko";
|
|
60
|
+
readonly message: string;
|
|
61
|
+
}[]] | undefined;
|
|
62
|
+
readonly nodeSelectable?: string | undefined;
|
|
63
|
+
}) => any;
|
|
64
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
65
|
+
"onUpdate:modelValue"?: ((value: {
|
|
66
|
+
readonly label?: readonly [{
|
|
67
|
+
readonly locale: "zh";
|
|
68
|
+
readonly message: string;
|
|
69
|
+
}, ...{
|
|
70
|
+
readonly locale: "en" | "ja" | "ko";
|
|
71
|
+
readonly message: string;
|
|
72
|
+
}[]] | undefined;
|
|
73
|
+
readonly disabled?: string | undefined;
|
|
74
|
+
readonly type: "com.shwfed.form.field.tree.combobox.single";
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly hidden?: string | undefined;
|
|
77
|
+
readonly tooltip?: readonly [{
|
|
78
|
+
readonly locale: "zh";
|
|
79
|
+
readonly message: string;
|
|
80
|
+
}, ...{
|
|
81
|
+
readonly locale: "en" | "ja" | "ko";
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}[]] | undefined;
|
|
84
|
+
readonly displayName?: string | undefined;
|
|
85
|
+
readonly compatibilityDate: "2026-05-26";
|
|
86
|
+
readonly orientation?: "vertical" | "floating" | undefined;
|
|
87
|
+
readonly placeholder?: readonly [{
|
|
88
|
+
readonly locale: "zh";
|
|
89
|
+
readonly message: string;
|
|
90
|
+
}, ...{
|
|
91
|
+
readonly locale: "en" | "ja" | "ko";
|
|
92
|
+
readonly message: string;
|
|
93
|
+
}[]] | undefined;
|
|
94
|
+
readonly readonly?: string | undefined;
|
|
95
|
+
readonly binding?: string | undefined;
|
|
96
|
+
readonly derived?: {
|
|
97
|
+
readonly mode: "formula" | "prefill";
|
|
98
|
+
readonly expression: string;
|
|
99
|
+
} | undefined;
|
|
100
|
+
readonly dataSource: {
|
|
101
|
+
readonly data: string;
|
|
102
|
+
readonly request?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
readonly nodeKey: string;
|
|
105
|
+
readonly nodeChildren: string;
|
|
106
|
+
readonly nodeLabel: readonly [{
|
|
107
|
+
readonly locale: "zh";
|
|
108
|
+
readonly message: string;
|
|
109
|
+
}, ...{
|
|
110
|
+
readonly locale: "en" | "ja" | "ko";
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}[]];
|
|
113
|
+
readonly expandAll: boolean;
|
|
114
|
+
readonly nodeTooltip?: readonly [{
|
|
115
|
+
readonly locale: "zh";
|
|
116
|
+
readonly message: string;
|
|
117
|
+
}, ...{
|
|
118
|
+
readonly locale: "en" | "ja" | "ko";
|
|
119
|
+
readonly message: string;
|
|
120
|
+
}[]] | undefined;
|
|
121
|
+
readonly nodeSelectable?: string | undefined;
|
|
122
|
+
}) => any) | undefined;
|
|
123
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
124
|
+
declare const _default: typeof __VLS_export;
|
|
125
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Value } from './schema.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
fieldId: string;
|
|
4
|
+
config: Value;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|