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