@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,538 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } 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 { Separator } from "../../../../ui/separator";
|
|
16
|
+
import { Switch } from "../../../../ui/switch";
|
|
17
|
+
import DerivedValueEditor from "../../../../form/DerivedValueEditor.vue";
|
|
18
|
+
import { DataSource } from "../../../schema";
|
|
19
|
+
import { getStructFieldDescription, getStructFieldTitle } from "../../../utils/schema-meta";
|
|
20
|
+
import { schema } from "./schema";
|
|
21
|
+
defineOptions({ name: "ShwfedTableTreeComboboxSingleRendererConfig" });
|
|
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 ROW_VARS = {
|
|
32
|
+
row: { type: "dyn", label: "\u5F53\u524D\u884C\u6570\u636E" },
|
|
33
|
+
index: { type: "number", label: "\u884C\u7D22\u5F15" }
|
|
34
|
+
};
|
|
35
|
+
const ROW_NODE_VARS = {
|
|
36
|
+
...ROW_VARS,
|
|
37
|
+
node: {
|
|
38
|
+
type: "dyn",
|
|
39
|
+
label: "\u5F53\u524D\u8282\u70B9",
|
|
40
|
+
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"
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const ROW_JSON_VARS = {
|
|
44
|
+
...ROW_VARS,
|
|
45
|
+
json: {
|
|
46
|
+
type: "optional<dyn>",
|
|
47
|
+
label: "HTTP \u54CD\u5E94\u4F53",
|
|
48
|
+
description: "\u5DF2\u89E3\u6790\u7684 JSON \u54CD\u5E94\uFF1B\u672A\u914D\u7F6E `request` \u65F6\u4E3A `none`"
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const bindingText = computed({
|
|
52
|
+
get: () => value.value.binding ?? "",
|
|
53
|
+
set: (v) => {
|
|
54
|
+
const trimmed = v.trim();
|
|
55
|
+
if (trimmed === "") {
|
|
56
|
+
const { binding: _omit, ...rest } = value.value;
|
|
57
|
+
value.value = rest;
|
|
58
|
+
} else {
|
|
59
|
+
value.value = { ...value.value, binding: trimmed };
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function setOptionalExpression(key, next) {
|
|
64
|
+
if (next.length === 0) {
|
|
65
|
+
const { [key]: _omit, ...rest } = value.value;
|
|
66
|
+
value.value = rest;
|
|
67
|
+
} else {
|
|
68
|
+
value.value = { ...value.value, [key]: next };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function setDataSourceData(next) {
|
|
72
|
+
value.value = {
|
|
73
|
+
...value.value,
|
|
74
|
+
dataSource: { ...value.value.dataSource, data: next }
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function setDataSourceRequest(next) {
|
|
78
|
+
const trimmed = next.trim();
|
|
79
|
+
if (trimmed.length === 0) {
|
|
80
|
+
const { request: _omit, ...rest } = value.value.dataSource;
|
|
81
|
+
value.value = { ...value.value, dataSource: rest };
|
|
82
|
+
} else {
|
|
83
|
+
value.value = {
|
|
84
|
+
...value.value,
|
|
85
|
+
dataSource: { ...value.value.dataSource, request: next }
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
const derivedModel = computed({
|
|
90
|
+
get: () => value.value.derived,
|
|
91
|
+
set: (v) => {
|
|
92
|
+
if (v == null) {
|
|
93
|
+
const { derived: _omit, ...rest } = value.value;
|
|
94
|
+
value.value = rest;
|
|
95
|
+
} else {
|
|
96
|
+
value.value = { ...value.value, derived: v };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<template>
|
|
103
|
+
<div class="space-y-5">
|
|
104
|
+
<!-- Identity: title + binding + placeholder + size -->
|
|
105
|
+
<div class="grid grid-cols-2 gap-x-6 gap-y-4">
|
|
106
|
+
<Field orientation="vertical">
|
|
107
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
108
|
+
<template
|
|
109
|
+
v-if="fieldDescription('title')"
|
|
110
|
+
#tooltip
|
|
111
|
+
>
|
|
112
|
+
<Markdown
|
|
113
|
+
:source="fieldDescription('title')"
|
|
114
|
+
block
|
|
115
|
+
class="prose prose-sm prose-zinc"
|
|
116
|
+
/>
|
|
117
|
+
</template>
|
|
118
|
+
{{ fieldTitle("title") }}
|
|
119
|
+
</FieldLabel>
|
|
120
|
+
<LocaleField v-model="value.title" />
|
|
121
|
+
</Field>
|
|
122
|
+
<Field orientation="vertical">
|
|
123
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
124
|
+
<template
|
|
125
|
+
v-if="fieldDescription('tooltip')"
|
|
126
|
+
#tooltip
|
|
127
|
+
>
|
|
128
|
+
<Markdown
|
|
129
|
+
:source="fieldDescription('tooltip')"
|
|
130
|
+
block
|
|
131
|
+
class="prose prose-sm prose-zinc"
|
|
132
|
+
/>
|
|
133
|
+
</template>
|
|
134
|
+
{{ fieldTitle("tooltip") }}
|
|
135
|
+
</FieldLabel>
|
|
136
|
+
<LocaleField
|
|
137
|
+
v-model="value.tooltip"
|
|
138
|
+
markdown
|
|
139
|
+
/>
|
|
140
|
+
</Field>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="grid grid-cols-2 gap-x-6 gap-y-4">
|
|
143
|
+
<Field orientation="vertical">
|
|
144
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
145
|
+
<template
|
|
146
|
+
v-if="fieldDescription('binding')"
|
|
147
|
+
#tooltip
|
|
148
|
+
>
|
|
149
|
+
<Markdown
|
|
150
|
+
:source="fieldDescription('binding')"
|
|
151
|
+
block
|
|
152
|
+
class="prose prose-sm prose-zinc"
|
|
153
|
+
/>
|
|
154
|
+
</template>
|
|
155
|
+
{{ fieldTitle("binding") }}
|
|
156
|
+
</FieldLabel>
|
|
157
|
+
<InputGroup>
|
|
158
|
+
<InputGroupInput
|
|
159
|
+
v-model="bindingText"
|
|
160
|
+
placeholder="例:user.departmentId"
|
|
161
|
+
class="font-mono"
|
|
162
|
+
/>
|
|
163
|
+
</InputGroup>
|
|
164
|
+
</Field>
|
|
165
|
+
<Field orientation="vertical">
|
|
166
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
167
|
+
<template
|
|
168
|
+
v-if="fieldDescription('placeholder')"
|
|
169
|
+
#tooltip
|
|
170
|
+
>
|
|
171
|
+
<Markdown
|
|
172
|
+
:source="fieldDescription('placeholder')"
|
|
173
|
+
block
|
|
174
|
+
class="prose prose-sm prose-zinc"
|
|
175
|
+
/>
|
|
176
|
+
</template>
|
|
177
|
+
{{ fieldTitle("placeholder") }}
|
|
178
|
+
</FieldLabel>
|
|
179
|
+
<LocaleField v-model="value.placeholder" />
|
|
180
|
+
</Field>
|
|
181
|
+
<Field orientation="vertical">
|
|
182
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
183
|
+
<template
|
|
184
|
+
v-if="fieldDescription('size')"
|
|
185
|
+
#tooltip
|
|
186
|
+
>
|
|
187
|
+
<Markdown
|
|
188
|
+
:source="fieldDescription('size')"
|
|
189
|
+
block
|
|
190
|
+
class="prose prose-sm prose-zinc"
|
|
191
|
+
/>
|
|
192
|
+
</template>
|
|
193
|
+
{{ fieldTitle("size") }}
|
|
194
|
+
</FieldLabel>
|
|
195
|
+
<InputGroup>
|
|
196
|
+
<InputGroupNumberField
|
|
197
|
+
:model-value="value.size"
|
|
198
|
+
:disabled="value.grow"
|
|
199
|
+
:min="0"
|
|
200
|
+
@update:model-value="(v) => value = { ...value, size: v }"
|
|
201
|
+
/>
|
|
202
|
+
<InputGroupAddon align="inline-end">
|
|
203
|
+
<InputGroupButton
|
|
204
|
+
:variant="value.grow ? 'primary' : 'ghost'"
|
|
205
|
+
size="xs"
|
|
206
|
+
@click="value = { ...value, grow: !value.grow }"
|
|
207
|
+
>
|
|
208
|
+
<Icon :icon="value.grow ? 'fluent:lock-closed-20-regular' : 'fluent:arrow-autofit-width-20-regular'" />
|
|
209
|
+
{{ fieldTitle("grow") }}
|
|
210
|
+
</InputGroupButton>
|
|
211
|
+
</InputGroupAddon>
|
|
212
|
+
</InputGroup>
|
|
213
|
+
</Field>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<!-- 数据源 -->
|
|
217
|
+
<h3 class="text-xs font-medium text-zinc-500">
|
|
218
|
+
{{ fieldTitle("dataSource") }}
|
|
219
|
+
</h3>
|
|
220
|
+
|
|
221
|
+
<Field orientation="vertical">
|
|
222
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
223
|
+
<template
|
|
224
|
+
v-if="dataSourceFieldDescription('request')"
|
|
225
|
+
#tooltip
|
|
226
|
+
>
|
|
227
|
+
<Markdown
|
|
228
|
+
:source="dataSourceFieldDescription('request')"
|
|
229
|
+
block
|
|
230
|
+
class="prose prose-sm prose-zinc"
|
|
231
|
+
/>
|
|
232
|
+
</template>
|
|
233
|
+
{{ dataSourceFieldTitle("request") }}
|
|
234
|
+
</FieldLabel>
|
|
235
|
+
<ExpressionEditor
|
|
236
|
+
:model-value="value.dataSource.request ?? ''"
|
|
237
|
+
placeholder="如 http.get('/api/departments/tree')"
|
|
238
|
+
result-type="HttpRequest"
|
|
239
|
+
:extra-vars="ROW_VARS"
|
|
240
|
+
multiline
|
|
241
|
+
class="min-h-20"
|
|
242
|
+
@update:model-value="setDataSourceRequest"
|
|
243
|
+
/>
|
|
244
|
+
</Field>
|
|
245
|
+
|
|
246
|
+
<Field orientation="vertical">
|
|
247
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
248
|
+
<template
|
|
249
|
+
v-if="dataSourceFieldDescription('data')"
|
|
250
|
+
#tooltip
|
|
251
|
+
>
|
|
252
|
+
<Markdown
|
|
253
|
+
:source="dataSourceFieldDescription('data')"
|
|
254
|
+
block
|
|
255
|
+
class="prose prose-sm prose-zinc"
|
|
256
|
+
/>
|
|
257
|
+
</template>
|
|
258
|
+
{{ dataSourceFieldTitle("data") }}
|
|
259
|
+
</FieldLabel>
|
|
260
|
+
<ExpressionEditor
|
|
261
|
+
:model-value="value.dataSource.data"
|
|
262
|
+
placeholder="如 json.?value.roots.orValue([])"
|
|
263
|
+
result-type="list"
|
|
264
|
+
:extra-vars="ROW_JSON_VARS"
|
|
265
|
+
@update:model-value="setDataSourceData"
|
|
266
|
+
/>
|
|
267
|
+
</Field>
|
|
268
|
+
|
|
269
|
+
<!-- 节点 -->
|
|
270
|
+
<h3 class="text-xs font-medium text-zinc-500">
|
|
271
|
+
节点
|
|
272
|
+
</h3>
|
|
273
|
+
|
|
274
|
+
<div class="grid grid-cols-2 gap-3">
|
|
275
|
+
<Field orientation="vertical">
|
|
276
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
277
|
+
<template
|
|
278
|
+
v-if="fieldDescription('nodeKey')"
|
|
279
|
+
#tooltip
|
|
280
|
+
>
|
|
281
|
+
<Markdown
|
|
282
|
+
:source="fieldDescription('nodeKey')"
|
|
283
|
+
block
|
|
284
|
+
class="prose prose-sm prose-zinc"
|
|
285
|
+
/>
|
|
286
|
+
</template>
|
|
287
|
+
{{ fieldTitle("nodeKey") }}
|
|
288
|
+
</FieldLabel>
|
|
289
|
+
<ExpressionEditor
|
|
290
|
+
:model-value="value.nodeKey"
|
|
291
|
+
placeholder="例:string(node.id)"
|
|
292
|
+
:result-type="['string', 'number', 'dyn']"
|
|
293
|
+
:extra-vars="ROW_NODE_VARS"
|
|
294
|
+
class="min-h-10"
|
|
295
|
+
@update:model-value="(v) => value = { ...value, nodeKey: v }"
|
|
296
|
+
/>
|
|
297
|
+
</Field>
|
|
298
|
+
|
|
299
|
+
<Field orientation="vertical">
|
|
300
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
301
|
+
<template
|
|
302
|
+
v-if="fieldDescription('nodeChildren')"
|
|
303
|
+
#tooltip
|
|
304
|
+
>
|
|
305
|
+
<Markdown
|
|
306
|
+
:source="fieldDescription('nodeChildren')"
|
|
307
|
+
block
|
|
308
|
+
class="prose prose-sm prose-zinc"
|
|
309
|
+
/>
|
|
310
|
+
</template>
|
|
311
|
+
{{ fieldTitle("nodeChildren") }}
|
|
312
|
+
</FieldLabel>
|
|
313
|
+
<ExpressionEditor
|
|
314
|
+
:model-value="value.nodeChildren"
|
|
315
|
+
placeholder="例:has(node.children) ? node.children : null"
|
|
316
|
+
result-type="list"
|
|
317
|
+
:extra-vars="ROW_NODE_VARS"
|
|
318
|
+
class="min-h-10"
|
|
319
|
+
@update:model-value="(v) => value = { ...value, nodeChildren: v }"
|
|
320
|
+
/>
|
|
321
|
+
</Field>
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
<div class="grid grid-cols-2 gap-3">
|
|
325
|
+
<Field orientation="vertical">
|
|
326
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
327
|
+
<template
|
|
328
|
+
v-if="fieldDescription('nodeLabel')"
|
|
329
|
+
#tooltip
|
|
330
|
+
>
|
|
331
|
+
<Markdown
|
|
332
|
+
:source="fieldDescription('nodeLabel')"
|
|
333
|
+
block
|
|
334
|
+
class="prose prose-sm prose-zinc"
|
|
335
|
+
/>
|
|
336
|
+
</template>
|
|
337
|
+
{{ fieldTitle("nodeLabel") }}
|
|
338
|
+
</FieldLabel>
|
|
339
|
+
<LocaleField
|
|
340
|
+
markdown
|
|
341
|
+
translate-hint="tree node label"
|
|
342
|
+
:model-value="value.nodeLabel"
|
|
343
|
+
@update:model-value="(v) => value = { ...value, nodeLabel: v }"
|
|
344
|
+
/>
|
|
345
|
+
</Field>
|
|
346
|
+
|
|
347
|
+
<Field orientation="vertical">
|
|
348
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
349
|
+
<template
|
|
350
|
+
v-if="fieldDescription('nodeTooltip')"
|
|
351
|
+
#tooltip
|
|
352
|
+
>
|
|
353
|
+
<Markdown
|
|
354
|
+
:source="fieldDescription('nodeTooltip')"
|
|
355
|
+
block
|
|
356
|
+
class="prose prose-sm prose-zinc"
|
|
357
|
+
/>
|
|
358
|
+
</template>
|
|
359
|
+
{{ fieldTitle("nodeTooltip") }}
|
|
360
|
+
</FieldLabel>
|
|
361
|
+
<LocaleField
|
|
362
|
+
markdown
|
|
363
|
+
translate-hint="tree node tooltip"
|
|
364
|
+
:model-value="value.nodeTooltip"
|
|
365
|
+
@update:model-value="(v) => value = { ...value, nodeTooltip: v }"
|
|
366
|
+
/>
|
|
367
|
+
</Field>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<!-- 行为: 节点可选条件 + 默认全部展开 -->
|
|
371
|
+
<div class="grid grid-cols-2 gap-3">
|
|
372
|
+
<Field orientation="vertical">
|
|
373
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
374
|
+
<template
|
|
375
|
+
v-if="fieldDescription('nodeSelectable')"
|
|
376
|
+
#tooltip
|
|
377
|
+
>
|
|
378
|
+
<Markdown
|
|
379
|
+
:source="fieldDescription('nodeSelectable')"
|
|
380
|
+
block
|
|
381
|
+
class="prose prose-sm prose-zinc"
|
|
382
|
+
/>
|
|
383
|
+
</template>
|
|
384
|
+
{{ fieldTitle("nodeSelectable") }}
|
|
385
|
+
</FieldLabel>
|
|
386
|
+
<ExpressionEditor
|
|
387
|
+
:model-value="value.nodeSelectable ?? ''"
|
|
388
|
+
placeholder="例:!has(node.disabled) || !node.disabled"
|
|
389
|
+
result-type="bool"
|
|
390
|
+
:extra-vars="ROW_NODE_VARS"
|
|
391
|
+
class="min-h-10"
|
|
392
|
+
@update:model-value="(v) => setOptionalExpression('nodeSelectable', v)"
|
|
393
|
+
/>
|
|
394
|
+
</Field>
|
|
395
|
+
|
|
396
|
+
<Field orientation="vertical">
|
|
397
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
398
|
+
<template
|
|
399
|
+
v-if="fieldDescription('expandAll')"
|
|
400
|
+
#tooltip
|
|
401
|
+
>
|
|
402
|
+
<Markdown
|
|
403
|
+
:source="fieldDescription('expandAll')"
|
|
404
|
+
block
|
|
405
|
+
class="prose prose-sm prose-zinc"
|
|
406
|
+
/>
|
|
407
|
+
</template>
|
|
408
|
+
{{ fieldTitle("expandAll") }}
|
|
409
|
+
</FieldLabel>
|
|
410
|
+
<div>
|
|
411
|
+
<Switch
|
|
412
|
+
:model-value="value.expandAll ?? false"
|
|
413
|
+
@update:model-value="(v) => value = { ...value, expandAll: v }"
|
|
414
|
+
/>
|
|
415
|
+
</div>
|
|
416
|
+
</Field>
|
|
417
|
+
</div>
|
|
418
|
+
|
|
419
|
+
<!-- 通用: 隐藏 / 禁用 / 只读 + 派生值 -->
|
|
420
|
+
<div class="grid grid-cols-2 gap-x-6 gap-y-4">
|
|
421
|
+
<Field orientation="vertical">
|
|
422
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
423
|
+
<template
|
|
424
|
+
v-if="fieldDescription('hidden')"
|
|
425
|
+
#tooltip
|
|
426
|
+
>
|
|
427
|
+
<Markdown
|
|
428
|
+
:source="fieldDescription('hidden')"
|
|
429
|
+
block
|
|
430
|
+
class="prose prose-sm prose-zinc"
|
|
431
|
+
/>
|
|
432
|
+
</template>
|
|
433
|
+
{{ fieldTitle("hidden") }}
|
|
434
|
+
</FieldLabel>
|
|
435
|
+
<ExpressionEditor
|
|
436
|
+
:model-value="value.hidden ?? ''"
|
|
437
|
+
placeholder="例:row.archived"
|
|
438
|
+
result-type="bool"
|
|
439
|
+
:extra-vars="ROW_VARS"
|
|
440
|
+
@update:model-value="(v) => setOptionalExpression('hidden', v)"
|
|
441
|
+
/>
|
|
442
|
+
</Field>
|
|
443
|
+
<Field orientation="vertical">
|
|
444
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
445
|
+
<template
|
|
446
|
+
v-if="fieldDescription('disabled')"
|
|
447
|
+
#tooltip
|
|
448
|
+
>
|
|
449
|
+
<Markdown
|
|
450
|
+
:source="fieldDescription('disabled')"
|
|
451
|
+
block
|
|
452
|
+
class="prose prose-sm prose-zinc"
|
|
453
|
+
/>
|
|
454
|
+
</template>
|
|
455
|
+
{{ fieldTitle("disabled") }}
|
|
456
|
+
</FieldLabel>
|
|
457
|
+
<ExpressionEditor
|
|
458
|
+
:model-value="value.disabled ?? ''"
|
|
459
|
+
placeholder="例:row.locked"
|
|
460
|
+
result-type="bool"
|
|
461
|
+
:extra-vars="ROW_VARS"
|
|
462
|
+
@update:model-value="(v) => setOptionalExpression('disabled', v)"
|
|
463
|
+
/>
|
|
464
|
+
</Field>
|
|
465
|
+
<Field orientation="vertical">
|
|
466
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
467
|
+
<template
|
|
468
|
+
v-if="fieldDescription('readonly')"
|
|
469
|
+
#tooltip
|
|
470
|
+
>
|
|
471
|
+
<Markdown
|
|
472
|
+
:source="fieldDescription('readonly')"
|
|
473
|
+
block
|
|
474
|
+
class="prose prose-sm prose-zinc"
|
|
475
|
+
/>
|
|
476
|
+
</template>
|
|
477
|
+
{{ fieldTitle("readonly") }}
|
|
478
|
+
</FieldLabel>
|
|
479
|
+
<ExpressionEditor
|
|
480
|
+
:model-value="value.readonly ?? ''"
|
|
481
|
+
placeholder="例:row.id != null"
|
|
482
|
+
result-type="bool"
|
|
483
|
+
:extra-vars="ROW_VARS"
|
|
484
|
+
@update:model-value="(v) => setOptionalExpression('readonly', v)"
|
|
485
|
+
/>
|
|
486
|
+
</Field>
|
|
487
|
+
<Field
|
|
488
|
+
orientation="vertical"
|
|
489
|
+
class="col-span-2"
|
|
490
|
+
>
|
|
491
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
492
|
+
<template
|
|
493
|
+
v-if="fieldDescription('derived')"
|
|
494
|
+
#tooltip
|
|
495
|
+
>
|
|
496
|
+
<Markdown
|
|
497
|
+
:source="fieldDescription('derived')"
|
|
498
|
+
block
|
|
499
|
+
class="prose prose-sm prose-zinc"
|
|
500
|
+
/>
|
|
501
|
+
</template>
|
|
502
|
+
{{ fieldTitle("derived") }}
|
|
503
|
+
</FieldLabel>
|
|
504
|
+
<DerivedValueEditor
|
|
505
|
+
v-model="derivedModel"
|
|
506
|
+
result-type="dyn"
|
|
507
|
+
placeholder="例:form.defaults[row.kind]"
|
|
508
|
+
/>
|
|
509
|
+
</Field>
|
|
510
|
+
</div>
|
|
511
|
+
|
|
512
|
+
<Separator />
|
|
513
|
+
<div class="flex flex-wrap gap-x-8 gap-y-3">
|
|
514
|
+
<Field
|
|
515
|
+
orientation="horizontal"
|
|
516
|
+
class="w-auto gap-2"
|
|
517
|
+
>
|
|
518
|
+
<Switch
|
|
519
|
+
:model-value="value.enableSorting ?? false"
|
|
520
|
+
@update:model-value="(v) => value = { ...value, enableSorting: v }"
|
|
521
|
+
/>
|
|
522
|
+
<FieldLabel class="text-sm text-zinc-600">
|
|
523
|
+
<template
|
|
524
|
+
v-if="fieldDescription('enableSorting')"
|
|
525
|
+
#tooltip
|
|
526
|
+
>
|
|
527
|
+
<Markdown
|
|
528
|
+
:source="fieldDescription('enableSorting')"
|
|
529
|
+
block
|
|
530
|
+
class="prose prose-sm prose-zinc"
|
|
531
|
+
/>
|
|
532
|
+
</template>
|
|
533
|
+
{{ fieldTitle("enableSorting") }}
|
|
534
|
+
</FieldLabel>
|
|
535
|
+
</Field>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
</template>
|
|
@@ -0,0 +1,129 @@
|
|
|
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.tree-combobox-single";
|
|
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-27";
|
|
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 grow?: boolean | undefined;
|
|
37
|
+
readonly binding: string;
|
|
38
|
+
readonly derived?: {
|
|
39
|
+
readonly mode: "formula" | "prefill";
|
|
40
|
+
readonly expression: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
readonly dataSource: {
|
|
43
|
+
readonly data: string;
|
|
44
|
+
readonly request?: string | undefined;
|
|
45
|
+
};
|
|
46
|
+
readonly nodeKey: string;
|
|
47
|
+
readonly nodeChildren: string;
|
|
48
|
+
readonly nodeLabel: readonly [{
|
|
49
|
+
readonly locale: "zh";
|
|
50
|
+
readonly message: string;
|
|
51
|
+
}, ...{
|
|
52
|
+
readonly locale: "en" | "ja" | "ko";
|
|
53
|
+
readonly message: string;
|
|
54
|
+
}[]];
|
|
55
|
+
readonly expandAll: boolean;
|
|
56
|
+
readonly enableSorting?: boolean | undefined;
|
|
57
|
+
readonly nodeTooltip?: readonly [{
|
|
58
|
+
readonly locale: "zh";
|
|
59
|
+
readonly message: string;
|
|
60
|
+
}, ...{
|
|
61
|
+
readonly locale: "en" | "ja" | "ko";
|
|
62
|
+
readonly message: string;
|
|
63
|
+
}[]] | undefined;
|
|
64
|
+
readonly nodeSelectable?: string | undefined;
|
|
65
|
+
}) => any;
|
|
66
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
|
|
67
|
+
"onUpdate:modelValue"?: ((value: {
|
|
68
|
+
readonly size?: number | undefined;
|
|
69
|
+
readonly disabled?: string | undefined;
|
|
70
|
+
readonly type: "com.shwfed.table.column.tree-combobox-single";
|
|
71
|
+
readonly id: string;
|
|
72
|
+
readonly title: readonly [{
|
|
73
|
+
readonly locale: "zh";
|
|
74
|
+
readonly message: string;
|
|
75
|
+
}, ...{
|
|
76
|
+
readonly locale: "en" | "ja" | "ko";
|
|
77
|
+
readonly message: string;
|
|
78
|
+
}[]];
|
|
79
|
+
readonly hidden?: string | undefined;
|
|
80
|
+
readonly tooltip?: readonly [{
|
|
81
|
+
readonly locale: "zh";
|
|
82
|
+
readonly message: string;
|
|
83
|
+
}, ...{
|
|
84
|
+
readonly locale: "en" | "ja" | "ko";
|
|
85
|
+
readonly message: string;
|
|
86
|
+
}[]] | undefined;
|
|
87
|
+
readonly compatibilityDate: "2026-05-27";
|
|
88
|
+
readonly groupId?: string | undefined;
|
|
89
|
+
readonly placeholder?: readonly [{
|
|
90
|
+
readonly locale: "zh";
|
|
91
|
+
readonly message: string;
|
|
92
|
+
}, ...{
|
|
93
|
+
readonly locale: "en" | "ja" | "ko";
|
|
94
|
+
readonly message: string;
|
|
95
|
+
}[]] | undefined;
|
|
96
|
+
readonly readonly?: string | undefined;
|
|
97
|
+
readonly grow?: boolean | undefined;
|
|
98
|
+
readonly binding: string;
|
|
99
|
+
readonly derived?: {
|
|
100
|
+
readonly mode: "formula" | "prefill";
|
|
101
|
+
readonly expression: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
readonly dataSource: {
|
|
104
|
+
readonly data: string;
|
|
105
|
+
readonly request?: string | undefined;
|
|
106
|
+
};
|
|
107
|
+
readonly nodeKey: string;
|
|
108
|
+
readonly nodeChildren: string;
|
|
109
|
+
readonly nodeLabel: readonly [{
|
|
110
|
+
readonly locale: "zh";
|
|
111
|
+
readonly message: string;
|
|
112
|
+
}, ...{
|
|
113
|
+
readonly locale: "en" | "ja" | "ko";
|
|
114
|
+
readonly message: string;
|
|
115
|
+
}[]];
|
|
116
|
+
readonly expandAll: boolean;
|
|
117
|
+
readonly enableSorting?: boolean | undefined;
|
|
118
|
+
readonly nodeTooltip?: readonly [{
|
|
119
|
+
readonly locale: "zh";
|
|
120
|
+
readonly message: string;
|
|
121
|
+
}, ...{
|
|
122
|
+
readonly locale: "en" | "ja" | "ko";
|
|
123
|
+
readonly message: string;
|
|
124
|
+
}[]] | undefined;
|
|
125
|
+
readonly nodeSelectable?: string | undefined;
|
|
126
|
+
}) => any) | undefined;
|
|
127
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
128
|
+
declare const _default: typeof __VLS_export;
|
|
129
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CellContext } from '@tanstack/vue-table';
|
|
2
|
+
import type { Value } from './schema.js';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
column: Value;
|
|
5
|
+
ctx: CellContext<unknown, unknown>;
|
|
6
|
+
};
|
|
7
|
+
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>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|