@veltra/desktop 1.7.19 → 1.8.1
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/components/batch-edit/batch-edit-form.js +40 -26
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/use-handlers.js +3 -3
- package/dist/components/batch-edit/use-handlers.js.map +1 -1
- package/dist/components/batch-edit/use-shortcut-key.js +4 -2
- package/dist/components/batch-edit/use-shortcut-key.js.map +1 -1
- package/dist/components/card/style2.css +0 -2
- package/dist/components/condition-editor/condition-editor.js +8 -2
- package/dist/components/condition-editor/condition-editor.js.map +1 -1
- package/dist/components/dropdown/dropdown.js +5 -3
- package/dist/components/dropdown/dropdown.js.map +1 -1
- package/dist/components/expression-editor/components/path-preview.js +3 -6
- package/dist/components/expression-editor/components/path-preview.js.map +1 -1
- package/dist/components/expression-editor/components/variable-picker.js +49 -12
- package/dist/components/expression-editor/components/variable-picker.js.map +1 -1
- package/dist/components/expression-editor/core/editor.js +42 -0
- package/dist/components/expression-editor/core/editor.js.map +1 -1
- package/dist/components/expression-editor/expression-editor.js +68 -22
- package/dist/components/expression-editor/expression-editor.js.map +1 -1
- package/dist/components/expression-editor/style2.css +135 -73
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js +0 -1
- package/dist/components/form/form.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/form/style2.css +8 -3
- package/dist/components/form-item/style2.css +14 -0
- package/dist/components/index.d.ts +27 -26
- package/dist/components/index.js +54 -52
- package/dist/components/index.js.map +1 -1
- package/dist/components/kanban/di.js +7 -0
- package/dist/components/kanban/di.js.map +1 -0
- package/dist/components/kanban/kanban-column.js +67 -0
- package/dist/components/kanban/kanban-column.js.map +1 -0
- package/dist/components/kanban/kanban.js +89 -0
- package/dist/components/kanban/kanban.js.map +1 -0
- package/dist/components/kanban/style.d.ts +1 -0
- package/dist/components/kanban/style.js +1 -0
- package/dist/components/kanban/style2.css +128 -0
- package/dist/components/multi-select/multi-select.js +16 -12
- package/dist/components/multi-select/multi-select.js.map +1 -1
- package/dist/components/multi-select/style2.css +7 -0
- package/dist/components/multi-tree-select/multi-tree-select.js +82 -56
- package/dist/components/multi-tree-select/multi-tree-select.js.map +1 -1
- package/dist/components/multi-tree-select/style2.css +7 -0
- package/dist/components/rich-text-editor/image-node.js +154 -0
- package/dist/components/rich-text-editor/image-node.js.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.js +80 -22
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text-editor/style2.css +6 -0
- package/dist/components/rich-text-editor/toolbar.js +22 -2
- package/dist/components/rich-text-editor/toolbar.js.map +1 -1
- package/dist/components/select/select.js +7 -3
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/style2.css +7 -0
- package/dist/components/select/use-options.js +14 -3
- package/dist/components/select/use-options.js.map +1 -1
- package/dist/components/tree-select/style2.css +7 -0
- package/dist/components/tree-select/tree-select.js +49 -17
- package/dist/components/tree-select/tree-select.js.map +1 -1
- package/dist/index.d.ts +48 -46
- package/dist/index.js +47 -46
- package/dist/types/dropdown.d.ts +10 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/kanban.d.ts +69 -0
- package/dist/types/multi-tree-select.d.ts +7 -1
- package/dist/types/rich-text-editor.d.ts +13 -2
- package/dist/types/tree-select.d.ts +7 -1
- package/package.json +1 -1
- package/src/components/batch-edit/__test__/batch-edit.test.ts +112 -1
- package/src/components/batch-edit/batch-edit-form.vue +21 -2
- package/src/components/batch-edit/use-handlers.ts +6 -5
- package/src/components/batch-edit/use-shortcut-key.ts +5 -2
- package/src/components/card/style.scss +0 -2
- package/src/components/condition-editor/__test__/condition-editor.test.ts +61 -0
- package/src/components/condition-editor/condition-editor.vue +6 -1
- package/src/components/dropdown/dropdown.vue +9 -4
- package/src/components/expression-editor/__test__/editor.test.ts +66 -0
- package/src/components/expression-editor/__test__/expression-editor.test.ts +124 -0
- package/src/components/expression-editor/components/path-preview.vue +1 -2
- package/src/components/expression-editor/components/variable-picker.vue +54 -13
- package/src/components/expression-editor/core/editor.ts +61 -0
- package/src/components/expression-editor/expression-editor.vue +58 -20
- package/src/components/expression-editor/style.scss +160 -76
- package/src/components/form/form.vue +0 -1
- package/src/components/form/style.scss +11 -4
- package/src/components/form-item/style.scss +16 -1
- package/src/components/index.ts +2 -0
- package/src/components/kanban/__test__/kanban.test.ts +212 -0
- package/src/components/kanban/di.ts +19 -0
- package/src/components/kanban/index.ts +1 -0
- package/src/components/kanban/kanban-column.vue +77 -0
- package/src/components/kanban/kanban.vue +81 -0
- package/src/components/kanban/style.scss +124 -0
- package/src/components/kanban/style.ts +1 -0
- package/src/components/multi-select/multi-select.vue +11 -2
- package/src/components/multi-select/style.scss +6 -0
- package/src/components/multi-tree-select/multi-tree-select.vue +58 -9
- package/src/components/multi-tree-select/style.scss +6 -0
- package/src/components/rich-text-editor/image-node.ts +193 -0
- package/src/components/rich-text-editor/rich-text-editor.vue +131 -29
- package/src/components/rich-text-editor/style.scss +7 -0
- package/src/components/rich-text-editor/toolbar.vue +21 -1
- package/src/components/select/__test__/select.test.ts +78 -0
- package/src/components/select/select.vue +13 -3
- package/src/components/select/style.scss +6 -0
- package/src/components/select/use-options.ts +25 -4
- package/src/components/tree-select/__test__/tree-select.test.ts +116 -0
- package/src/components/tree-select/style.scss +6 -0
- package/src/components/tree-select/tree-select.vue +63 -13
- package/src/types/dropdown.ts +10 -0
- package/src/types/index.ts +1 -0
- package/src/types/kanban.ts +63 -0
- package/src/types/multi-tree-select.ts +12 -1
- package/src/types/rich-text-editor.ts +14 -1
- package/src/types/tree-select.ts +12 -1
package/dist/index.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import _sfc_main$41 from "./components/icon/icon.js";
|
|
2
2
|
import _sfc_main$30 from "./components/empty/empty.js";
|
|
3
|
-
import _sfc_main$
|
|
3
|
+
import _sfc_main$69 from "./components/scroll/scroll.js";
|
|
4
4
|
import NodeRender from "./components/node-render/node-render.js";
|
|
5
|
-
import _sfc_main$
|
|
5
|
+
import _sfc_main$84 from "./components/tip/tip.js";
|
|
6
6
|
import { createEmptyGroup, createEmptyLeaf, evaluate } from "./components/condition-editor/core/evaluator.js";
|
|
7
7
|
import _sfc_main$28 from "./components/dropdown/dropdown.js";
|
|
8
8
|
import input_default from "./components/input/input.js";
|
|
9
|
-
import _sfc_main$
|
|
9
|
+
import _sfc_main$48 from "./components/loading/loading.js";
|
|
10
|
+
import { vLoading } from "./components/loading/directive.js";
|
|
11
|
+
import _sfc_main$71 from "./components/select/select.js";
|
|
10
12
|
import _sfc_main$21 from "./components/condition-editor/condition-editor.js";
|
|
11
|
-
import _sfc_main$
|
|
12
|
-
import _sfc_main$
|
|
13
|
-
import _sfc_main$
|
|
13
|
+
import _sfc_main$78 from "./components/tabs/tabs-horizontal.js";
|
|
14
|
+
import _sfc_main$79 from "./components/tabs/tabs-vertical.js";
|
|
15
|
+
import _sfc_main$77 from "./components/tabs/tabs.js";
|
|
14
16
|
import _sfc_main$15 from "./components/checkbox/checkbox.js";
|
|
15
|
-
import _sfc_main$
|
|
16
|
-
import _sfc_main$
|
|
17
|
+
import _sfc_main$85 from "./components/tree/tree.js";
|
|
18
|
+
import _sfc_main$86 from "./components/tree-select/tree-select.js";
|
|
17
19
|
import _sfc_main$18 from "./components/code-editor/code-editor.js";
|
|
18
20
|
import _sfc_main$27 from "./components/drawer/drawer.js";
|
|
19
21
|
import _sfc_main$36 from "./components/grid/grid.js";
|
|
@@ -22,10 +24,10 @@ import form_item_default from "./components/form-item/form-item.js";
|
|
|
22
24
|
import form_default from "./components/form/form.js";
|
|
23
25
|
import _sfc_main$5 from "./components/button/button.js";
|
|
24
26
|
import _sfc_main$6 from "./components/button/button-group.js";
|
|
25
|
-
import _sfc_main$
|
|
27
|
+
import _sfc_main$50 from "./components/message-confirm/message-confirm.js";
|
|
26
28
|
import { messageConfirm } from "./components/message-confirm/message-confirm2.js";
|
|
27
29
|
import _sfc_main$7 from "./components/calendar/calendar.js";
|
|
28
|
-
import _sfc_main$
|
|
30
|
+
import _sfc_main$66 from "./components/radio/radio.js";
|
|
29
31
|
import _sfc_main$8 from "./components/card/card.js";
|
|
30
32
|
import _sfc_main$12 from "./components/card/card-header.js";
|
|
31
33
|
import _sfc_main$11 from "./components/card/card-cover.js";
|
|
@@ -33,70 +35,69 @@ import _sfc_main$10 from "./components/card/card-content.js";
|
|
|
33
35
|
import _sfc_main$9 from "./components/card/card-action.js";
|
|
34
36
|
import _sfc_main$23 from "./components/date-panel/date-panel.js";
|
|
35
37
|
import _sfc_main$25 from "./components/date-range-picker/date-range-picker.js";
|
|
36
|
-
import _sfc_main$
|
|
37
|
-
import { vLoading } from "./components/loading/directive.js";
|
|
38
|
-
import _sfc_main$64 from "./components/progress-nodes/progress-nodes.js";
|
|
38
|
+
import _sfc_main$65 from "./components/progress-nodes/progress-nodes.js";
|
|
39
39
|
import _sfc_main$1 from "./components/auto-complete/auto-complete.js";
|
|
40
|
-
import _sfc_main$
|
|
41
|
-
import _sfc_main$
|
|
40
|
+
import _sfc_main$64 from "./components/progress/progress.js";
|
|
41
|
+
import _sfc_main$56 from "./components/notification/notification.js";
|
|
42
42
|
import { notification } from "./components/notification/notification2.js";
|
|
43
|
-
import _sfc_main$
|
|
44
|
-
import _sfc_main$
|
|
43
|
+
import _sfc_main$45 from "./components/layout/layout.js";
|
|
44
|
+
import _sfc_main$80 from "./components/tag/tag.js";
|
|
45
45
|
import _sfc_main$16 from "./components/checkbox/checkbox-button.js";
|
|
46
|
-
import _sfc_main$
|
|
47
|
-
import _sfc_main$
|
|
46
|
+
import _sfc_main$51 from "./components/multi-select/multi-select.js";
|
|
47
|
+
import _sfc_main$72 from "./components/slider/slider.js";
|
|
48
48
|
import _sfc_main$35 from "./components/gantt-chart/gantt-chart.js";
|
|
49
|
-
import _sfc_main$
|
|
49
|
+
import _sfc_main$49 from "./components/message/message.js";
|
|
50
50
|
import { message } from "./components/message/message2.js";
|
|
51
51
|
import _sfc_main$32 from "./components/file-picker/file-picker.js";
|
|
52
|
-
import _sfc_main$
|
|
53
|
-
import _sfc_main$
|
|
52
|
+
import _sfc_main$58 from "./components/number-input/number-input.js";
|
|
53
|
+
import _sfc_main$59 from "./components/number-range-input/number-range-input.js";
|
|
54
54
|
import _sfc_main$19 from "./components/collapse/collapse.js";
|
|
55
55
|
import _sfc_main$20 from "./components/collapse/collapse-item.js";
|
|
56
56
|
import { defineTableColumns } from "./components/table/use-columns.js";
|
|
57
|
-
import _sfc_main$
|
|
58
|
-
import _sfc_main$
|
|
57
|
+
import _sfc_main$75 from "./components/table/table.js";
|
|
58
|
+
import _sfc_main$76 from "./components/table-editor/table-editor.js";
|
|
59
59
|
import _sfc_main$14 from "./components/check-tag/check-tag.js";
|
|
60
60
|
import { ContextmenuPanelDIKey, ContextmenuRootDIKey } from "./components/contextmenu/di.js";
|
|
61
61
|
import _sfc_main$22 from "./components/contextmenu/contextmenu.js";
|
|
62
62
|
import { contextmenu } from "./components/contextmenu/api.js";
|
|
63
|
-
import _sfc_main$
|
|
64
|
-
import _sfc_main$
|
|
63
|
+
import _sfc_main$62 from "./components/password-input/password-input.js";
|
|
64
|
+
import _sfc_main$57 from "./components/number/number.js";
|
|
65
65
|
import _sfc_main$26 from "./components/dialog/dialog.js";
|
|
66
66
|
import _sfc_main$31 from "./components/expression-editor/expression-editor.js";
|
|
67
|
-
import _sfc_main$
|
|
68
|
-
import _sfc_main$
|
|
69
|
-
import _sfc_main$
|
|
67
|
+
import _sfc_main$87 from "./components/watermark/watermark.js";
|
|
68
|
+
import _sfc_main$44 from "./components/kbd/kbd.js";
|
|
69
|
+
import _sfc_main$63 from "./components/pop-confirm/pop-confirm.js";
|
|
70
70
|
import _sfc_main from "./components/action/action.js";
|
|
71
71
|
import action_group_default from "./components/action/action-group.js";
|
|
72
72
|
import _sfc_main$3 from "./components/batch-edit/batch-edit.js";
|
|
73
73
|
import { defineBatchEditColumns } from "./components/batch-edit/helper.js";
|
|
74
|
-
import _sfc_main$
|
|
74
|
+
import _sfc_main$82 from "./components/textarea/textarea.js";
|
|
75
75
|
import _sfc_main$13 from "./components/cascade/cascade.js";
|
|
76
|
-
import _sfc_main$
|
|
76
|
+
import _sfc_main$73 from "./components/steps/steps.js";
|
|
77
77
|
import _sfc_main$24 from "./components/date-picker/date-picker.js";
|
|
78
|
-
import _sfc_main$
|
|
79
|
-
import _sfc_main$
|
|
80
|
-
import _sfc_main$
|
|
78
|
+
import _sfc_main$61 from "./components/palette/palette.js";
|
|
79
|
+
import _sfc_main$83 from "./components/theme/theme.js";
|
|
80
|
+
import _sfc_main$52 from "./components/multi-tree-select/multi-tree-select.js";
|
|
81
81
|
import _sfc_main$39 from "./components/group-input/group-input.js";
|
|
82
|
-
import _sfc_main$
|
|
83
|
-
import _sfc_main$
|
|
84
|
-
import _sfc_main$
|
|
85
|
-
import _sfc_main$
|
|
86
|
-
import _sfc_main$
|
|
87
|
-
import _sfc_main$
|
|
82
|
+
import _sfc_main$46 from "./components/list/list.js";
|
|
83
|
+
import _sfc_main$47 from "./components/list/list-item.js";
|
|
84
|
+
import _sfc_main$68 from "./components/rich-text-editor/rich-text-editor.js";
|
|
85
|
+
import _sfc_main$54 from "./components/nav/nav-item.js";
|
|
86
|
+
import _sfc_main$55 from "./components/nav/nav-sub.js";
|
|
87
|
+
import _sfc_main$53 from "./components/nav/nav.js";
|
|
88
88
|
import _sfc_main$29 from "./components/dual-nav/dual-nav.js";
|
|
89
89
|
import _sfc_main$40 from "./components/group-nav/group-nav.js";
|
|
90
90
|
import _sfc_main$37 from "./components/grid-input/grid-input.js";
|
|
91
|
-
import _sfc_main$
|
|
92
|
-
import _sfc_main$
|
|
91
|
+
import _sfc_main$74 from "./components/switch/switch.js";
|
|
92
|
+
import _sfc_main$67 from "./components/radio-group/radio-group.js";
|
|
93
93
|
import _sfc_main$17 from "./components/checkbox-group/checkbox-group.js";
|
|
94
94
|
import _sfc_main$33 from "./components/file-viewer/file-viewer.js";
|
|
95
|
-
import _sfc_main$
|
|
95
|
+
import _sfc_main$81 from "./components/text/text.js";
|
|
96
96
|
import _sfc_main$4 from "./components/breadcrumb/breadcrumb.js";
|
|
97
|
-
import _sfc_main$
|
|
97
|
+
import _sfc_main$60 from "./components/paginator/paginator.js";
|
|
98
98
|
import _sfc_main$34 from "./components/float-button/float-button.js";
|
|
99
99
|
import _sfc_main$2 from "./components/badge/badge.js";
|
|
100
|
-
import _sfc_main$
|
|
100
|
+
import _sfc_main$70 from "./components/segment/segment.js";
|
|
101
101
|
import _sfc_main$42 from "./components/image-cropper/image-cropper.js";
|
|
102
|
-
|
|
102
|
+
import _sfc_main$43 from "./components/kanban/kanban.js";
|
|
103
|
+
export { ContextmenuPanelDIKey, ContextmenuRootDIKey, _sfc_main as UAction, action_group_default as UActionGroup, _sfc_main$1 as UAutoComplete, _sfc_main$2 as UBadge, _sfc_main$3 as UBatchEdit, _sfc_main$4 as UBreadcrumb, _sfc_main$5 as UButton, _sfc_main$6 as UButtonGroup, _sfc_main$7 as UCalendar, _sfc_main$8 as UCard, _sfc_main$9 as UCardAction, _sfc_main$10 as UCardContent, _sfc_main$11 as UCardCover, _sfc_main$12 as UCardHeader, _sfc_main$13 as UCascade, _sfc_main$14 as UCheckTag, _sfc_main$15 as UCheckbox, _sfc_main$16 as UCheckboxButton, _sfc_main$17 as UCheckboxGroup, _sfc_main$18 as UCodeEditor, _sfc_main$19 as UCollapse, _sfc_main$20 as UCollapseItem, _sfc_main$21 as UConditionEditor, _sfc_main$22 as UContextmenu, _sfc_main$23 as UDatePanel, _sfc_main$24 as UDatePicker, _sfc_main$25 as UDateRangePicker, _sfc_main$26 as UDialog, _sfc_main$27 as UDrawer, _sfc_main$28 as UDropdown, _sfc_main$29 as UDualNav, _sfc_main$30 as UEmpty, _sfc_main$31 as UExpressionEditor, _sfc_main$32 as UFilePicker, _sfc_main$33 as UFileViewer, _sfc_main$34 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$35 as UGanttChart, _sfc_main$36 as UGrid, _sfc_main$37 as UGridInput, _sfc_main$38 as UGridItem, _sfc_main$39 as UGroupInput, _sfc_main$40 as UGroupNav, _sfc_main$41 as UIcon, _sfc_main$42 as UImageCropper, input_default as UInput, _sfc_main$43 as UKanban, _sfc_main$44 as UKbd, _sfc_main$45 as ULayout, _sfc_main$46 as UList, _sfc_main$47 as UListItem, _sfc_main$48 as ULoading, _sfc_main$49 as UMessage, _sfc_main$50 as UMessageConfirm, _sfc_main$51 as UMultiSelect, _sfc_main$52 as UMultiTreeSelect, _sfc_main$53 as UNav, _sfc_main$54 as UNavItem, _sfc_main$55 as UNavSub, NodeRender as UNodeRender, _sfc_main$56 as UNotification, _sfc_main$57 as UNumber, _sfc_main$58 as UNumberInput, _sfc_main$59 as UNumberRangeInput, _sfc_main$60 as UPaginator, _sfc_main$61 as UPalette, _sfc_main$62 as UPasswordInput, _sfc_main$63 as UPopConfirm, _sfc_main$64 as UProgress, _sfc_main$65 as UProgressNodes, _sfc_main$66 as URadio, _sfc_main$67 as URadioGroup, _sfc_main$68 as URichTextEditor, _sfc_main$69 as UScroll, _sfc_main$70 as USegment, _sfc_main$71 as USelect, _sfc_main$72 as USlider, _sfc_main$73 as USteps, _sfc_main$74 as USwitch, _sfc_main$75 as UTable, _sfc_main$76 as UTableEditor, _sfc_main$77 as UTabs, _sfc_main$78 as UTabsHorizontal, _sfc_main$79 as UTabsVertical, _sfc_main$80 as UTag, _sfc_main$81 as UText, _sfc_main$82 as UTextarea, _sfc_main$83 as UTheme, _sfc_main$84 as UTip, _sfc_main$85 as UTree, _sfc_main$86 as UTreeSelect, _sfc_main$87 as UWatermark, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, message, messageConfirm, notification, vLoading };
|
package/dist/types/dropdown.d.ts
CHANGED
|
@@ -8,6 +8,16 @@ export interface DropdownProps {
|
|
|
8
8
|
* @default 'hover'
|
|
9
9
|
*/
|
|
10
10
|
trigger?: 'hover' | 'click' | 'custom';
|
|
11
|
+
/**
|
|
12
|
+
* 弹出方向;空间不足时仍会自动翻转
|
|
13
|
+
* @default 'bottom'
|
|
14
|
+
*/
|
|
15
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
16
|
+
/**
|
|
17
|
+
* 弹出对齐方式
|
|
18
|
+
* @default 'start'
|
|
19
|
+
*/
|
|
20
|
+
alignment?: 'center' | 'start' | 'end';
|
|
11
21
|
/**
|
|
12
22
|
* 宽度
|
|
13
23
|
* @default - 跟随触发宽度
|
package/dist/types/index.d.ts
CHANGED
|
@@ -76,10 +76,11 @@ import { AnimationEmits, AnimationExposed, AnimationProps, _AnimationExposed } f
|
|
|
76
76
|
import { AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, _AutoCompleteExposed } from "./auto-complete.js";
|
|
77
77
|
import { SwitchEmits, SwitchExposed, SwitchProps, _SwitchExposed } from "./switch.js";
|
|
78
78
|
import { StepsEmits, StepsExposed, StepsProps, StepsSlotScope, _StepsExposed } from "./steps.js";
|
|
79
|
-
import { RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ToolbarItem, _RichTextEditorExposed } from "./rich-text-editor.js";
|
|
79
|
+
import { RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, RichTextImageUploader, ToolbarItem, _RichTextEditorExposed } from "./rich-text-editor.js";
|
|
80
80
|
import { FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, _FileViewerExposed } from "./file-viewer.js";
|
|
81
81
|
import { CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue } from "./collapse.js";
|
|
82
82
|
import { SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, _SegmentExposed } from "./segment.js";
|
|
83
83
|
import { ImageCropperChangePayload, ImageCropperCropTransform, ImageCropperEmits, ImageCropperExposed, ImageCropperProps, ImageCropperResult, ImageCropperResultOptions, ImageCropperSelection, _ImageCropperExposed } from "./image-cropper.js";
|
|
84
|
+
import { KanbanColumnItem, KanbanEmits, KanbanExposed, KanbanProps, KanbanSlots, _KanbanExposed } from "./kanban.js";
|
|
84
85
|
export type * from "@veltra/utils";
|
|
85
|
-
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BatchEditSlots, BatchEditStates, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DatePanelEmits, DatePanelProps, DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerDataType, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DateRangeValue, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormEmits, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, GroupNavEmits, GroupNavGroup, GroupNavProps, IconEmits, IconExposed, IconProps, ImageCropperChangePayload, ImageCropperCropTransform, ImageCropperEmits, ImageCropperExposed, ImageCropperProps, ImageCropperResult, ImageCropperResultOptions, ImageCropperSelection, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, Message, MessageConfirm, MessageConfirmAction, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmInstance, MessageConfirmOptions, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NavEmits, NavExposed, NavItem, NavProps, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationInstance, NotificationOptions, NotificationPosition, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableColumnStyle, TableEditorColumn, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, TipType, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _DualNavExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _ImageCropperExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NavExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SegmentExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
|
86
|
+
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, BatchEditSlots, BatchEditStates, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DatePanelEmits, DatePanelProps, DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerDataType, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DateRangeValue, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormEmits, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, GroupNavEmits, GroupNavGroup, GroupNavProps, IconEmits, IconExposed, IconProps, ImageCropperChangePayload, ImageCropperCropTransform, ImageCropperEmits, ImageCropperExposed, ImageCropperProps, ImageCropperResult, ImageCropperResultOptions, ImageCropperSelection, InputEmits, InputExposed, InputProps, KanbanColumnItem, KanbanEmits, KanbanExposed, KanbanProps, KanbanSlots, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, Message, MessageConfirm, MessageConfirmAction, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmInstance, MessageConfirmOptions, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NavEmits, NavExposed, NavItem, NavProps, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationInstance, NotificationOptions, NotificationPosition, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, RichTextImageUploader, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableColumnStyle, TableEditorColumn, TableEditorEmits, TableEditorExposed, TableEditorProps, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, TabsEmits, TabsExposed, TabsHorizontalEmits, TabsHorizontalExposed, TabsHorizontalProps, TabsProps, TabsVerticalEmits, TabsVerticalExposed, TabsVerticalProps, TagEmits, TagExposed, TagProps, TextEditorEmits, TextEditorExposed, TextEditorProps, TextEmits, TextExposed, TextProps, TextareaEmits, TextareaExposed, TextareaProps, ThemeExposed, ThemeProps, TipAlign, TipDirection, TipEmits, TipExposed, TipProps, TipType, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _ActionGroupExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _ConditionEditorExposed, _ContextmenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _DualNavExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _ImageCropperExposed, _InputExposed, _KanbanExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NavExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SegmentExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DeconstructValue } from "@veltra/utils";
|
|
2
|
+
//#region src/types/kanban.d.ts
|
|
3
|
+
/** 看板列数据 */
|
|
4
|
+
export interface KanbanColumnItem extends Record<string, any> {
|
|
5
|
+
/** 列标识(必填) */
|
|
6
|
+
key: string;
|
|
7
|
+
/** 列标题 */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** 卡片数据(顺序即展示顺序,拖拽后更新) */
|
|
10
|
+
items: Record<string, any>[];
|
|
11
|
+
}
|
|
12
|
+
/** 看板组件属性 */
|
|
13
|
+
export interface KanbanProps {
|
|
14
|
+
/** 列数据(含每列卡片),拖拽结果经 update:columns 写回 */
|
|
15
|
+
columns?: KanbanColumnItem[];
|
|
16
|
+
/**
|
|
17
|
+
* 卡片唯一标识字段名
|
|
18
|
+
* @default 'id'
|
|
19
|
+
*/
|
|
20
|
+
cardKey?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 列标题与默认卡片内容的字段名
|
|
23
|
+
* @default 'title'
|
|
24
|
+
*/
|
|
25
|
+
titleKey?: string;
|
|
26
|
+
/** 是否禁用拖拽 */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 列头是否显示卡片计数徽标
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
countable?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 空列占位文案(空列仍可作为拖放目标)
|
|
35
|
+
* @default '暂无内容'
|
|
36
|
+
*/
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
}
|
|
39
|
+
/** 看板组件事件 */
|
|
40
|
+
export interface KanbanEmits {
|
|
41
|
+
/** 列数据更新(v-model:columns) */
|
|
42
|
+
(e: 'update:columns', columns: KanbanColumnItem[]): void;
|
|
43
|
+
/** 拖拽结束后触发(含列内排序与跨列转移),返回最新列数据 */
|
|
44
|
+
(e: 'change', columns: KanbanColumnItem[]): void;
|
|
45
|
+
}
|
|
46
|
+
/** 看板插槽 */
|
|
47
|
+
export type KanbanSlots = {
|
|
48
|
+
/** 自定义卡片内容 */
|
|
49
|
+
card?: (props: {
|
|
50
|
+
card: Record<string, any>;
|
|
51
|
+
column: KanbanColumnItem;
|
|
52
|
+
index: number;
|
|
53
|
+
}) => any;
|
|
54
|
+
/** 自定义列头 */
|
|
55
|
+
header?: (props: {
|
|
56
|
+
column: KanbanColumnItem;
|
|
57
|
+
count: number;
|
|
58
|
+
}) => any;
|
|
59
|
+
/** 空列占位 */
|
|
60
|
+
empty?: (props: {
|
|
61
|
+
column: KanbanColumnItem;
|
|
62
|
+
}) => any;
|
|
63
|
+
};
|
|
64
|
+
/** 看板组件暴露的属性和方法(组件内部使用) */
|
|
65
|
+
export interface _KanbanExposed {}
|
|
66
|
+
/** 看板组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
|
|
67
|
+
export type KanbanExposed = DeconstructValue<_KanbanExposed>;
|
|
68
|
+
//#endregion
|
|
69
|
+
//# sourceMappingURL=kanban.d.ts.map
|
|
@@ -3,8 +3,14 @@ import { CSSProperties } from "vue";
|
|
|
3
3
|
import { DeconstructValue, FormComponentProps } from "@veltra/utils";
|
|
4
4
|
//#region src/types/multi-tree-select.d.ts
|
|
5
5
|
/** 树形多选组件组件属性 */
|
|
6
|
-
export interface MultiTreeSelectProps extends FormComponentProps, Omit<TreeProps, 'selected' | 'checked' | 'selectable' | 'checkable'> {
|
|
6
|
+
export interface MultiTreeSelectProps extends FormComponentProps, Omit<TreeProps, 'selected' | 'checked' | 'selectable' | 'checkable' | 'data'> {
|
|
7
7
|
modelValue?: (string | number)[];
|
|
8
|
+
/**
|
|
9
|
+
* 树数据
|
|
10
|
+
* @description 如果传入一个函数,那么filterable会被强制启用;
|
|
11
|
+
* 函数按查询词返回匹配的树,初始以空串调用一次(加载默认树)
|
|
12
|
+
*/
|
|
13
|
+
data?: Record<string, any>[] | ((qs: string) => Promise<Record<string, any>[]> | Record<string, any>[]);
|
|
8
14
|
/**自定义占位文字 */
|
|
9
15
|
placeholder?: string;
|
|
10
16
|
/**
|
|
@@ -2,8 +2,10 @@ import { DeconstructValue, FormComponentProps } from "@veltra/utils";
|
|
|
2
2
|
//#region src/types/rich-text-editor.d.ts
|
|
3
3
|
/** 富文本数据格式 */
|
|
4
4
|
export type RichTextFormat = 'html' | 'json';
|
|
5
|
+
/** 图片上传函数:接收文件,返回上传后的服务器地址 */
|
|
6
|
+
export type RichTextImageUploader = (file: File) => Promise<string>;
|
|
5
7
|
/** 工具栏项 */
|
|
6
|
-
export type ToolbarItem = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'heading' | 'bullet-list' | 'ordered-list' | 'blockquote' | 'code-block' | 'link' | 'undo' | 'redo' | '|';
|
|
8
|
+
export type ToolbarItem = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'code' | 'heading' | 'bullet-list' | 'ordered-list' | 'blockquote' | 'code-block' | 'link' | 'image' | 'undo' | 'redo' | '|';
|
|
7
9
|
/** 富文本编辑器组件属性 */
|
|
8
10
|
export interface RichTextEditorProps extends FormComponentProps {
|
|
9
11
|
modelValue?: string;
|
|
@@ -13,13 +15,22 @@ export interface RichTextEditorProps extends FormComponentProps {
|
|
|
13
15
|
toolbar?: ToolbarItem[];
|
|
14
16
|
/** 占位文本 */
|
|
15
17
|
placeholder?: string;
|
|
18
|
+
/** 是否允许图片输入(粘贴 / 拖拽 / 工具栏),默认 true */
|
|
19
|
+
image?: boolean;
|
|
16
20
|
}
|
|
17
21
|
/** 富文本编辑器组件定义的事件 */
|
|
18
22
|
export interface RichTextEditorEmits {
|
|
19
23
|
(e: 'update:modelValue', value: string): void;
|
|
20
24
|
}
|
|
21
25
|
/** 富文本编辑器组件暴露的属性和方法(组件内部使用) */
|
|
22
|
-
export interface _RichTextEditorExposed {
|
|
26
|
+
export interface _RichTextEditorExposed {
|
|
27
|
+
/**
|
|
28
|
+
* 上传编辑器内所有待上传图片:对每张图片调用 upload 获取服务器地址并替换节点,
|
|
29
|
+
* 返回替换后的最终内容(格式遵循 format 属性)。
|
|
30
|
+
* 任一上传失败则整体拒绝,图片保持待上传状态可整体重试;已上传的不会重复上传
|
|
31
|
+
*/
|
|
32
|
+
uploadImages: (upload: RichTextImageUploader) => Promise<string>;
|
|
33
|
+
}
|
|
23
34
|
/** 富文本编辑器组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
|
|
24
35
|
export type RichTextEditorExposed = DeconstructValue<_RichTextEditorExposed>;
|
|
25
36
|
//#endregion
|
|
@@ -3,8 +3,14 @@ import { CSSProperties } from "vue";
|
|
|
3
3
|
import { DeconstructValue, FormComponentProps } from "@veltra/utils";
|
|
4
4
|
//#region src/types/tree-select.d.ts
|
|
5
5
|
/** 树形选择器组件属性 */
|
|
6
|
-
export interface TreeSelectProps extends FormComponentProps, Omit<TreeProps, 'selected' | 'checked' | 'selectable' | 'checkable'> {
|
|
6
|
+
export interface TreeSelectProps extends FormComponentProps, Omit<TreeProps, 'selected' | 'checked' | 'selectable' | 'checkable' | 'data'> {
|
|
7
7
|
modelValue?: string | number;
|
|
8
|
+
/**
|
|
9
|
+
* 树数据
|
|
10
|
+
* @description 如果传入一个函数,那么filterable会被强制启用;
|
|
11
|
+
* 函数按查询词返回匹配的树,初始以空串调用一次(加载默认树)
|
|
12
|
+
*/
|
|
13
|
+
data?: Record<string, any>[] | ((qs: string) => Promise<Record<string, any>[]> | Record<string, any>[]);
|
|
8
14
|
/** 自定义占位文字 */
|
|
9
15
|
placeholder?: string;
|
|
10
16
|
/**
|
package/package.json
CHANGED
|
@@ -393,6 +393,117 @@ describe('UBatchEdit formMode', () => {
|
|
|
393
393
|
unmount()
|
|
394
394
|
})
|
|
395
395
|
|
|
396
|
+
it('弹框新增「保存并继续」:插入后弹框保持打开、表单重置,可连续录入', async () => {
|
|
397
|
+
const saveMethod = vi.fn()
|
|
398
|
+
const { host, data, model, unmount } = mountBatchEdit({
|
|
399
|
+
props: { formMode: 'dialog', quickEdit: false, saveMethod }
|
|
400
|
+
})
|
|
401
|
+
|
|
402
|
+
clickEl(host.querySelector<HTMLElement>('.u-batch-edit__add-btn')!)
|
|
403
|
+
await waitDialogOpen()
|
|
404
|
+
|
|
405
|
+
const continueBtn = () =>
|
|
406
|
+
queryDialog()!.querySelector<HTMLElement>(
|
|
407
|
+
'.u-batch-edit__form-actions button[title="保存并继续"]'
|
|
408
|
+
)!
|
|
409
|
+
|
|
410
|
+
// 编辑已有行走 update,不显示「保存并继续」由面板用例覆盖;新增弹框内应存在
|
|
411
|
+
expect(continueBtn()).toBeTruthy()
|
|
412
|
+
|
|
413
|
+
setInputValue(queryDialog()!.querySelector<HTMLInputElement>('.u-input input')!, '第一条')
|
|
414
|
+
await nextTick()
|
|
415
|
+
await nextTick()
|
|
416
|
+
clickEl(continueBtn())
|
|
417
|
+
await waitDialogSettled()
|
|
418
|
+
|
|
419
|
+
// 插入一行但弹框保持打开,表单重置为初始值
|
|
420
|
+
expect(data.value).toHaveLength(3)
|
|
421
|
+
expect(data.value[2]).toMatchObject({ label: '第一条' })
|
|
422
|
+
expect(queryDialog()).toBeTruthy()
|
|
423
|
+
expect(queryDialog()!.querySelector<HTMLInputElement>('.u-input input')!.value).toBe('')
|
|
424
|
+
expect(model.label).toBe('')
|
|
425
|
+
|
|
426
|
+
// 继续录入第二条后普通保存:追加到末尾并关闭弹框
|
|
427
|
+
setInputValue(queryDialog()!.querySelector<HTMLInputElement>('.u-input input')!, '第二条')
|
|
428
|
+
await nextTick()
|
|
429
|
+
await nextTick()
|
|
430
|
+
clickEl(querySaveButton(queryDialog()!)!)
|
|
431
|
+
await waitDialogClosed()
|
|
432
|
+
|
|
433
|
+
expect(saveMethod).toHaveBeenCalledTimes(2)
|
|
434
|
+
expect(data.value).toHaveLength(4)
|
|
435
|
+
expect(data.value[3]).toMatchObject({ label: '第二条' })
|
|
436
|
+
|
|
437
|
+
unmount()
|
|
438
|
+
})
|
|
439
|
+
|
|
440
|
+
it('弹框模式不响应 Ctrl/Cmd + S:不保存、弹框保持打开,快捷键提示不再出现', async () => {
|
|
441
|
+
const saveMethod = vi.fn()
|
|
442
|
+
const { host, data, unmount } = mountBatchEdit({
|
|
443
|
+
props: { formMode: 'dialog', quickEdit: false, saveMethod }
|
|
444
|
+
})
|
|
445
|
+
|
|
446
|
+
clickEl(host.querySelector<HTMLElement>('.u-batch-edit__add-btn')!)
|
|
447
|
+
await waitDialogOpen()
|
|
448
|
+
|
|
449
|
+
setInputValue(queryDialog()!.querySelector<HTMLInputElement>('.u-input input')!, '新名称')
|
|
450
|
+
await nextTick()
|
|
451
|
+
await nextTick()
|
|
452
|
+
|
|
453
|
+
queryDialog()!.dispatchEvent(
|
|
454
|
+
new KeyboardEvent('keydown', {
|
|
455
|
+
key: 's',
|
|
456
|
+
code: 'KeyS',
|
|
457
|
+
ctrlKey: true,
|
|
458
|
+
bubbles: true,
|
|
459
|
+
cancelable: true
|
|
460
|
+
})
|
|
461
|
+
)
|
|
462
|
+
await waitDialogSettled()
|
|
463
|
+
|
|
464
|
+
expect(saveMethod).not.toHaveBeenCalled()
|
|
465
|
+
expect(data.value).toHaveLength(2)
|
|
466
|
+
expect(queryDialog()).toBeTruthy()
|
|
467
|
+
expect(queryDialog()!.querySelector('.u-batch-edit__form-hint')!.textContent).not.toContain(
|
|
468
|
+
'Ctrl + S'
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
// Esc 仍可关闭弹框
|
|
472
|
+
queryDialog()!.dispatchEvent(
|
|
473
|
+
new KeyboardEvent('keydown', { key: 'Escape', bubbles: true, cancelable: true })
|
|
474
|
+
)
|
|
475
|
+
await waitDialogClosed()
|
|
476
|
+
expect(saveMethod).not.toHaveBeenCalled()
|
|
477
|
+
|
|
478
|
+
unmount()
|
|
479
|
+
})
|
|
480
|
+
|
|
481
|
+
it('面板模式 Ctrl/Cmd + S 保存仍可用(组件获焦时生效)', async () => {
|
|
482
|
+
const saveMethod = vi.fn()
|
|
483
|
+
const { host, unmount } = mountBatchEdit({ props: { quickEdit: false, saveMethod } })
|
|
484
|
+
|
|
485
|
+
await clickEditRow(host, 0)
|
|
486
|
+
|
|
487
|
+
const input = host.querySelector<HTMLInputElement>('.u-batch-edit__form .u-input input')!
|
|
488
|
+
// 面板模式快捷键要求组件获焦:focusin 冒泡到根布局后置位
|
|
489
|
+
input.dispatchEvent(new FocusEvent('focusin', { bubbles: true }))
|
|
490
|
+
input.dispatchEvent(
|
|
491
|
+
new KeyboardEvent('keydown', {
|
|
492
|
+
key: 's',
|
|
493
|
+
code: 'KeyS',
|
|
494
|
+
ctrlKey: true,
|
|
495
|
+
bubbles: true,
|
|
496
|
+
cancelable: true
|
|
497
|
+
})
|
|
498
|
+
)
|
|
499
|
+
await waitDialogSettled()
|
|
500
|
+
|
|
501
|
+
expect(saveMethod).toHaveBeenCalledTimes(1)
|
|
502
|
+
expect(saveMethod.mock.calls[0]![1]).toBe('update')
|
|
503
|
+
|
|
504
|
+
unmount()
|
|
505
|
+
})
|
|
506
|
+
|
|
396
507
|
it('弹框内取消 / 关闭按钮 / 遮罩点击均不保存,且 model 恢复初始值', async () => {
|
|
397
508
|
const saveMethod = vi.fn()
|
|
398
509
|
const { host, data, model, unmount } = mountBatchEdit({
|
|
@@ -461,7 +572,7 @@ describe('UBatchEdit 重入保护', () => {
|
|
|
461
572
|
await nextTick()
|
|
462
573
|
await nextTick()
|
|
463
574
|
|
|
464
|
-
// 同一 tick
|
|
575
|
+
// 同一 tick 内连续两次点击保存(模拟保存进行中的重复触发),中间故意不等待
|
|
465
576
|
const saveBtn = querySaveButton(queryDialog()!)!
|
|
466
577
|
clickEl(saveBtn)
|
|
467
578
|
clickEl(saveBtn)
|
|
@@ -54,7 +54,11 @@
|
|
|
54
54
|
<template v-if="props.readonly"> 只读模式 </template>
|
|
55
55
|
|
|
56
56
|
<span :class="{ [bem.is('concealed')]: !shortcutActive }">
|
|
57
|
-
<template
|
|
57
|
+
<template
|
|
58
|
+
v-if="
|
|
59
|
+
props.formMode === 'panel' && !(state.formActionType === 'update' && props.quickEdit)
|
|
60
|
+
"
|
|
61
|
+
>
|
|
58
62
|
<u-kbd>Ctrl + S</u-kbd> 保存 ·
|
|
59
63
|
</template>
|
|
60
64
|
<u-kbd>Esc</u-kbd> 关闭
|
|
@@ -63,6 +67,15 @@
|
|
|
63
67
|
|
|
64
68
|
<div :class="cls.e('form-actions')">
|
|
65
69
|
<u-button size="small" text :loading="state.loading" @click="handleClose"> 取消 </u-button>
|
|
70
|
+
<u-button
|
|
71
|
+
v-if="showSaveContinueBtn"
|
|
72
|
+
size="small"
|
|
73
|
+
title="保存并继续"
|
|
74
|
+
:loading="state.loading"
|
|
75
|
+
@click="handleSave(true)"
|
|
76
|
+
>
|
|
77
|
+
保存并继续
|
|
78
|
+
</u-button>
|
|
66
79
|
<u-button
|
|
67
80
|
v-if="showSaveBtn"
|
|
68
81
|
type="primary"
|
|
@@ -70,7 +83,7 @@
|
|
|
70
83
|
title="保存"
|
|
71
84
|
:icon="Save"
|
|
72
85
|
:loading="state.loading"
|
|
73
|
-
@click="handleSave"
|
|
86
|
+
@click="handleSave()"
|
|
74
87
|
/>
|
|
75
88
|
</div>
|
|
76
89
|
</footer>
|
|
@@ -151,6 +164,12 @@ const showSaveBtn = computed(() => {
|
|
|
151
164
|
return creatable.value || updatable.value || creatableChild.value
|
|
152
165
|
})
|
|
153
166
|
|
|
167
|
+
/** 弹框模式新增类操作显示「保存并继续」:保存后重置表单继续录入,不关闭弹框 */
|
|
168
|
+
const showSaveContinueBtn = computed(() => {
|
|
169
|
+
if (props.formMode !== 'dialog') return false
|
|
170
|
+
return creatable.value || creatableChild.value
|
|
171
|
+
})
|
|
172
|
+
|
|
154
173
|
const headerInfo = computed(() => FORM_ACTION_HEADER_MAP[state.formActionType])
|
|
155
174
|
|
|
156
175
|
/** 头部图标色调修饰类:样式中 createChild 对应的修饰类为 is-child */
|
|
@@ -40,7 +40,8 @@ interface Options {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface EditReturned {
|
|
43
|
-
|
|
43
|
+
/** @param keepOpen 新增类操作保存后不关闭表单(弹框模式「保存并继续」) */
|
|
44
|
+
handleSave: (keepOpen?: boolean) => Promise<void>
|
|
44
45
|
handleClose: () => void
|
|
45
46
|
handleCreate: () => void
|
|
46
47
|
handleDelete: (row: TableRow) => Promise<void>
|
|
@@ -153,8 +154,8 @@ export function useHandlers(options: Options): EditReturned {
|
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
/**
|
|
157
|
-
const handleSave = runWithLoading(async () => {
|
|
157
|
+
/** 保存;keepOpen 为 true 时(「保存并继续」)新增保存后不关闭表单 */
|
|
158
|
+
const handleSave = runWithLoading(async (keepOpen = false) => {
|
|
158
159
|
const { model, saveMethod } = props
|
|
159
160
|
const valid = await formRef.value?.validate()
|
|
160
161
|
if (!model || !valid) return
|
|
@@ -172,8 +173,8 @@ export function useHandlers(options: Options): EditReturned {
|
|
|
172
173
|
}
|
|
173
174
|
insert(item)
|
|
174
175
|
|
|
175
|
-
//
|
|
176
|
-
if (props.formMode === 'dialog') {
|
|
176
|
+
// 弹框模式保存成功即关闭,连续新增只能由「保存并继续」显式触发
|
|
177
|
+
if (props.formMode === 'dialog' && !keepOpen) {
|
|
177
178
|
resetState()
|
|
178
179
|
return
|
|
179
180
|
}
|
|
@@ -40,10 +40,11 @@ export function useShortcutKey(options: Options) {
|
|
|
40
40
|
/**
|
|
41
41
|
* 键盘快捷键:
|
|
42
42
|
* - Esc 关闭表单
|
|
43
|
-
* - ⌘/Ctrl + S
|
|
43
|
+
* - ⌘/Ctrl + S 保存(仅面板模式;快速编辑模式下编辑行时除外)
|
|
44
44
|
*
|
|
45
45
|
* 面板模式仅组件获焦时生效;弹框模式表单被 teleport 到 body,
|
|
46
|
-
*
|
|
46
|
+
* 组件聚焦状态覆盖不到,改为弹框打开期间生效。
|
|
47
|
+
* 弹框模式不支持 ⌘/Ctrl + S 保存,保存只能走底部按钮
|
|
47
48
|
*/
|
|
48
49
|
function handleKeydown(e: KeyboardEvent) {
|
|
49
50
|
const active = props.formMode === 'dialog' ? state.formVisible : focused.value
|
|
@@ -52,6 +53,8 @@ export function useShortcutKey(options: Options) {
|
|
|
52
53
|
|
|
53
54
|
if (e.key === 'Escape') return runEscape(e)
|
|
54
55
|
|
|
56
|
+
if (props.formMode === 'dialog') return
|
|
57
|
+
|
|
55
58
|
const meta = e.metaKey || e.ctrlKey
|
|
56
59
|
if (!meta) return
|
|
57
60
|
|
|
@@ -7,14 +7,12 @@ $root-name: card;
|
|
|
7
7
|
@include m.b($root-name) {
|
|
8
8
|
border-radius: fn.component-var(card, radius, fn.use-var(radius, large));
|
|
9
9
|
background-color: fn.use-var(bg-color, top);
|
|
10
|
-
border: fn.use-var(border-muted);
|
|
11
10
|
box-shadow: fn.use-var(shadow, sm);
|
|
12
11
|
backdrop-filter: fn.use-var(bg-filter);
|
|
13
12
|
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
14
13
|
overflow: hidden;
|
|
15
14
|
|
|
16
15
|
@include m.is(integrate) {
|
|
17
|
-
border: none;
|
|
18
16
|
box-shadow: none;
|
|
19
17
|
--u-card-header-bg: transparent;
|
|
20
18
|
--u-card-action-bg: transparent;
|