@shwfed/config 2.10.7 → 2.10.9
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 +1171 -1049
- package/dist/module.json +1 -1
- package/dist/preview/assets/{FieldGroup.vue_vue_type_script_setup_true_lang-CV3u1wuG.js → FieldGroup.vue_vue_type_script_setup_true_lang-CysVgnB5.js} +1 -1
- package/dist/preview/assets/{badge-De7TI8Ef.js → badge-DdxT1J-1.js} +1 -1
- package/dist/preview/assets/{config-A0pwpJhu.js → config-073z__NM.js} +1 -1
- package/dist/preview/assets/{config-Cc-RiKc0.js → config-91HQEKhM.js} +1 -1
- package/dist/preview/assets/{config-DccYHX13.js → config-B8k8y1J1.js} +1 -1
- package/dist/preview/assets/{config-Ckn8NixF.js → config-BK8WZ3pm.js} +1 -1
- package/dist/preview/assets/{config-RuqJAgHJ.js → config-BX05eMo3.js} +1 -1
- package/dist/preview/assets/{config-BF4I0Pko.js → config-BXP8aJwW.js} +1 -1
- package/dist/preview/assets/{config-DqHlKqr-.js → config-BhPAyftm.js} +1 -1
- package/dist/preview/assets/{config-DBrYVSus.js → config-BzHBSkht.js} +1 -1
- package/dist/preview/assets/{config-BJL5R6TO.js → config-C3eoRHUo.js} +1 -1
- package/dist/preview/assets/{config-DGj2Xh1R.js → config-CJ-NzxkH.js} +1 -1
- package/dist/preview/assets/{config-C6AzmvwL.js → config-CYRj2ZVL.js} +1 -1
- package/dist/preview/assets/{config-CtW_DgDv.js → config-DLNjjMZY.js} +1 -1
- package/dist/preview/assets/{config-Bei-4M8U.js → config-DudxzmzF.js} +1 -1
- package/dist/preview/assets/{config-CnPPWHxs.js → config-cwlK3BMD.js} +1 -1
- package/dist/preview/assets/{definition.vue_vue_type_script_setup_true_lang-Ceh2rttd.js → definition.vue_vue_type_script_setup_true_lang-l59C6Dgs.js} +1 -1
- package/dist/preview/assets/index-BL58N7_5.js +763 -0
- package/dist/preview/assets/index-CA4hsfRv.js +1 -0
- package/dist/preview/assets/index-CyVzfRGQ.css +1 -0
- package/dist/preview/assets/{index-DAjdcrqQ.js → index-uAwC9Itb.js} +1 -1
- package/dist/preview/assets/{item-BNOUeB-e.js → item-C79mwh5T.js} +1 -1
- package/dist/preview/assets/{runtime-DzDI7B5M.js → runtime-1_EaFcPI.js} +1 -1
- package/dist/preview/assets/{runtime-BtDC6qh0.js → runtime-2yzxOLnF.js} +1 -1
- package/dist/preview/assets/{runtime-CXSBPV7c.js → runtime-8Fe67mkZ.js} +1 -1
- package/dist/preview/assets/{runtime-B-m0fZl0.js → runtime-8oME8Env.js} +1 -1
- package/dist/preview/assets/{runtime-DDz8U0kg.js → runtime-CCMixJjP.js} +1 -1
- package/dist/preview/assets/{runtime-CdrOV1KF.js → runtime-CD1Q4rZ3.js} +1 -1
- package/dist/preview/assets/{runtime-DCyGTrMp.js → runtime-Cb-qIo5p.js} +1 -1
- package/dist/preview/assets/{runtime-Bb0APo4d.js → runtime-CvgAq3mp.js} +1 -1
- package/dist/preview/assets/{runtime-D2Qtb13C.js → runtime-DkWCpjKe.js} +1 -1
- package/dist/preview/assets/{runtime-CtG2gR_k.js → runtime-mYNyG7UH.js} +1 -1
- package/dist/preview/assets/{schema-meta-DmDYh6aL.js → schema-meta-BlTKRs15.js} +1 -1
- package/dist/preview/index.html +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +6 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.d.vue.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue +32 -1
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/config.vue.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/runtime.vue +2 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.d.ts +2 -0
- package/dist/runtime/components/form/fields/2026-05-13/com.shwfed.form.field.list/schema.js +4 -0
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.checkbox.group/config.vue +202 -112
- package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue +202 -112
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.d.vue.ts +4 -4
- package/dist/runtime/components/form/fields/2026-05-24/com.shwfed.form.field.monthrange/config.vue.d.ts +4 -4
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.multi/config.vue +223 -132
- package/dist/runtime/components/form/fields/2026-06-14/com.shwfed.form.field.combobox.single/config.vue +223 -132
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.d.vue.ts +59 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.vue +345 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/config.vue.d.ts +59 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.d.vue.ts +8 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.vue +113 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/runtime.vue.d.ts +8 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.d.ts +79 -0
- package/dist/runtime/components/form/fields/2026-06-20/com.shwfed.form.field.tabs/schema.js +86 -0
- package/dist/runtime/components/form/unit-config.d.vue.ts +27 -0
- package/dist/runtime/components/form/unit-config.vue +117 -73
- package/dist/runtime/components/form/unit-config.vue.d.ts +27 -0
- package/dist/runtime/components/table/schema.js +24 -25
- package/dist/runtime/components/ui/date-picker/DatePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-picker/DatePickerTimeInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.d.vue.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerInput.vue.d.ts +1 -1
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.d.vue.ts +2 -2
- package/dist/runtime/components/ui/date-range-picker/DateRangePickerTimeInput.vue.d.ts +2 -2
- package/dist/runtime/components/ui/markdown/Markdown.vue +19 -16
- package/dist/runtime/utils/markdown.d.ts +5 -2
- package/dist/runtime/utils/markdown.js +22 -1
- package/dist/runtime/vendor/cel-js/CLAUDE.md +1 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.d.ts +1 -0
- package/dist/runtime/vendor/cel-js/lib/evaluator.js +4 -0
- package/package.json +1 -1
- package/dist/preview/assets/index-BQIP6UfB.js +0 -763
- package/dist/preview/assets/index-Cj7bRG7B.css +0 -1
- package/dist/preview/assets/index-DpLMRp28.js +0 -1
package/dist/runtime/components/form/fields/2026-05-17/com.shwfed.form.field.radio.group/config.vue
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { Icon } from "@iconify/vue";
|
|
3
|
-
import { computed } from "vue";
|
|
3
|
+
import { computed, ref } from "vue";
|
|
4
|
+
import { useI18n } from "vue-i18n";
|
|
4
5
|
import { Button } from "../../../../ui/button";
|
|
5
6
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../../../ui/dropdown-menu";
|
|
6
7
|
import { ExpressionEditor } from "../../../../ui/expression-editor";
|
|
@@ -10,10 +11,15 @@ import { Field, FieldLabel } from "../../../../ui/field";
|
|
|
10
11
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupNumberField } from "../../../../ui/input-group";
|
|
11
12
|
import { Locale as LocaleField } from "../../../../ui/locale";
|
|
12
13
|
import { Markdown } from "../../../../ui/markdown";
|
|
14
|
+
import { getLocalizedText } from "../../../../../share/locale";
|
|
15
|
+
import {
|
|
16
|
+
useTreeDnd
|
|
17
|
+
} from "../../../../../composables/useTreeDnd";
|
|
13
18
|
import { getStructFieldDescription, getStructFieldTitle } from "../../../schema";
|
|
14
19
|
import { itemSchema, schema } from "./schema";
|
|
15
20
|
defineOptions({ name: "ShwfedRadioGroupFieldConfig" });
|
|
16
21
|
const value = defineModel({ type: null, ...{ required: true } });
|
|
22
|
+
const { locale } = useI18n();
|
|
17
23
|
const fieldSchema = schema(() => {
|
|
18
24
|
});
|
|
19
25
|
const fieldTitle = (f) => getStructFieldTitle(fieldSchema, f) ?? f;
|
|
@@ -35,6 +41,19 @@ const pathText = computed({
|
|
|
35
41
|
}
|
|
36
42
|
});
|
|
37
43
|
const items = computed(() => value.value.items ?? []);
|
|
44
|
+
const expandedIds = ref(/* @__PURE__ */ new Set());
|
|
45
|
+
function isExpanded(id) {
|
|
46
|
+
return expandedIds.value.has(id);
|
|
47
|
+
}
|
|
48
|
+
function toggleExpanded(id) {
|
|
49
|
+
const next = new Set(expandedIds.value);
|
|
50
|
+
if (next.has(id)) next.delete(id);
|
|
51
|
+
else next.add(id);
|
|
52
|
+
expandedIds.value = next;
|
|
53
|
+
}
|
|
54
|
+
function summaryFor(item) {
|
|
55
|
+
return getLocalizedText(item.label, locale.value) || "\u672A\u547D\u540D\u9009\u9879";
|
|
56
|
+
}
|
|
38
57
|
function newId() {
|
|
39
58
|
return typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
40
59
|
const r = Math.random() * 16 | 0;
|
|
@@ -57,13 +76,47 @@ function patchItem(index, patch) {
|
|
|
57
76
|
value.value = { ...value.value, items: next };
|
|
58
77
|
}
|
|
59
78
|
function addItem() {
|
|
60
|
-
|
|
79
|
+
const item = newItem();
|
|
80
|
+
value.value = { ...value.value, items: [...value.value.items ?? [], item] };
|
|
81
|
+
expandedIds.value = new Set(expandedIds.value).add(item.id);
|
|
61
82
|
}
|
|
62
83
|
function removeItem(index) {
|
|
63
84
|
const next = [...value.value.items ?? []];
|
|
64
85
|
next.splice(index, 1);
|
|
65
86
|
value.value = { ...value.value, items: next };
|
|
66
87
|
}
|
|
88
|
+
function moveItem(from, to) {
|
|
89
|
+
const next = [...value.value.items ?? []];
|
|
90
|
+
if (from < 0 || to < 0 || from >= next.length || to >= next.length) return;
|
|
91
|
+
const [m] = next.splice(from, 1);
|
|
92
|
+
if (!m) return;
|
|
93
|
+
next.splice(to, 0, m);
|
|
94
|
+
value.value = { ...value.value, items: next };
|
|
95
|
+
}
|
|
96
|
+
const ROW_KIND = "radio-group-option";
|
|
97
|
+
function onRowDrop(e) {
|
|
98
|
+
if (e.source.kind !== ROW_KIND || e.target.kind !== ROW_KIND) return;
|
|
99
|
+
const from = items.value.findIndex((it) => it.id === e.source.id);
|
|
100
|
+
const to = items.value.findIndex((it) => it.id === e.target.id);
|
|
101
|
+
if (from < 0 || to < 0) return;
|
|
102
|
+
if (e.instruction === "reorder-above") moveItem(from, from < to ? to - 1 : to);
|
|
103
|
+
else if (e.instruction === "reorder-below") moveItem(from, from <= to ? to : to + 1);
|
|
104
|
+
}
|
|
105
|
+
const dnd = useTreeDnd({ onRowDrop });
|
|
106
|
+
const pickDragHandle = (el) => el.querySelector(".drag-handle");
|
|
107
|
+
function rowConfig(index) {
|
|
108
|
+
const id = items.value[index]?.id ?? `idx-${index}`;
|
|
109
|
+
return {
|
|
110
|
+
kind: ROW_KIND,
|
|
111
|
+
canDrop: (src) => src.kind === ROW_KIND,
|
|
112
|
+
blockInstructions: (src) => {
|
|
113
|
+
const block = ["make-child", "reparent"];
|
|
114
|
+
if (src.id === id) block.push("reorder-above", "reorder-below");
|
|
115
|
+
return block;
|
|
116
|
+
},
|
|
117
|
+
dragHandle: pickDragHandle
|
|
118
|
+
};
|
|
119
|
+
}
|
|
67
120
|
function setItemKind(index, kind) {
|
|
68
121
|
const cur = value.value.items?.[index];
|
|
69
122
|
if (!cur || cur.value.kind === kind) return;
|
|
@@ -211,124 +264,157 @@ function setItemTooltip(index, tooltip) {
|
|
|
211
264
|
<div
|
|
212
265
|
v-for="(item, index) in items"
|
|
213
266
|
:key="item.id"
|
|
267
|
+
:ref="dnd.rowRef(item.id, rowConfig(index))"
|
|
214
268
|
data-slot="radio-group-item"
|
|
215
|
-
class="relative
|
|
269
|
+
class="relative rounded border border-zinc-200 bg-zinc-50/40"
|
|
270
|
+
:data-instruction="dnd.instructionFor(item.id) ?? void 0"
|
|
216
271
|
>
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
272
|
+
<div class="flex items-center gap-2 p-2">
|
|
273
|
+
<Icon
|
|
274
|
+
icon="fluent:re-order-dots-vertical-20-regular"
|
|
275
|
+
class="drag-handle size-4 shrink-0 cursor-grab text-zinc-400"
|
|
276
|
+
data-slot="radio-group-item-drag-handle"
|
|
277
|
+
/>
|
|
278
|
+
<InputGroupButton
|
|
279
|
+
size="icon-xs"
|
|
280
|
+
class="shrink-0"
|
|
281
|
+
data-slot="radio-group-item-collapse"
|
|
282
|
+
:aria-expanded="isExpanded(item.id)"
|
|
283
|
+
:aria-label="isExpanded(item.id) ? '\u6298\u53E0' : '\u5C55\u5F00'"
|
|
284
|
+
@click="toggleExpanded(item.id)"
|
|
285
|
+
>
|
|
286
|
+
<Icon
|
|
287
|
+
:icon="isExpanded(item.id) ? 'fluent:chevron-down-20-regular' : 'fluent:chevron-right-20-regular'"
|
|
288
|
+
/>
|
|
289
|
+
</InputGroupButton>
|
|
290
|
+
<div
|
|
291
|
+
class="min-w-0 flex-1 truncate text-sm text-zinc-700"
|
|
292
|
+
data-slot="radio-group-item-summary"
|
|
293
|
+
>
|
|
294
|
+
{{ summaryFor(item) }}
|
|
295
|
+
</div>
|
|
296
|
+
<InputGroupButton
|
|
297
|
+
variant="destructive"
|
|
298
|
+
size="icon-xs"
|
|
299
|
+
data-slot="radio-group-item-delete"
|
|
300
|
+
aria-label="删除选项"
|
|
301
|
+
class="shrink-0"
|
|
302
|
+
@click="removeItem(index)"
|
|
303
|
+
>
|
|
304
|
+
<Icon icon="fluent:delete-20-regular" />
|
|
305
|
+
</InputGroupButton>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<div
|
|
309
|
+
v-show="isExpanded(item.id)"
|
|
310
|
+
class="grid grid-cols-3 gap-3 px-3 pb-3"
|
|
311
|
+
data-slot="radio-group-item-content"
|
|
224
312
|
>
|
|
225
|
-
<
|
|
226
|
-
|
|
313
|
+
<Field orientation="vertical">
|
|
314
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
315
|
+
<template
|
|
316
|
+
v-if="itemFieldDescription('label')"
|
|
317
|
+
#tooltip
|
|
318
|
+
>
|
|
319
|
+
<Markdown
|
|
320
|
+
:source="itemFieldDescription('label')"
|
|
321
|
+
block
|
|
322
|
+
class="prose prose-sm prose-zinc"
|
|
323
|
+
/>
|
|
324
|
+
</template>
|
|
325
|
+
{{ itemFieldTitle("label") }}
|
|
326
|
+
</FieldLabel>
|
|
327
|
+
<LocaleField
|
|
328
|
+
markdown
|
|
329
|
+
translate-hint="radio option label"
|
|
330
|
+
:model-value="item.label"
|
|
331
|
+
@update:model-value="(v) => setItemLabel(index, v)"
|
|
332
|
+
/>
|
|
333
|
+
</Field>
|
|
227
334
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
335
|
+
<Field orientation="vertical">
|
|
336
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
337
|
+
<template
|
|
338
|
+
v-if="itemFieldDescription('value')"
|
|
339
|
+
#tooltip
|
|
340
|
+
>
|
|
341
|
+
<Markdown
|
|
342
|
+
:source="itemFieldDescription('value')"
|
|
343
|
+
block
|
|
344
|
+
class="prose prose-sm prose-zinc"
|
|
345
|
+
/>
|
|
346
|
+
</template>
|
|
347
|
+
{{ itemFieldTitle("value") }}
|
|
348
|
+
</FieldLabel>
|
|
349
|
+
<InputGroup>
|
|
350
|
+
<InputGroupAddon align="inline-start">
|
|
351
|
+
<DropdownMenu>
|
|
352
|
+
<DropdownMenuTrigger as-child>
|
|
353
|
+
<InputGroupButton
|
|
354
|
+
size="icon-sm"
|
|
355
|
+
as-child
|
|
356
|
+
>
|
|
357
|
+
<button
|
|
358
|
+
type="button"
|
|
359
|
+
data-slot="radio-group-item-kind-trigger"
|
|
360
|
+
class="text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5"
|
|
361
|
+
aria-label="切换值类型"
|
|
362
|
+
>
|
|
363
|
+
<Icon
|
|
364
|
+
:icon="item.value.kind === 'number' ? 'fluent:number-symbol-20-regular' : 'fluent:textbox-20-regular'"
|
|
365
|
+
/>
|
|
366
|
+
</button>
|
|
367
|
+
</InputGroupButton>
|
|
368
|
+
</DropdownMenuTrigger>
|
|
369
|
+
<DropdownMenuContent align="start">
|
|
370
|
+
<DropdownMenuItem @select="setItemKind(index, 'text')">
|
|
371
|
+
<Icon icon="fluent:textbox-20-regular" />
|
|
372
|
+
<span>文本</span>
|
|
373
|
+
</DropdownMenuItem>
|
|
374
|
+
<DropdownMenuItem @select="setItemKind(index, 'number')">
|
|
375
|
+
<Icon icon="fluent:number-symbol-20-regular" />
|
|
376
|
+
<span>数字</span>
|
|
377
|
+
</DropdownMenuItem>
|
|
378
|
+
</DropdownMenuContent>
|
|
379
|
+
</DropdownMenu>
|
|
380
|
+
</InputGroupAddon>
|
|
249
381
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
>
|
|
256
|
-
<Markdown
|
|
257
|
-
:source="itemFieldDescription('value')"
|
|
258
|
-
block
|
|
259
|
-
class="prose prose-sm prose-zinc"
|
|
382
|
+
<InputGroupInput
|
|
383
|
+
v-if="item.value.kind === 'text'"
|
|
384
|
+
:model-value="item.value.value"
|
|
385
|
+
placeholder="例:cny"
|
|
386
|
+
@update:model-value="(v) => setItemTextValue(index, String(v ?? ''))"
|
|
260
387
|
/>
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
<InputGroupButton
|
|
269
|
-
size="icon-sm"
|
|
270
|
-
as-child
|
|
271
|
-
>
|
|
272
|
-
<button
|
|
273
|
-
type="button"
|
|
274
|
-
data-slot="radio-group-item-kind-trigger"
|
|
275
|
-
class="text-zinc-500 transition-colors hover:text-zinc-700 [&_svg:not([class*='size-'])]:size-3.5"
|
|
276
|
-
aria-label="切换值类型"
|
|
277
|
-
>
|
|
278
|
-
<Icon
|
|
279
|
-
:icon="item.value.kind === 'number' ? 'fluent:number-symbol-20-regular' : 'fluent:textbox-20-regular'"
|
|
280
|
-
/>
|
|
281
|
-
</button>
|
|
282
|
-
</InputGroupButton>
|
|
283
|
-
</DropdownMenuTrigger>
|
|
284
|
-
<DropdownMenuContent align="start">
|
|
285
|
-
<DropdownMenuItem @select="setItemKind(index, 'text')">
|
|
286
|
-
<Icon icon="fluent:textbox-20-regular" />
|
|
287
|
-
<span>文本</span>
|
|
288
|
-
</DropdownMenuItem>
|
|
289
|
-
<DropdownMenuItem @select="setItemKind(index, 'number')">
|
|
290
|
-
<Icon icon="fluent:number-symbol-20-regular" />
|
|
291
|
-
<span>数字</span>
|
|
292
|
-
</DropdownMenuItem>
|
|
293
|
-
</DropdownMenuContent>
|
|
294
|
-
</DropdownMenu>
|
|
295
|
-
</InputGroupAddon>
|
|
388
|
+
<InputGroupNumberField
|
|
389
|
+
v-else
|
|
390
|
+
:model-value="item.value.value"
|
|
391
|
+
@update:model-value="(v) => setItemNumberValue(index, v)"
|
|
392
|
+
/>
|
|
393
|
+
</InputGroup>
|
|
394
|
+
</Field>
|
|
296
395
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
396
|
+
<Field orientation="vertical">
|
|
397
|
+
<FieldLabel class="text-xs text-zinc-500">
|
|
398
|
+
<template
|
|
399
|
+
v-if="itemFieldDescription('tooltip')"
|
|
400
|
+
#tooltip
|
|
401
|
+
>
|
|
402
|
+
<Markdown
|
|
403
|
+
:source="itemFieldDescription('tooltip')"
|
|
404
|
+
block
|
|
405
|
+
class="prose prose-sm prose-zinc"
|
|
406
|
+
/>
|
|
407
|
+
</template>
|
|
408
|
+
{{ itemFieldTitle("tooltip") }}
|
|
409
|
+
</FieldLabel>
|
|
410
|
+
<LocaleField
|
|
411
|
+
markdown
|
|
412
|
+
translate-hint="radio option tooltip"
|
|
413
|
+
:model-value="item.tooltip"
|
|
414
|
+
@update:model-value="(v) => setItemTooltip(index, v)"
|
|
307
415
|
/>
|
|
308
|
-
</
|
|
309
|
-
</
|
|
310
|
-
|
|
311
|
-
<Field orientation="vertical">
|
|
312
|
-
<FieldLabel class="text-xs text-zinc-500">
|
|
313
|
-
<template
|
|
314
|
-
v-if="itemFieldDescription('tooltip')"
|
|
315
|
-
#tooltip
|
|
316
|
-
>
|
|
317
|
-
<Markdown
|
|
318
|
-
:source="itemFieldDescription('tooltip')"
|
|
319
|
-
block
|
|
320
|
-
class="prose prose-sm prose-zinc"
|
|
321
|
-
/>
|
|
322
|
-
</template>
|
|
323
|
-
{{ itemFieldTitle("tooltip") }}
|
|
324
|
-
</FieldLabel>
|
|
325
|
-
<LocaleField
|
|
326
|
-
markdown
|
|
327
|
-
translate-hint="radio option tooltip"
|
|
328
|
-
:model-value="item.tooltip"
|
|
329
|
-
@update:model-value="(v) => setItemTooltip(index, v)"
|
|
330
|
-
/>
|
|
331
|
-
</Field>
|
|
416
|
+
</Field>
|
|
417
|
+
</div>
|
|
332
418
|
</div>
|
|
333
419
|
|
|
334
420
|
<Button
|
|
@@ -462,3 +548,7 @@ function setItemTooltip(index, tooltip) {
|
|
|
462
548
|
</Field>
|
|
463
549
|
</div>
|
|
464
550
|
</template>
|
|
551
|
+
|
|
552
|
+
<style scoped>
|
|
553
|
+
[data-instruction=reorder-above]:before,[data-instruction=reorder-below]:after{background:var(--primary,#2563eb);content:"";height:2px;left:0;pointer-events:none;position:absolute;right:0;z-index:1}[data-instruction=reorder-above]:before{top:-7px}[data-instruction=reorder-below]:after{bottom:-7px}
|
|
554
|
+
</style>
|
|
@@ -32,9 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
32
32
|
readonly mode: "formula" | "prefill";
|
|
33
33
|
readonly expression: string;
|
|
34
34
|
} | undefined;
|
|
35
|
-
readonly format?: string | undefined;
|
|
36
|
-
readonly valueFormat?: string | undefined;
|
|
37
35
|
readonly rangeSeparatorIcon?: string | undefined;
|
|
36
|
+
readonly format?: string | undefined;
|
|
38
37
|
readonly startPlaceholder?: readonly [{
|
|
39
38
|
readonly locale: "zh";
|
|
40
39
|
readonly message: string;
|
|
@@ -49,6 +48,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
48
|
readonly locale: "en" | "ja" | "ko";
|
|
50
49
|
readonly message: string;
|
|
51
50
|
}[]] | undefined;
|
|
51
|
+
readonly valueFormat?: string | undefined;
|
|
52
52
|
readonly validations?: readonly {
|
|
53
53
|
readonly message: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
@@ -103,9 +103,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
readonly mode: "formula" | "prefill";
|
|
104
104
|
readonly expression: string;
|
|
105
105
|
} | undefined;
|
|
106
|
-
readonly format?: string | undefined;
|
|
107
|
-
readonly valueFormat?: string | undefined;
|
|
108
106
|
readonly rangeSeparatorIcon?: string | undefined;
|
|
107
|
+
readonly format?: string | undefined;
|
|
109
108
|
readonly startPlaceholder?: readonly [{
|
|
110
109
|
readonly locale: "zh";
|
|
111
110
|
readonly message: string;
|
|
@@ -120,6 +119,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
119
|
readonly locale: "en" | "ja" | "ko";
|
|
121
120
|
readonly message: string;
|
|
122
121
|
}[]] | undefined;
|
|
122
|
+
readonly valueFormat?: string | undefined;
|
|
123
123
|
readonly validations?: readonly {
|
|
124
124
|
readonly message: readonly [{
|
|
125
125
|
readonly locale: "zh";
|
|
@@ -32,9 +32,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
32
32
|
readonly mode: "formula" | "prefill";
|
|
33
33
|
readonly expression: string;
|
|
34
34
|
} | undefined;
|
|
35
|
-
readonly format?: string | undefined;
|
|
36
|
-
readonly valueFormat?: string | undefined;
|
|
37
35
|
readonly rangeSeparatorIcon?: string | undefined;
|
|
36
|
+
readonly format?: string | undefined;
|
|
38
37
|
readonly startPlaceholder?: readonly [{
|
|
39
38
|
readonly locale: "zh";
|
|
40
39
|
readonly message: string;
|
|
@@ -49,6 +48,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
49
48
|
readonly locale: "en" | "ja" | "ko";
|
|
50
49
|
readonly message: string;
|
|
51
50
|
}[]] | undefined;
|
|
51
|
+
readonly valueFormat?: string | undefined;
|
|
52
52
|
readonly validations?: readonly {
|
|
53
53
|
readonly message: readonly [{
|
|
54
54
|
readonly locale: "zh";
|
|
@@ -103,9 +103,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
103
103
|
readonly mode: "formula" | "prefill";
|
|
104
104
|
readonly expression: string;
|
|
105
105
|
} | undefined;
|
|
106
|
-
readonly format?: string | undefined;
|
|
107
|
-
readonly valueFormat?: string | undefined;
|
|
108
106
|
readonly rangeSeparatorIcon?: string | undefined;
|
|
107
|
+
readonly format?: string | undefined;
|
|
109
108
|
readonly startPlaceholder?: readonly [{
|
|
110
109
|
readonly locale: "zh";
|
|
111
110
|
readonly message: string;
|
|
@@ -120,6 +119,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {},
|
|
|
120
119
|
readonly locale: "en" | "ja" | "ko";
|
|
121
120
|
readonly message: string;
|
|
122
121
|
}[]] | undefined;
|
|
122
|
+
readonly valueFormat?: string | undefined;
|
|
123
123
|
readonly validations?: readonly {
|
|
124
124
|
readonly message: readonly [{
|
|
125
125
|
readonly locale: "zh";
|