@veltra/desktop 1.1.4 → 1.1.5
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/action/action-group.js +3 -110
- package/dist/components/action/action-group.js.map +1 -1
- package/dist/components/action/action-group.vue.d.ts +4 -13
- package/dist/components/action/action-group.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/components/action/action-group.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/action/action.js +5 -1
- package/dist/components/action/action.js.map +1 -1
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/action/di.js.map +1 -1
- package/dist/components/action/style2.css +17 -14
- package/dist/components/auto-complete/auto-complete.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/batch-edit/batch-edit-form.js +94 -101
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/batch-edit-list.js +52 -68
- package/dist/components/batch-edit/batch-edit-list.js.map +1 -1
- package/dist/components/batch-edit/style2.css +13 -89
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/cascade/cascade-panel-item.js +4 -4
- package/dist/components/cascade/cascade.js +2 -2
- package/dist/components/cascade/cascade.vue.d.ts +2 -2
- package/dist/components/checkbox/checkbox-button.js +1 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +2 -2
- package/dist/components/code-editor/code-editor.js +1 -1
- package/dist/components/collapse/collapse.js +1 -1
- package/dist/components/condition-editor/components/condition-group.js +152 -0
- package/dist/components/condition-editor/components/condition-group.js.map +1 -0
- package/dist/components/condition-editor/components/condition-row.js +217 -0
- package/dist/components/condition-editor/components/condition-row.js.map +1 -0
- package/dist/components/condition-editor/condition-editor.js +134 -5
- package/dist/components/condition-editor/condition-editor.js.map +1 -1
- package/dist/components/condition-editor/condition-editor.vue.d.ts +10 -2
- package/dist/components/condition-editor/core/evaluator.js +75 -0
- package/dist/components/condition-editor/core/evaluator.js.map +1 -0
- package/dist/components/condition-editor/core/operators.js +123 -0
- package/dist/components/condition-editor/core/operators.js.map +1 -0
- package/dist/components/condition-editor/style.js +7 -0
- package/dist/components/condition-editor/style2.css +186 -0
- package/dist/components/context-menu/context-menu.js +1 -1
- package/dist/components/date-panel/date-panel.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.js +2 -2
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.js +2 -2
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/dialog/dialog.js +7 -7
- package/dist/components/dialog/style2.css +8 -0
- package/dist/components/dialog/use-maximum.js +1 -1
- package/dist/components/drawer/style2.css +8 -0
- package/dist/components/dropdown/dropdown.js +1 -1
- package/dist/components/expression-editor/components/variable-picker.js +8 -8
- package/dist/components/expression-editor/expression-editor.js +1 -1
- package/dist/components/file-viewer/file-viewer.js +13 -13
- package/dist/components/form-item/form-item.js.map +1 -1
- package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js +6 -6
- package/dist/components/form-item/form-item.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/grid-input/grid-input.js +1 -1
- package/dist/components/group-input/group-input.js +1 -1
- package/dist/components/index.js +154 -154
- package/dist/components/input/input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/layout/layout-resizer.js +1 -1
- package/dist/components/layout/layout.js +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/loading/loading.js +1 -1
- package/dist/components/menu/menu-sub-collapsed.js +4 -4
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/message/message.js +1 -1
- package/dist/components/message-confirm/message-confirm.js +1 -1
- package/dist/components/multi-select/multi-select.js +15 -15
- package/dist/components/multi-select/multi-select.vue.d.ts +3 -3
- package/dist/components/multi-tree-select/multi-tree-select.js +8 -8
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +3 -3
- package/dist/components/notification/notification.js +1 -1
- package/dist/components/number/number.vue.d.ts +1 -1
- package/dist/components/number-input/number-input.js +2 -2
- package/dist/components/number-range-input/number-range-input.js +1 -1
- package/dist/components/paginator/paginator.js +6 -6
- package/dist/components/paginator/style.js +1 -1
- package/dist/components/palette/palette.js +1 -1
- package/dist/components/password-input/password-input.js +2 -2
- package/dist/components/pop-confirm/pop-confirm.js +1 -1
- package/dist/components/progress-nodes/progress-nodes.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/radio-group/radio-group.vue.d.ts +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/components/scroll/scroll-bar.js +1 -1
- package/dist/components/scroll/scroll.js +1 -1
- package/dist/components/select/select.js +10 -10
- package/dist/components/select/select.vue.d.ts +2 -2
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/steps/steps.js +2 -2
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/table/style2.css +4 -1
- package/dist/components/table/table.js +2 -2
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/use-columns.js +1 -1
- package/dist/components/table/use-fixed-columns.js +8 -31
- package/dist/components/table/use-fixed-columns.js.map +1 -1
- package/dist/components/table-editor/table-editor.js +1 -1
- package/dist/components/tabs/tabs-horizontal.js +1 -1
- package/dist/components/tabs/tabs-vertical.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/theme/style.js +1 -1
- package/dist/components/theme/theme.js +11 -11
- package/dist/components/tip/tip.js +1 -1
- package/dist/components/tree/tree-node.js +1 -1
- package/dist/components/tree/tree.js +5 -5
- package/dist/components/tree-select/tree-select.js +6 -6
- package/dist/components/tree-select/tree-select.vue.d.ts +3 -3
- package/dist/index.d.ts +5 -5
- package/dist/index.js +83 -83
- package/dist/style.js +2 -2
- package/dist/types/action.d.ts +5 -11
- package/dist/types/condition-editor.d.ts +41 -8
- package/dist/types/index.d.ts +4 -4
- package/package.json +11 -11
- package/src/components/action/action-group.vue +68 -82
- package/src/components/action/action.vue +9 -1
- package/src/components/action/di.ts +2 -1
- package/src/components/action/style.scss +22 -27
- package/src/components/batch-edit/batch-edit-form.vue +65 -70
- package/src/components/batch-edit/batch-edit-list.vue +35 -41
- package/src/components/batch-edit/style.scss +19 -118
- package/src/components/condition-editor/components/condition-group.vue +131 -0
- package/src/components/condition-editor/components/condition-row.vue +208 -0
- package/src/components/condition-editor/condition-editor.vue +145 -6
- package/src/components/condition-editor/core/evaluator.ts +93 -0
- package/src/components/condition-editor/core/operators.ts +57 -0
- package/src/components/condition-editor/style.scss +239 -1
- package/src/components/condition-editor/style.ts +7 -0
- package/src/components/dialog/style.scss +13 -0
- package/src/components/drawer/style.scss +13 -0
- package/src/components/form-item/form-item.vue +1 -1
- package/src/components/table/style.scss +9 -1
- package/src/components/table/table.vue +1 -3
- package/src/components/table/use-fixed-columns.ts +5 -49
- package/src/types/action.ts +6 -11
- package/src/types/condition-editor.ts +39 -7
package/dist/types/index.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import { NotificationEmits, NotificationExposed, NotificationProps, _Notificatio
|
|
|
22
22
|
import { ButtonEmits, ButtonExposed, ButtonProps, ButtonType, _ButtonExposed } from "./button.js";
|
|
23
23
|
import { DatePanelEmits, DatePanelProps, PanelType } from "./date-panel.js";
|
|
24
24
|
import { DialogEmits, DialogExposed, DialogProps, _DialogExposed } from "./dialog.js";
|
|
25
|
-
import { ActionEmits, ActionExposed, ActionGroupProps, ActionProps, _ActionExposed } from "./action.js";
|
|
25
|
+
import { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, _ActionExposed, _ActionGroupExposed } from "./action.js";
|
|
26
26
|
import { DataSettingConfig, FormExposed, FormModelItem, FormProps, IFormModel, ModelData, ModelRules, _FormExposed } from "./form.js";
|
|
27
27
|
import { TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, TableEmits, TableExposed, TableProps, TableRow, TableRowSlotsScope, TableSummaryContext, _TableExposed } from "./table.js";
|
|
28
28
|
import { BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, _BatchEditExposed } from "./batch-edit.js";
|
|
@@ -64,12 +64,12 @@ import { BadgeEmits, BadgeExposed, BadgeProps, _BadgeExposed } from "./badge.js"
|
|
|
64
64
|
import { FormItemEmits, FormItemExposed, FormItemProps } from "./form-item.js";
|
|
65
65
|
import { GroupInputEmits, GroupInputExposed, GroupInputProps, _GroupInputExposed } from "./group-input.js";
|
|
66
66
|
import { PaginatorEmits, PaginatorExposed, PaginatorProps, _PaginatorExposed } from "./paginator.js";
|
|
67
|
-
import {
|
|
67
|
+
import { ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, VariableItem, _ExpressionEditorExposed } from "./expression-editor.js";
|
|
68
|
+
import { ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionItem, ConditionValue, _ConditionEditorExposed } from "./condition-editor.js";
|
|
68
69
|
import { CssTransitionEmits, CssTransitionExposed, CssTransitionProps, _CssTransitionExposed } from "./css-transition.js";
|
|
69
70
|
import { MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, _MessageConfirmExposed } from "./message-confirm.js";
|
|
70
71
|
import { MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, _MultiAutoCompleteExposed } from "./multi-auto-complete.js";
|
|
71
72
|
import { BreakCols, Breakpoint, GridEmits, GridExposed, GridItemProps, GridProps, _GridExposed } from "./grid.js";
|
|
72
|
-
import { ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, VariableItem, _ExpressionEditorExposed } from "./expression-editor.js";
|
|
73
73
|
import { AnimationEmits, AnimationExposed, AnimationProps, _AnimationExposed } from "./animation.js";
|
|
74
74
|
import { AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, _AutoCompleteExposed } from "./auto-complete.js";
|
|
75
75
|
import { SwitchEmits, SwitchExposed, SwitchProps, _SwitchExposed } from "./switch.js";
|
|
@@ -81,7 +81,7 @@ export * from "@veltra/utils";
|
|
|
81
81
|
|
|
82
82
|
//#region src/types/index.d.ts
|
|
83
83
|
declare namespace index_d_exports {
|
|
84
|
-
export { ActionEmits, ActionExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, 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, CollapseExposed, CollapseIconPosition, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ContextMenuEmits, ContextMenuExposed, ContextMenuItem, ContextMenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NodeRenderExposed, NodeRenderProps, NotificationEmits, NotificationExposed, 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, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, 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, ToolbarItem, TreeEmit, TreeExposed, TreeNode, TreeNodeProps, TreeProps, TreeSelectEmits, TreeSelectExposed, TreeSelectProps, UploaderEmits, UploaderExposed, UploaderProps, VariableItem, WatermarkEmits, WatermarkExposed, WatermarkProps, _ActionExposed, _AnimationExposed, _AutoCompleteExposed, _BadgeExposed, _BatchEditExposed, _BreadcrumbExposed, _ButtonExposed, _CalendarExposed, _CardExposed, _CascadeExposed, _CheckTagExposed, _CodeEditorExposed, _CollapseExposed, _ConditionEditorExposed, _ContextMenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
|
84
|
+
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditProps, 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, CollapseExposed, CollapseIconPosition, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionItem, ConditionValue, ContextMenuEmits, ContextMenuExposed, ContextMenuItem, ContextMenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DataSettingConfig, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModelItem, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, IFormModel, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, MenuEmits, MenuExposed, MenuItem, MenuProps, Message, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NodeRenderExposed, NodeRenderProps, NotificationEmits, NotificationExposed, 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, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, 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, 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, _CollapseExposed, _ConditionEditorExposed, _ContextMenuExposed, _CssTransitionExposed, _DatePickerExposed, _DateRangePickerExposed, _DialogExposed, _DrawerExposed, _DropdownExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MenuExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
|
85
85
|
}
|
|
86
86
|
import * as import__veltra_utils from "@veltra/utils";
|
|
87
87
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -61,22 +61,22 @@
|
|
|
61
61
|
"@lexical/rich-text": "^0.43.0",
|
|
62
62
|
"@lexical/selection": "^0.43.0",
|
|
63
63
|
"@lexical/utils": "^0.43.0",
|
|
64
|
-
"@veltra/compositions": "1.1.
|
|
65
|
-
"@veltra/directives": "1.1.
|
|
66
|
-
"@veltra/icons": "1.1.
|
|
67
|
-
"@veltra/styles": "1.1.
|
|
68
|
-
"@veltra/utils": "1.1.
|
|
64
|
+
"@veltra/compositions": "1.1.5",
|
|
65
|
+
"@veltra/directives": "1.1.5",
|
|
66
|
+
"@veltra/icons": "1.1.5",
|
|
67
|
+
"@veltra/styles": "1.1.5",
|
|
68
|
+
"@veltra/utils": "1.1.5",
|
|
69
69
|
"@visactor/vtable": "^1.26.0",
|
|
70
70
|
"codemirror": "^6.0.2",
|
|
71
71
|
"docx-preview": "^0.3.7",
|
|
72
72
|
"lexical": "^0.43.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@veltra/compositions": "1.1.
|
|
76
|
-
"@veltra/directives": "1.1.
|
|
77
|
-
"@veltra/icons": "1.1.
|
|
78
|
-
"@veltra/styles": "1.1.
|
|
79
|
-
"@veltra/utils": "1.1.
|
|
75
|
+
"@veltra/compositions": "1.1.5",
|
|
76
|
+
"@veltra/directives": "1.1.5",
|
|
77
|
+
"@veltra/icons": "1.1.5",
|
|
78
|
+
"@veltra/styles": "1.1.5",
|
|
79
|
+
"@veltra/utils": "1.1.5",
|
|
80
80
|
"vue": "^3.5.33"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -1,48 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<component v-for="node of normalNodes" :key="node.key" :is="node" />
|
|
4
|
-
|
|
5
|
-
<u-tip
|
|
6
|
-
v-if="dropdownNodes.length"
|
|
7
|
-
:class="cls.e('dropdown')"
|
|
8
|
-
direction="bottom"
|
|
9
|
-
alignment="end"
|
|
10
|
-
trigger="click"
|
|
11
|
-
>
|
|
12
|
-
<template #content>
|
|
13
|
-
<component v-for="node of dropdownNodes" :key="node.key" :is="node" />
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<u-action
|
|
17
|
-
:class="cls.e('more')"
|
|
18
|
-
:type
|
|
19
|
-
:size
|
|
20
|
-
:text
|
|
21
|
-
:circle="hover"
|
|
22
|
-
:icon="hover ? MoreFilled : undefined"
|
|
23
|
-
title="更多"
|
|
24
|
-
>
|
|
25
|
-
<template v-if="!hover">
|
|
26
|
-
更多
|
|
27
|
-
<u-icon>
|
|
28
|
-
<ArrowDown />
|
|
29
|
-
</u-icon>
|
|
30
|
-
</template>
|
|
31
|
-
</u-action>
|
|
32
|
-
</u-tip>
|
|
33
|
-
</div>
|
|
2
|
+
<component v-for="node of getSlotsNodes()" :key="node.key" :is="node" />
|
|
34
3
|
</template>
|
|
35
4
|
|
|
36
|
-
<script lang="
|
|
37
|
-
import {
|
|
5
|
+
<script lang="tsx" setup>
|
|
6
|
+
import { MoreFilled } from '@veltra/icons/normal'
|
|
38
7
|
import { bem, extractNormalVNodes } from '@veltra/utils'
|
|
39
|
-
import type
|
|
40
|
-
import { cloneVNode, computed, provide, type VNode } from 'vue'
|
|
8
|
+
import { cloneVNode, provide, shallowRef, type VNode } from 'vue'
|
|
41
9
|
|
|
42
|
-
import type { ActionGroupProps } from '../../types'
|
|
43
|
-
import {
|
|
10
|
+
import type { _ActionGroupExposed, ActionGroupProps } from '../../types'
|
|
11
|
+
import { UButton } from '../button'
|
|
44
12
|
import { UTip } from '../tip'
|
|
45
|
-
import UAction from './action.vue'
|
|
46
13
|
import { ActionDIKey } from './di'
|
|
47
14
|
|
|
48
15
|
defineOptions({
|
|
@@ -50,34 +17,10 @@ defineOptions({
|
|
|
50
17
|
inheritAttrs: false
|
|
51
18
|
})
|
|
52
19
|
|
|
53
|
-
|
|
54
|
-
// 是为了规避 Vue SFC 编译器在跨文件类型解析时偶发的 prop 未注册问题
|
|
55
|
-
// (表现为运行时 `[Vue warn]: Property "x" was accessed during render but is not defined on instance`)。
|
|
56
|
-
// 通过本地接口定义 + 类型相等性约束保证与外部类型一致。
|
|
57
|
-
interface _Props {
|
|
58
|
-
loading?: boolean
|
|
59
|
-
circle?: boolean
|
|
60
|
-
max?: number
|
|
61
|
-
hover?: boolean
|
|
62
|
-
size?: 'small' | 'default' | 'large'
|
|
63
|
-
text?: boolean
|
|
64
|
-
type?: ColorType
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
type _AssertEqual = [ActionGroupProps] extends [_Props]
|
|
68
|
-
? [_Props] extends [ActionGroupProps]
|
|
69
|
-
? true
|
|
70
|
-
: never
|
|
71
|
-
: never
|
|
72
|
-
|
|
73
|
-
const _assert: _AssertEqual = true
|
|
74
|
-
void _assert
|
|
75
|
-
|
|
76
|
-
const props = withDefaults(defineProps<_Props>(), {
|
|
20
|
+
const props = withDefaults(defineProps<ActionGroupProps>(), {
|
|
77
21
|
max: 3,
|
|
78
22
|
loading: false,
|
|
79
23
|
circle: false,
|
|
80
|
-
hover: false,
|
|
81
24
|
size: 'small',
|
|
82
25
|
text: true,
|
|
83
26
|
type: 'primary'
|
|
@@ -89,8 +32,6 @@ const slots = defineSlots<{
|
|
|
89
32
|
default?: () => VNode[]
|
|
90
33
|
}>()
|
|
91
34
|
|
|
92
|
-
const rootCls = computed(() => [cls.b, bem.is('hover', props.hover)])
|
|
93
|
-
|
|
94
35
|
function isInDropdownNode(node: VNode): boolean {
|
|
95
36
|
const p = node.props as Record<string, unknown> | null
|
|
96
37
|
if (!p) return false
|
|
@@ -98,13 +39,32 @@ function isInDropdownNode(node: VNode): boolean {
|
|
|
98
39
|
return v === true || v === '' || v === 'true'
|
|
99
40
|
}
|
|
100
41
|
|
|
101
|
-
const
|
|
102
|
-
|
|
42
|
+
const tipVisible = shallowRef(false)
|
|
43
|
+
|
|
44
|
+
function closeTip() {
|
|
45
|
+
tipVisible.value = false
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function withSeparators(nodes: VNode[]) {
|
|
49
|
+
return nodes.flatMap((node, index) => {
|
|
50
|
+
if (index === 0) return [node]
|
|
51
|
+
|
|
52
|
+
return [
|
|
53
|
+
<i
|
|
54
|
+
key={`separator-${index}`}
|
|
55
|
+
class={cls.e('separator')}
|
|
56
|
+
aria-hidden="true"
|
|
57
|
+
/>,
|
|
58
|
+
node
|
|
59
|
+
]
|
|
60
|
+
})
|
|
61
|
+
}
|
|
103
62
|
|
|
104
|
-
|
|
63
|
+
function getSlotsNodes() {
|
|
64
|
+
const nodes = slots.default?.()
|
|
65
|
+
if (!nodes) return []
|
|
105
66
|
|
|
106
67
|
const extracted = extractNormalVNodes(nodes).filter(
|
|
107
|
-
// 仅保留 UAction 子节点
|
|
108
68
|
(node) => (node.type as { name?: string } | null | undefined)?.name === 'Action'
|
|
109
69
|
)
|
|
110
70
|
|
|
@@ -122,22 +82,48 @@ const partitioned = computed(() => {
|
|
|
122
82
|
const willOverflow = visible.length > props.max
|
|
123
83
|
const overflow = willOverflow ? visible.splice(props.max - 1) : []
|
|
124
84
|
|
|
125
|
-
|
|
126
|
-
visible,
|
|
127
|
-
hidden: [...overflow, ...fixedHidden]
|
|
128
|
-
}
|
|
129
|
-
})
|
|
85
|
+
const hiddenNodes = [...overflow, ...fixedHidden]
|
|
130
86
|
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
// 下拉菜单中的 UAction 强制以非圆形、文本模式呈现,避免视觉与其他菜单项不一致
|
|
134
|
-
const dropdownNodes = computed(() => {
|
|
135
|
-
return partitioned.value.hidden.map((node) =>
|
|
87
|
+
const dropdownNodes = hiddenNodes.map((node) =>
|
|
136
88
|
cloneVNode(node, { inDropdown: true, circle: false })
|
|
137
89
|
)
|
|
138
|
-
|
|
90
|
+
|
|
91
|
+
const dropdown = hiddenNodes.length ? (
|
|
92
|
+
<UTip
|
|
93
|
+
direction="bottom"
|
|
94
|
+
alignment="end"
|
|
95
|
+
trigger="click"
|
|
96
|
+
class={cls.e('dropdown')}
|
|
97
|
+
visible={tipVisible.value}
|
|
98
|
+
onUpdate:visible={(val: boolean) => {
|
|
99
|
+
tipVisible.value = val
|
|
100
|
+
}}
|
|
101
|
+
>
|
|
102
|
+
{{
|
|
103
|
+
content: () => dropdownNodes,
|
|
104
|
+
default: () => (
|
|
105
|
+
<UButton
|
|
106
|
+
class={cls.e('more')}
|
|
107
|
+
type={props.type}
|
|
108
|
+
size={props.size}
|
|
109
|
+
text={props.text}
|
|
110
|
+
circle
|
|
111
|
+
icon={MoreFilled}
|
|
112
|
+
/>
|
|
113
|
+
)
|
|
114
|
+
}}
|
|
115
|
+
</UTip>
|
|
116
|
+
) : null
|
|
117
|
+
|
|
118
|
+
return withSeparators(dropdown ? [...visible, dropdown] : visible)
|
|
119
|
+
}
|
|
139
120
|
|
|
140
121
|
provide(ActionDIKey, {
|
|
141
|
-
groupProps: props
|
|
122
|
+
groupProps: props,
|
|
123
|
+
closeTip
|
|
124
|
+
})
|
|
125
|
+
|
|
126
|
+
defineExpose<_ActionGroupExposed>({
|
|
127
|
+
closeTip
|
|
142
128
|
})
|
|
143
129
|
</script>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
:circle
|
|
27
27
|
:propagate="false"
|
|
28
28
|
v-bind="{ ...buttonProps, ...$attrs }"
|
|
29
|
-
@click="
|
|
29
|
+
@click="handleRun"
|
|
30
30
|
>
|
|
31
31
|
<slot />
|
|
32
32
|
</u-button>
|
|
@@ -97,6 +97,14 @@ const emit = defineEmits<ActionEmits>()
|
|
|
97
97
|
const cls = bem('action')
|
|
98
98
|
|
|
99
99
|
function handleConfirm() {
|
|
100
|
+
handleRun()
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function handleRun() {
|
|
100
104
|
emit('run')
|
|
105
|
+
|
|
106
|
+
if (props.inDropdown) {
|
|
107
|
+
ctx?.closeTip()
|
|
108
|
+
}
|
|
101
109
|
}
|
|
102
110
|
</script>
|
|
@@ -2,4 +2,5 @@ import type { InjectionKey } from 'vue'
|
|
|
2
2
|
|
|
3
3
|
import type { ActionGroupProps } from '../../types'
|
|
4
4
|
|
|
5
|
-
export const ActionDIKey: InjectionKey<{ groupProps: ActionGroupProps }> =
|
|
5
|
+
export const ActionDIKey: InjectionKey<{ groupProps: ActionGroupProps; closeTip: () => void }> =
|
|
6
|
+
Symbol('ActionDIKey')
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'pkg:@veltra/styles/mixins' as m;
|
|
2
2
|
@use 'pkg:@veltra/styles/functions' as fn;
|
|
3
|
+
@use 'pkg:@veltra/styles/vars';
|
|
3
4
|
|
|
4
5
|
$root-name: action;
|
|
5
6
|
$group-name: action-group;
|
|
@@ -8,39 +9,29 @@ $group-name: action-group;
|
|
|
8
9
|
display: inline-flex;
|
|
9
10
|
align-items: center;
|
|
10
11
|
vertical-align: middle;
|
|
11
|
-
gap:
|
|
12
|
+
gap: 2px;
|
|
13
|
+
padding: 2px 4px;
|
|
14
|
+
border-radius: 999px;
|
|
15
|
+
background-color: color-mix(in srgb, #{fn.use-var(bg-color, top)} 70%, transparent);
|
|
16
|
+
backdrop-filter: fn.use-var(bg-filter);
|
|
17
|
+
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
18
|
+
box-shadow: 0 1px 4px color-mix(in srgb, #{fn.use-var(shadow, color)} 35%, transparent);
|
|
12
19
|
|
|
13
|
-
// 下拉触发按钮的占位类(与子项一致的间距处理)
|
|
14
20
|
@include m.e(more) {
|
|
15
21
|
flex-shrink: 0;
|
|
16
22
|
}
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
opacity 0.18s ease,
|
|
27
|
-
background-color 0.18s ease,
|
|
28
|
-
box-shadow 0.18s ease;
|
|
29
|
-
|
|
30
|
-
&:hover,
|
|
31
|
-
&:focus-within {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
background-color: color-mix(in srgb, #{fn.use-var(bg-color, top)} 70%, transparent);
|
|
34
|
-
backdrop-filter: fn.use-var(bg-filter);
|
|
35
|
-
-webkit-backdrop-filter: fn.use-var(bg-filter);
|
|
36
|
-
box-shadow: 0 1px 4px color-mix(in srgb, #{fn.use-var(shadow, color)} 35%, transparent);
|
|
37
|
-
}
|
|
24
|
+
@include m.e(separator) {
|
|
25
|
+
display: inline-block;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
width: 1px;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
height: 0.8em;
|
|
30
|
+
margin: 0 4px;
|
|
31
|
+
background-color: fn.use-var(border-color);
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
// 下拉菜单内容容器:模拟菜单项视觉
|
|
41
34
|
@include m.e(dropdown) {
|
|
42
|
-
padding: 4px;
|
|
43
|
-
min-width: 140px;
|
|
44
35
|
display: flex;
|
|
45
36
|
flex-direction: column;
|
|
46
37
|
gap: 2px;
|
|
@@ -48,9 +39,8 @@ $group-name: action-group;
|
|
|
48
39
|
@include m.b(button) {
|
|
49
40
|
width: 100%;
|
|
50
41
|
justify-content: flex-start;
|
|
51
|
-
padding: 0
|
|
42
|
+
padding: 0 10px;
|
|
52
43
|
|
|
53
|
-
// 下拉项不再使用同级间距,恢复块级布局
|
|
54
44
|
& + & {
|
|
55
45
|
margin-left: 0;
|
|
56
46
|
}
|
|
@@ -58,6 +48,11 @@ $group-name: action-group;
|
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
|
|
51
|
+
// 覆盖 tip 组件尺寸类(.tip--default)的 padding,下拉菜单需要更紧凑的间距
|
|
52
|
+
.#{vars.$namespace}#{$group-name}__dropdown#{vars.$namespace}tip__content {
|
|
53
|
+
padding: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
61
56
|
@include m.b($root-name) {
|
|
62
57
|
flex-shrink: 0;
|
|
63
58
|
}
|
|
@@ -1,77 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
<aside :class="cls.e('form')" v-if="state.visible && !!props.model">
|
|
3
|
+
<header :class="cls.e('form-header')">
|
|
4
|
+
<span :class="[cls.e('form-icon'), bem.is(headerInfo.tone)]">
|
|
5
|
+
<u-icon>
|
|
6
|
+
<component :is="headerInfo.icon" />
|
|
7
|
+
</u-icon>
|
|
8
|
+
</span>
|
|
9
|
+
<div :class="cls.e('form-title')">
|
|
10
|
+
<h3 :class="cls.e('form-title-text')">{{ headerInfo.title }}</h3>
|
|
11
|
+
<span v-if="headerInfo.chip" :class="cls.e('form-chip')">
|
|
12
|
+
{{ headerInfo.chip }}
|
|
9
13
|
</span>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
size="small"
|
|
22
|
-
title="关闭"
|
|
23
|
-
@click="handleClose"
|
|
24
|
-
/>
|
|
25
|
-
</header>
|
|
14
|
+
</div>
|
|
15
|
+
<u-button
|
|
16
|
+
:class="cls.e('form-close')"
|
|
17
|
+
:icon="Close"
|
|
18
|
+
text
|
|
19
|
+
circle
|
|
20
|
+
size="small"
|
|
21
|
+
title="关闭"
|
|
22
|
+
@click="handleClose"
|
|
23
|
+
/>
|
|
24
|
+
</header>
|
|
26
25
|
|
|
26
|
+
<u-scroll always :class="cls.e('form-body')" :key="bodyKey">
|
|
27
27
|
<transition name="fade" appear mode="out-in">
|
|
28
|
-
<u-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
>
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
</u-form>
|
|
48
|
-
</u-scroll>
|
|
28
|
+
<u-form
|
|
29
|
+
:model="props.model"
|
|
30
|
+
:readonly="props.readonly"
|
|
31
|
+
@keyup.enter="handleSave"
|
|
32
|
+
:label-width="props.labelWidth"
|
|
33
|
+
>
|
|
34
|
+
<template #default="{ data, model }">
|
|
35
|
+
<slot
|
|
36
|
+
v-bind="{
|
|
37
|
+
data,
|
|
38
|
+
model,
|
|
39
|
+
row: state.row,
|
|
40
|
+
depth: state.depth,
|
|
41
|
+
indexes: insertIndexes,
|
|
42
|
+
index: state.row?.index
|
|
43
|
+
}"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
</u-form>
|
|
49
47
|
</transition>
|
|
48
|
+
</u-scroll>
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
<footer :class="cls.e('form-footer')">
|
|
51
|
+
<span :class="cls.e('form-hint')" v-if="!props.readonly && state.dataUpdated">
|
|
52
|
+
有未保存改动
|
|
53
|
+
</span>
|
|
54
|
+
<span :class="cls.e('form-hint')" v-else-if="!props.readonly">
|
|
55
|
+
<kbd>Enter</kbd> 保存 · <kbd>Esc</kbd> 关闭
|
|
56
|
+
</span>
|
|
57
|
+
<span :class="cls.e('form-hint')" v-else>只读模式</span>
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</transition>
|
|
59
|
+
<div :class="cls.e('form-actions')">
|
|
60
|
+
<u-button text :loading="state.loading" @click="handleClose"> 取消 </u-button>
|
|
61
|
+
<u-button
|
|
62
|
+
v-if="!props.readonly && (creatable || updatable)"
|
|
63
|
+
:type="state.type === 'create' ? 'success' : 'primary'"
|
|
64
|
+
:loading="state.loading"
|
|
65
|
+
:disabled="!state.dataUpdated"
|
|
66
|
+
@click="handleSave"
|
|
67
|
+
>
|
|
68
|
+
保存
|
|
69
|
+
</u-button>
|
|
70
|
+
</div>
|
|
71
|
+
</footer>
|
|
72
|
+
</aside>
|
|
75
73
|
</template>
|
|
76
74
|
|
|
77
75
|
<script lang="ts" setup>
|
|
@@ -140,9 +138,6 @@ const headerInfo = computed<HeaderInfo>(() => {
|
|
|
140
138
|
return {
|
|
141
139
|
icon: Plus,
|
|
142
140
|
title: '新增',
|
|
143
|
-
chip: insertIndexes.value.length
|
|
144
|
-
? `插入到第 ${insertIndexes.value[insertIndexes.value.length - 1]! + 1} 位`
|
|
145
|
-
: undefined,
|
|
146
141
|
tone: 'create'
|
|
147
142
|
}
|
|
148
143
|
}
|