@veltra/desktop 1.1.31 → 1.1.32
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.vue.d.ts +1 -1
- package/dist/components/auto-complete/auto-complete.vue.d.ts +1 -1
- package/dist/components/batch-edit/batch-edit.vue.d.ts +1 -1
- package/dist/components/cascade/cascade.vue.d.ts +1 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/components/contextmenu/api.d.ts +8 -0
- package/dist/components/{context-menu → contextmenu}/api.js +2 -2
- package/dist/components/contextmenu/api.js.map +1 -0
- package/dist/components/contextmenu/contextmenu-item.js +64 -0
- package/dist/components/contextmenu/contextmenu-item.js.map +1 -0
- package/dist/components/contextmenu/contextmenu-panel.js +33 -0
- package/dist/components/contextmenu/contextmenu-panel.js.map +1 -0
- package/dist/components/contextmenu/contextmenu-sub.js +83 -0
- package/dist/components/contextmenu/contextmenu-sub.js.map +1 -0
- package/dist/components/contextmenu/contextmenu.js +79 -0
- package/dist/components/contextmenu/contextmenu.js.map +1 -0
- package/dist/components/{context-menu/context-menu.vue.d.ts → contextmenu/contextmenu.vue.d.ts} +5 -5
- package/dist/components/contextmenu/di.js +7 -0
- package/dist/components/contextmenu/di.js.map +1 -0
- package/dist/components/contextmenu/helper.js +8 -0
- package/dist/components/contextmenu/helper.js.map +1 -0
- package/dist/components/contextmenu/index.d.ts +2 -0
- package/dist/components/contextmenu/style2.css +154 -0
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/file-viewer/file-viewer.vue.d.ts +1 -1
- package/dist/components/file-viewer/previewers/sheet-previewer.js +33 -93
- package/dist/components/file-viewer/previewers/sheet-previewer.js.map +1 -1
- package/dist/components/file-viewer/sheet-parser.js +46 -0
- package/dist/components/file-viewer/sheet-parser.js.map +1 -0
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +3 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/input.vue.d.ts +1 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +2 -2
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +2 -2
- package/dist/components/number-input/number-input.vue.d.ts +1 -1
- package/dist/components/number-range-input/number-range-input.vue.d.ts +1 -1
- package/dist/components/password-input/password-input.vue.d.ts +1 -1
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.vue.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +1 -1
- package/dist/components/steps/steps.vue.d.ts +1 -1
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +2 -2
- package/dist/components/tabs/tabs-vertical.vue.d.ts +2 -2
- package/dist/components/tabs/tabs.vue.d.ts +2 -2
- package/dist/components/textarea/textarea.vue.d.ts +1 -1
- package/dist/components/tree-select/tree-select.vue.d.ts +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/style.js +1 -1
- package/dist/types/{context-menu.d.ts → contextmenu.d.ts} +12 -10
- package/dist/types/index.d.ts +2 -2
- package/package.json +6 -6
- package/src/components/{context-menu → contextmenu}/api.ts +4 -4
- package/src/components/contextmenu/contextmenu-item.vue +63 -0
- package/src/components/contextmenu/contextmenu-panel.vue +28 -0
- package/src/components/contextmenu/contextmenu-sub.vue +88 -0
- package/src/components/contextmenu/contextmenu.vue +77 -0
- package/src/components/contextmenu/di.ts +13 -0
- package/src/components/contextmenu/helper.ts +5 -0
- package/src/components/contextmenu/index.ts +3 -0
- package/src/components/contextmenu/style.scss +135 -0
- package/src/components/file-viewer/previewers/sheet-previewer.vue +35 -131
- package/src/components/file-viewer/sheet-parser.ts +52 -0
- package/src/components/index.ts +1 -1
- package/src/style.ts +1 -1
- package/src/types/{context-menu.ts → contextmenu.ts} +9 -7
- package/src/types/index.ts +1 -1
- package/dist/components/context-menu/api.d.ts +0 -8
- package/dist/components/context-menu/api.js.map +0 -1
- package/dist/components/context-menu/context-menu-item.js +0 -60
- package/dist/components/context-menu/context-menu-item.js.map +0 -1
- package/dist/components/context-menu/context-menu.js +0 -95
- package/dist/components/context-menu/context-menu.js.map +0 -1
- package/dist/components/context-menu/di.js +0 -6
- package/dist/components/context-menu/di.js.map +0 -1
- package/dist/components/context-menu/index.d.ts +0 -2
- package/dist/components/context-menu/style2.css +0 -52
- package/src/components/context-menu/context-menu-item.vue +0 -67
- package/src/components/context-menu/context-menu.vue +0 -119
- package/src/components/context-menu/di.ts +0 -5
- package/src/components/context-menu/index.ts +0 -3
- package/src/components/context-menu/style.scss +0 -51
- /package/dist/components/{context-menu → contextmenu}/style.d.ts +0 -0
- /package/dist/components/{context-menu → contextmenu}/style.js +0 -0
- /package/src/components/{context-menu → contextmenu}/style.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ import { MenuEmits, MenuExposed, MenuItem, MenuProps, _MenuExposed } from "./typ
|
|
|
51
51
|
import { PasswordInputEmits, PasswordInputExposed, PasswordInputProps, _PasswordInputExposed } from "./types/password-input.js";
|
|
52
52
|
import { DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./types/date-picker.js";
|
|
53
53
|
import { DropdownEmits, DropdownExposed, DropdownProps, _DropdownExposed } from "./types/dropdown.js";
|
|
54
|
-
import {
|
|
54
|
+
import { ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, _ContextmenuExposed } from "./types/contextmenu.js";
|
|
55
55
|
import { SelectEmits, SelectExposed, SelectProps, _SelectExposed } from "./types/select.js";
|
|
56
56
|
import { RadioEmits, RadioExposed, RadioProps, _RadioExposed } from "./types/radio.js";
|
|
57
57
|
import { CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxProps } from "./types/checkbox.js";
|
|
@@ -128,8 +128,8 @@ import { _default as _default$22 } from "./components/collapse/collapse-item.vue
|
|
|
128
128
|
import { _default as _default$25 } from "./components/date-panel/date-panel.vue.js";
|
|
129
129
|
import { _default as _default$76 } from "./components/table-editor/table-editor.vue.js";
|
|
130
130
|
import { _default as _default$16 } from "./components/check-tag/check-tag.vue.js";
|
|
131
|
-
import { _default as _default$24 } from "./components/
|
|
132
|
-
import { contextmenu } from "./components/
|
|
131
|
+
import { _default as _default$24 } from "./components/contextmenu/contextmenu.vue.js";
|
|
132
|
+
import { contextmenu } from "./components/contextmenu/api.js";
|
|
133
133
|
import { _default as _default$63 } from "./components/password-input/password-input.vue.js";
|
|
134
134
|
import { _default as _default$58 } from "./components/number/number.vue.js";
|
|
135
135
|
import { _default as _default$28 } from "./components/dialog/dialog.vue.js";
|
|
@@ -181,8 +181,8 @@ export * from "@veltra/utils";
|
|
|
181
181
|
|
|
182
182
|
//#region src/index.d.ts
|
|
183
183
|
declare namespace index_d_exports {
|
|
184
|
-
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, 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, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, EvaluateOptions as ConditionEvaluateOptions, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue,
|
|
184
|
+
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, 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, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, EvaluateOptions as ConditionEvaluateOptions, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, 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, DynamicFormModel, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormModel, FormModelField, 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, _default as MessageConfirm, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, ModelData, ModelRules, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NestedFieldMarker, NodeRenderExposed, NodeRenderProps, Notification, 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, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, 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, _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, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
|
|
185
185
|
}
|
|
186
186
|
//#endregion
|
|
187
|
-
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AllKeys, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextMenuEmits, type ContextMenuExposed, type ContextMenuItem, type ContextMenuProps, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DataSettingConfig, type DatePanelEmits, type DatePanelProps, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, DynamicFormModel, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, FormModel, type FormModelField, type FormModelItem, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type IFormModel, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type MenuEmits, type MenuExposed, type MenuItem, type MenuProps, type Message, _default as MessageConfirm, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type ModelData, type ModelRules, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NestedFieldMarker, type NodeRenderExposed, type NodeRenderProps, Notification, type NotificationEmits, type NotificationExposed, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextMenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextMenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MenuExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
|
|
187
|
+
export { type ActionEmits, type ActionExposed, type ActionGroupExposed, type ActionGroupProps, type ActionProps, type AllKeys, type AnimationEmits, type AnimationExposed, type AnimationProps, type AutoCompleteEmits, type AutoCompleteExposed, type AutoCompleteProps, type BadgeEmits, type BadgeExposed, type BadgeProps, type BarType, type BatchEditColumn, type BatchEditEmits, type BatchEditExposed, type BatchEditFeature, type BatchEditProps, type BreadcrumbEmits, type BreadcrumbExposed, type BreadcrumbItem, type BreadcrumbProps, type BreadcrumbSlotScope, type BreakCols, type Breakpoint, type ButtonEmits, type ButtonExposed, type ButtonProps, type ButtonType, type CalendarDay, type CalendarEmits, type CalendarExposed, type CalendarMonth, type CalendarProps, type CalendarYear, type CardActionProps, type CardContentProps, type CardCoverProps, type CardEmits, type CardExposed, type CardProps, type CascadeEmits, type CascadeExposed, type CascadeNode, type CascadeProps, type CheckTagEmits, type CheckTagExposed, type CheckTagProps, type CheckboxButtonEmits, type CheckboxButtonProps, type CheckboxEmits, type CheckboxExposed, type CheckboxGroupEmits, type CheckboxGroupExposed, type CheckboxGroupProps, type CheckboxProps, type CodeEditorEmits, type CodeEditorExposed, type CodeEditorLang, type CodeEditorProps, type CollapseEmits, type CollapseItemProps, type CollapseModelValue, type CollapseProps, type CollapseValue, type ConditionConnector, type ConditionEditorEmits, type ConditionEditorExposed, type ConditionEditorProps, type EvaluateOptions as ConditionEvaluateOptions, type ConditionExpression, type ConditionField, type ConditionGroup, type ConditionLeaf, type ConditionNode, type ConditionValue, type ContextmenuEmits, type ContextmenuExposed, type ContextmenuItem, type ContextmenuProps, type CssTransitionEmits, type CssTransitionExposed, type CssTransitionProps, type DataSettingConfig, type DatePanelEmits, type DatePanelProps, type DatePickerEmits, type DatePickerExposed, type DatePickerProps, type DateRangePickerEmits, type DateRangePickerExposed, type DateRangePickerProps, type DialogEmits, type DialogExposed, type DialogProps, type DrawerDirection, type DrawerEmits, type DrawerExposed, type DrawerMode, type DrawerProps, type DropdownEmits, type DropdownExposed, type DropdownProps, DynamicFormModel, type EmptyEmits, type EmptyExposed, type EmptyProps, type ExpressionEditorEmits, type ExpressionEditorExposed, type ExpressionEditorProps, type ExpressionSelectableLevels, type FileViewerEmits, type FileViewerExposed, type FileViewerItem, type FileViewerKind, type FileViewerProps, type FloatButtonEmits, type FloatButtonExposed, type FloatButtonItem, type FloatButtonProps, type FormExposed, type FormItemEmits, type FormItemExposed, type FormItemProps, FormModel, type FormModelField, type FormModelItem, type FormProps, type GanttChartEmits, type GanttChartExposed, type GanttChartProps, type GridEmits, type GridExposed, type GridInputEmits, type GridInputExposed, type GridInputProps, type GridItemProps, type GridProps, type GroupInputEmits, type GroupInputExposed, type GroupInputProps, type IFormModel, type IconEmits, type IconExposed, type IconProps, type InputEmits, type InputExposed, type InputProps, type LayoutEmits, type LayoutExposed, type LayoutProps, type ListEmits, type ListExposed, type ListProps, type LoadingEmits, type LoadingExposed, type LoadingProps, type LoadingType, type MenuEmits, type MenuExposed, type MenuItem, type MenuProps, type Message, _default as MessageConfirm, type MessageConfirmEmits, type MessageConfirmExposed, type MessageConfirmProps, type MessageEmits, type MessageExposed, type MessageInstance, type MessageOptions, type MessageProps, type MessageType, type ModelData, type ModelRules, type MultiAutoCompleteEmits, type MultiAutoCompleteExposed, type MultiAutoCompleteProps, type MultiSelectEmits, type MultiSelectExposed, type MultiSelectProps, type MultiTreeSelectEmits, type MultiTreeSelectExposed, type MultiTreeSelectProps, type NestedFieldMarker, type NodeRenderExposed, type NodeRenderProps, Notification, type NotificationEmits, type NotificationExposed, type NotificationProps, type NumberEmits, type NumberExposed, type NumberInputEmits, type NumberInputExposed, type NumberInputProps, type NumberProps, type NumberRangeInputEmits, type NumberRangeInputExposed, type NumberRangeInputProps, type NumberRangeTuple, type PaginatorEmits, type PaginatorExposed, type PaginatorProps, type PaletteColorType, type PaletteEmits, type PaletteExposed, type PaletteHSV, type PaletteProps, type PaletteRGB, type PanelItem, type PanelType, type PasswordInputEmits, type PasswordInputExposed, type PasswordInputProps, type PopConfirmEmits, type PopConfirmExposed, type PopConfirmProps, type PopEmits, type PopExposed, type PopProps, type ProgressEmits, type ProgressExposed, type ProgressNodesEmits, type ProgressNodesExposed, type ProgressNodesProps, type ProgressProps, type QuickBatchEditEmits, type QuickBatchEditExposed, type QuickBatchEditProps, type RadioEmits, type RadioExposed, type RadioGroupEmits, type RadioGroupExposed, type RadioGroupProps, type RadioProps, type RichTextEditorEmits, type RichTextEditorExposed, type RichTextEditorProps, type RichTextFormat, type ScrollEmits, type ScrollExposed, type ScrollPosition, type ScrollProps, type SelectEmits, type SelectExposed, type SelectProps, type SliderEmits, type SliderExposed, type SliderProps, type StepsEmits, type StepsExposed, type StepsProps, type StepsSlotScope, type SwitchEmits, type SwitchExposed, type SwitchProps, type TabItem, type TableColumn, type TableColumnAlign, type TableColumnNode, type TableColumnRenderContext, type TableColumnSlotsScope, type TableEditorEmits, type TableEditorExposed, type TableEditorProps, type TableEmits, type TableExposed, type TableProps, type TableRow, type TableRowSlotsScope, type TableSummaryContext, type TabsEmits, type TabsExposed, type TabsHorizontalEmits, type TabsHorizontalExposed, type TabsHorizontalProps, type TabsProps, type TabsVerticalEmits, type TabsVerticalExposed, type TabsVerticalProps, type TagEmits, type TagExposed, type TagProps, type TextEditorEmits, type TextEditorExposed, type TextEditorProps, type TextEmits, type TextExposed, type TextProps, type TextareaEmits, type TextareaExposed, type TextareaProps, type ThemeExposed, type ThemeProps, type TipAlign, type TipDirection, type TipEmits, type TipExposed, type TipProps, type ToolbarItem, type TreeEmit, type TreeExposed, type TreeNode, type TreeNodeProps, type TreeProps, type TreeSelectEmits, type TreeSelectExposed, type TreeSelectProps, _default$1 as UAction, _default$2 as UActionGroup, _default$3 as UAutoComplete, _default$4 as UBadge, _default$5 as UBatchEdit, _default$6 as UBreadcrumb, _default$7 as UButton, _default$8 as UButtonGroup, _default$9 as UCalendar, _default$10 as UCard, _default$11 as UCardAction, _default$12 as UCardContent, _default$13 as UCardCover, _default$14 as UCardHeader, _default$15 as UCascade, _default$16 as UCheckTag, _default$17 as UCheckbox, _default$18 as UCheckboxButton, _default$19 as UCheckboxGroup, _default$20 as UCodeEditor, _default$21 as UCollapse, _default$22 as UCollapseItem, _default$23 as UConditionEditor, _default$24 as UContextmenu, _default$25 as UDatePanel, _default$26 as UDatePicker, _default$27 as UDateRangePicker, _default$28 as UDialog, _default$29 as UDrawer, _default$30 as UDropdown, _default$31 as UEmpty, _default$32 as UExpressionEditor, _default$33 as UFilePicker, _default$34 as UFileViewer, _default$35 as UFloatButton, _default$36 as UForm, _default$37 as UFormItem, _default$38 as UGanttChart, _default$39 as UGrid, _default$40 as UGridInput, _default$41 as UGridItem, _default$42 as UGroupInput, _default$43 as UIcon, _default$44 as UInput, _default$45 as UKbd, _default$46 as ULayout, _default$47 as UList, _default$48 as UListItem, _default$49 as ULoading, _default$50 as UMenu, _default$51 as UMenuItem, _default$52 as UMenuSub, _default$53 as UMessage, _default$54 as UMessageConfirm, _default$55 as UMultiSelect, _default$56 as UMultiTreeSelect, NodeRender as UNodeRender, _default$57 as UNotification, _default$58 as UNumber, _default$59 as UNumberInput, _default$60 as UNumberRangeInput, _default$61 as UPaginator, _default$62 as UPalette, _default$63 as UPasswordInput, _default$64 as UPopConfirm, _default$65 as UProgress, _default$66 as UProgressNodes, _default$67 as URadio, _default$68 as URadioGroup, _default$69 as URichTextEditor, _default$70 as UScroll, _default$71 as USelect, _default$72 as USlider, _default$73 as USteps, _default$74 as USwitch, _default$75 as UTable, _default$76 as UTableEditor, _default$77 as UTabs, _default$78 as UTabsHorizontal, _default$79 as UTabsVertical, _default$80 as UTag, _default$81 as UText, _default$82 as UTextarea, _default$83 as UTheme, _default$84 as UTip, _default$85 as UTree, _default$86 as UTreeSelect, _default$87 as UWatermark, type UploaderEmits, type UploaderExposed, type UploaderProps, type VariableItem, type WatermarkEmits, type WatermarkExposed, type WatermarkProps, type _ActionExposed, type _ActionGroupExposed, type _AnimationExposed, type _AutoCompleteExposed, type _BadgeExposed, type _BatchEditExposed, type _BreadcrumbExposed, type _ButtonExposed, type _CalendarExposed, type _CardExposed, type _CascadeExposed, type _CheckTagExposed, type _CodeEditorExposed, type _ConditionEditorExposed, type _ContextmenuExposed, type _CssTransitionExposed, type _DatePickerExposed, type _DateRangePickerExposed, type _DialogExposed, type _DrawerExposed, type _DropdownExposed, type _EmptyExposed, type _ExpressionEditorExposed, type _FileViewerExposed, type _FloatButtonExposed, type _FormExposed, type _GanttChartExposed, type _GridExposed, type _GridInputExposed, type _GroupInputExposed, type _InputExposed, type _LayoutExposed, type _ListExposed, type _LoadingExposed, type _MenuExposed, type _MessageConfirmExposed, type _MessageExposed, type _MultiAutoCompleteExposed, type _MultiSelectExposed, type _MultiTreeSelectExposed, type _NotificationExposed, type _PaginatorExposed, type _PaletteExposed, type _PasswordInputExposed, type _PopConfirmExposed, type _PopExposed, type _ProgressExposed, type _ProgressNodesExposed, type _QuickBatchEditExposed, type _RadioExposed, type _RadioGroupExposed, type _RichTextEditorExposed, type _ScrollExposed, type _SelectExposed, type _SliderExposed, type _StepsExposed, type _SwitchExposed, type _TableEditorExposed, type _TableExposed, type _TabsExposed, type _TabsHorizontalExposed, type _TabsVerticalExposed, type _TextEditorExposed, type _TextExposed, type _TextareaExposed, type _ThemeExposed, type _TipExposed, type _TreeExposed, type _TreeSelectExposed, type _UploaderExposed, type _WatermarkExposed, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
|
|
188
188
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -60,8 +60,8 @@ import { defineTableColumns } from "./components/table/use-columns.js";
|
|
|
60
60
|
import _sfc_main$70 from "./components/table/table.js";
|
|
61
61
|
import _sfc_main$71 from "./components/table-editor/table-editor.js";
|
|
62
62
|
import _sfc_main$14 from "./components/check-tag/check-tag.js";
|
|
63
|
-
import _sfc_main$22 from "./components/
|
|
64
|
-
import { contextmenu } from "./components/
|
|
63
|
+
import _sfc_main$22 from "./components/contextmenu/contextmenu.js";
|
|
64
|
+
import { contextmenu } from "./components/contextmenu/api.js";
|
|
65
65
|
import _sfc_main$58 from "./components/password-input/password-input.js";
|
|
66
66
|
import _sfc_main$53 from "./components/number/number.js";
|
|
67
67
|
import _sfc_main$26 from "./components/dialog/dialog.js";
|
|
@@ -97,4 +97,4 @@ import _sfc_main$4 from "./components/breadcrumb/breadcrumb.js";
|
|
|
97
97
|
import _sfc_main$56 from "./components/paginator/paginator.js";
|
|
98
98
|
import _sfc_main$33 from "./components/float-button/float-button.js";
|
|
99
99
|
import _sfc_main$2 from "./components/badge/badge.js";
|
|
100
|
-
export { DynamicFormModel, FormModel, MessageConfirm, Notification, _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
|
|
100
|
+
export { DynamicFormModel, FormModel, MessageConfirm, Notification, _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 UEmpty, _sfc_main$30 as UExpressionEditor, _sfc_main$31 as UFilePicker, _sfc_main$32 as UFileViewer, _sfc_main$33 as UFloatButton, form_default as UForm, form_item_default as UFormItem, _sfc_main$34 as UGanttChart, _sfc_main$35 as UGrid, _sfc_main$36 as UGridInput, _sfc_main$37 as UGridItem, _sfc_main$38 as UGroupInput, _sfc_main$39 as UIcon, input_default as UInput, _sfc_main$40 as UKbd, _sfc_main$41 as ULayout, _sfc_main$42 as UList, _sfc_main$43 as UListItem, _sfc_main$44 as ULoading, _sfc_main$45 as UMenu, _sfc_main$46 as UMenuItem, _sfc_main$47 as UMenuSub, _sfc_main$48 as UMessage, _sfc_main$49 as UMessageConfirm, _sfc_main$50 as UMultiSelect, _sfc_main$51 as UMultiTreeSelect, NodeRender as UNodeRender, _sfc_main$52 as UNotification, _sfc_main$53 as UNumber, _sfc_main$54 as UNumberInput, _sfc_main$55 as UNumberRangeInput, _sfc_main$56 as UPaginator, _sfc_main$57 as UPalette, _sfc_main$58 as UPasswordInput, _sfc_main$59 as UPopConfirm, _sfc_main$60 as UProgress, _sfc_main$61 as UProgressNodes, _sfc_main$62 as URadio, _sfc_main$63 as URadioGroup, _sfc_main$64 as URichTextEditor, _sfc_main$65 as UScroll, _sfc_main$66 as USelect, _sfc_main$67 as USlider, _sfc_main$68 as USteps, _sfc_main$69 as USwitch, _sfc_main$70 as UTable, _sfc_main$71 as UTableEditor, _sfc_main$72 as UTabs, _sfc_main$73 as UTabsHorizontal, _sfc_main$74 as UTabsVertical, _sfc_main$75 as UTag, _sfc_main$76 as UText, _sfc_main$77 as UTextarea, _sfc_main$78 as UTheme, _sfc_main$79 as UTip, _sfc_main$80 as UTree, _sfc_main$81 as UTreeSelect, _sfc_main$82 as UWatermark, contextmenu, createEmptyGroup, createEmptyLeaf, defineBatchEditColumns, defineTableColumns, evaluate as evaluateConditionExpression, formField, message, nestField, vLoading };
|
package/dist/style.js
CHANGED
|
@@ -30,7 +30,7 @@ import "./components/collapse/style.js";
|
|
|
30
30
|
import "./components/select/style.js";
|
|
31
31
|
import "./components/expression-editor/style.js";
|
|
32
32
|
import "./components/condition-editor/style.js";
|
|
33
|
-
import "./components/
|
|
33
|
+
import "./components/contextmenu/style.js";
|
|
34
34
|
import "./components/date-panel/style.js";
|
|
35
35
|
import "./components/date-picker/style.js";
|
|
36
36
|
import "./components/date-range-picker/style.js";
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { Component } from "vue";
|
|
2
2
|
import { ComponentProps, DeconstructValue } from "@veltra/utils";
|
|
3
3
|
|
|
4
|
-
//#region src/types/
|
|
4
|
+
//#region src/types/contextmenu.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* 右键菜单项
|
|
7
7
|
*/
|
|
8
|
-
interface
|
|
8
|
+
interface ContextmenuItem {
|
|
9
9
|
/** 菜单名称 */
|
|
10
10
|
label: string;
|
|
11
11
|
/** 菜单描述 */
|
|
12
12
|
description?: string;
|
|
13
13
|
/** 菜单图标 */
|
|
14
14
|
icon?: Component;
|
|
15
|
+
/** 子菜单 */
|
|
16
|
+
children?: ContextmenuItem[];
|
|
15
17
|
/** 菜单点击时的回调 */
|
|
16
|
-
callback?: () =>
|
|
18
|
+
callback?: () => any;
|
|
17
19
|
/** 是否禁用 */
|
|
18
20
|
disabled?: boolean | (() => boolean);
|
|
19
21
|
}
|
|
20
22
|
/** 鼠标右键菜单组件属性 */
|
|
21
|
-
interface
|
|
23
|
+
interface ContextmenuProps extends ComponentProps {
|
|
22
24
|
/** 鼠标位置 */
|
|
23
25
|
mousePosition: {
|
|
24
26
|
x: number;
|
|
@@ -30,16 +32,16 @@ interface ContextMenuProps extends ComponentProps {
|
|
|
30
32
|
*/
|
|
31
33
|
width?: number | string;
|
|
32
34
|
/** 菜单项 */
|
|
33
|
-
menus:
|
|
35
|
+
menus: ContextmenuItem[] | (() => ContextmenuItem[]);
|
|
34
36
|
}
|
|
35
37
|
/** 鼠标右键菜单组件定义的事件 */
|
|
36
|
-
interface
|
|
38
|
+
interface ContextmenuEmits {
|
|
37
39
|
(e: 'destroy'): void;
|
|
38
40
|
}
|
|
39
41
|
/** 鼠标右键菜单组件暴露的属性和方法(组件内部使用) */
|
|
40
|
-
interface
|
|
42
|
+
interface _ContextmenuExposed {}
|
|
41
43
|
/** 鼠标右键菜单组件暴露的属性和方法(组件外部使用, 引用的值会被自动解构) */
|
|
42
|
-
type
|
|
44
|
+
type ContextmenuExposed = DeconstructValue<_ContextmenuExposed>;
|
|
43
45
|
//#endregion
|
|
44
|
-
export {
|
|
45
|
-
//# sourceMappingURL=
|
|
46
|
+
export { ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, _ContextmenuExposed };
|
|
47
|
+
//# sourceMappingURL=contextmenu.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ import { MenuEmits, MenuExposed, MenuItem, MenuProps, _MenuExposed } from "./men
|
|
|
50
50
|
import { PasswordInputEmits, PasswordInputExposed, PasswordInputProps, _PasswordInputExposed } from "./password-input.js";
|
|
51
51
|
import { DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./date-picker.js";
|
|
52
52
|
import { DropdownEmits, DropdownExposed, DropdownProps, _DropdownExposed } from "./dropdown.js";
|
|
53
|
-
import {
|
|
53
|
+
import { ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, _ContextmenuExposed } from "./contextmenu.js";
|
|
54
54
|
import { SelectEmits, SelectExposed, SelectProps, _SelectExposed } from "./select.js";
|
|
55
55
|
import { RadioEmits, RadioExposed, RadioProps, _RadioExposed } from "./radio.js";
|
|
56
56
|
import { CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxProps } from "./checkbox.js";
|
|
@@ -81,7 +81,7 @@ export type * from "@veltra/utils";
|
|
|
81
81
|
|
|
82
82
|
//#region src/types/index.d.ts
|
|
83
83
|
declare namespace index_d_exports {
|
|
84
|
-
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, 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, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue,
|
|
84
|
+
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AllKeys, 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, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, 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, FormModelField, 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, _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.32",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src"
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"@cat-kit/core": ">=1.1.6",
|
|
69
69
|
"@cat-kit/excel": ">=1.0.0",
|
|
70
70
|
"@cat-kit/fe": "^1.1.6",
|
|
71
|
-
"@veltra/compositions": "1.1.
|
|
72
|
-
"@veltra/directives": "1.1.
|
|
73
|
-
"@veltra/icons": "1.1.
|
|
74
|
-
"@veltra/styles": "1.1.
|
|
75
|
-
"@veltra/utils": "1.1.
|
|
71
|
+
"@veltra/compositions": "1.1.32",
|
|
72
|
+
"@veltra/directives": "1.1.32",
|
|
73
|
+
"@veltra/icons": "1.1.32",
|
|
74
|
+
"@veltra/styles": "1.1.32",
|
|
75
|
+
"@veltra/utils": "1.1.32",
|
|
76
76
|
"vue": ">=3.5.0"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { createVNode, render, type VNode } from 'vue'
|
|
2
2
|
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
3
|
+
import type { ContextmenuProps } from '../../types'
|
|
4
|
+
import UContextmenu from './contextmenu.vue'
|
|
5
5
|
|
|
6
6
|
let node: VNode
|
|
7
7
|
|
|
8
8
|
export const contextmenu = {
|
|
9
|
-
pop(options:
|
|
9
|
+
pop(options: ContextmenuProps): void {
|
|
10
10
|
if (node) {
|
|
11
11
|
render(null, document.body)
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
node = createVNode(
|
|
14
|
+
node = createVNode(UContextmenu, {
|
|
15
15
|
...options,
|
|
16
16
|
onDestroy() {
|
|
17
17
|
render(null, document.body)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
:class="[cls.e('item'), bem.is('disabled', disabled), bem.is('loading', loading)]"
|
|
4
|
+
v-ripple="!disabled && !loading"
|
|
5
|
+
@click="handleClickMenu"
|
|
6
|
+
>
|
|
7
|
+
<div :class="cls.e('item-content')">
|
|
8
|
+
<template v-if="showIconColumn">
|
|
9
|
+
<u-icon v-if="loading" :class="bem.is('loading')">
|
|
10
|
+
<Loading />
|
|
11
|
+
</u-icon>
|
|
12
|
+
<u-icon v-else-if="menu.icon">
|
|
13
|
+
<component :is="menu.icon" />
|
|
14
|
+
</u-icon>
|
|
15
|
+
<i v-else :class="cls.e('icon-place')"></i>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<span :class="cls.e('label')">{{ menu.label }}</span>
|
|
19
|
+
|
|
20
|
+
<i v-if="showArrowColumn" :class="cls.e('arrow-place')"></i>
|
|
21
|
+
</div>
|
|
22
|
+
</li>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { vRipple } from '@veltra/directives'
|
|
27
|
+
import { Loading } from '@veltra/icons/normal'
|
|
28
|
+
import { bem } from '@veltra/utils'
|
|
29
|
+
import { computed, inject, shallowRef } from 'vue'
|
|
30
|
+
|
|
31
|
+
import type { ContextmenuItem } from '../../types'
|
|
32
|
+
import { UIcon } from '../icon'
|
|
33
|
+
import { ContextmenuPanelDIKey, ContextmenuRootDIKey } from './di'
|
|
34
|
+
import { getMenuDisabled } from './helper'
|
|
35
|
+
|
|
36
|
+
defineOptions({ name: 'ContextmenuItem' })
|
|
37
|
+
|
|
38
|
+
const { menu } = defineProps<{ menu: ContextmenuItem }>()
|
|
39
|
+
|
|
40
|
+
const { cls, onItemClickStart, onItemClickEnd } = inject(ContextmenuRootDIKey)!
|
|
41
|
+
const { showIconColumn, showArrowColumn } = inject(ContextmenuPanelDIKey)!
|
|
42
|
+
|
|
43
|
+
const loading = shallowRef(false)
|
|
44
|
+
const disabled = computed(() => getMenuDisabled(menu))
|
|
45
|
+
|
|
46
|
+
function handleClickMenu() {
|
|
47
|
+
if (disabled.value || loading.value) return
|
|
48
|
+
onItemClickStart()
|
|
49
|
+
loading.value = true
|
|
50
|
+
|
|
51
|
+
const done = () => {
|
|
52
|
+
onItemClickEnd()
|
|
53
|
+
loading.value = false
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const result = menu.callback?.()
|
|
57
|
+
if (result instanceof Promise) {
|
|
58
|
+
result.finally(done)
|
|
59
|
+
} else {
|
|
60
|
+
done()
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</script>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<ul v-bind="$attrs">
|
|
3
|
+
<template v-for="(menu, index) of menus" :key="index">
|
|
4
|
+
<UContextmenuSub v-if="menu.children?.length" :menu="menu" />
|
|
5
|
+
<UContextmenuItem v-else :menu="menu" />
|
|
6
|
+
</template>
|
|
7
|
+
</ul>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
import { computed, inject, provide } from 'vue'
|
|
12
|
+
|
|
13
|
+
import type { ContextmenuItem } from '../../types'
|
|
14
|
+
import UContextmenuItem from './contextmenu-item.vue'
|
|
15
|
+
import UContextmenuSub from './contextmenu-sub.vue'
|
|
16
|
+
import { ContextmenuPanelDIKey, ContextmenuRootDIKey } from './di'
|
|
17
|
+
|
|
18
|
+
defineOptions({ name: 'ContextmenuPanel', inheritAttrs: false })
|
|
19
|
+
|
|
20
|
+
const { menus } = defineProps<{ menus: ContextmenuItem[] }>()
|
|
21
|
+
|
|
22
|
+
inject(ContextmenuRootDIKey)
|
|
23
|
+
|
|
24
|
+
const showIconColumn = computed(() => menus.some((menu) => !!menu.icon))
|
|
25
|
+
const showArrowColumn = computed(() => menus.some((menu) => !!menu.children?.length))
|
|
26
|
+
|
|
27
|
+
provide(ContextmenuPanelDIKey, { showIconColumn, showArrowColumn })
|
|
28
|
+
</script>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<li
|
|
3
|
+
:class="[
|
|
4
|
+
cls.e('item'),
|
|
5
|
+
bem.is('disabled', disabled),
|
|
6
|
+
bem.is('open', subVisible),
|
|
7
|
+
bem.is('flip-x', flipX)
|
|
8
|
+
]"
|
|
9
|
+
@mouseenter="handleMouseEnter"
|
|
10
|
+
@mouseleave="scheduleClose"
|
|
11
|
+
>
|
|
12
|
+
<div :class="cls.e('item-content')">
|
|
13
|
+
<template v-if="showIconColumn">
|
|
14
|
+
<u-icon v-if="menu.icon">
|
|
15
|
+
<component :is="menu.icon" />
|
|
16
|
+
</u-icon>
|
|
17
|
+
<i v-else :class="cls.e('icon-place')"></i>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<span :class="cls.e('label')">{{ menu.label }}</span>
|
|
21
|
+
|
|
22
|
+
<u-icon v-if="showArrowColumn" :class="cls.e('arrow')">
|
|
23
|
+
<ArrowRight />
|
|
24
|
+
</u-icon>
|
|
25
|
+
<i v-else :class="cls.e('arrow-place')"></i>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<UContextmenuPanel
|
|
29
|
+
v-show="subVisible"
|
|
30
|
+
:menus="menu.children!"
|
|
31
|
+
:class="[cls.e('sub'), bem.is('flip-x', flipX)]"
|
|
32
|
+
@mouseenter="cancelClose"
|
|
33
|
+
@mouseleave="scheduleClose"
|
|
34
|
+
/>
|
|
35
|
+
</li>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script lang="ts" setup>
|
|
39
|
+
import { ArrowRight } from '@veltra/icons/normal'
|
|
40
|
+
import { bem } from '@veltra/utils'
|
|
41
|
+
import { computed, inject, nextTick, onBeforeUnmount, shallowRef } from 'vue'
|
|
42
|
+
|
|
43
|
+
import type { ContextmenuItem } from '../../types'
|
|
44
|
+
import { UIcon } from '../icon'
|
|
45
|
+
import UContextmenuPanel from './contextmenu-panel.vue'
|
|
46
|
+
import { ContextmenuPanelDIKey, ContextmenuRootDIKey } from './di'
|
|
47
|
+
import { getMenuDisabled } from './helper'
|
|
48
|
+
|
|
49
|
+
defineOptions({ name: 'ContextmenuSub' })
|
|
50
|
+
|
|
51
|
+
const { menu } = defineProps<{ menu: ContextmenuItem }>()
|
|
52
|
+
|
|
53
|
+
const { cls } = inject(ContextmenuRootDIKey)!
|
|
54
|
+
const { showIconColumn, showArrowColumn } = inject(ContextmenuPanelDIKey)!
|
|
55
|
+
|
|
56
|
+
const subVisible = shallowRef(false)
|
|
57
|
+
const flipX = shallowRef(false)
|
|
58
|
+
|
|
59
|
+
let closeTimer: ReturnType<typeof setTimeout> | undefined
|
|
60
|
+
|
|
61
|
+
const disabled = computed(() => getMenuDisabled(menu))
|
|
62
|
+
|
|
63
|
+
function cancelClose() {
|
|
64
|
+
if (closeTimer !== undefined) {
|
|
65
|
+
clearTimeout(closeTimer)
|
|
66
|
+
closeTimer = undefined
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function scheduleClose() {
|
|
71
|
+
cancelClose()
|
|
72
|
+
closeTimer = setTimeout(() => {
|
|
73
|
+
subVisible.value = false
|
|
74
|
+
}, 250)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function handleMouseEnter(e: MouseEvent) {
|
|
78
|
+
if (disabled.value) return
|
|
79
|
+
cancelClose()
|
|
80
|
+
subVisible.value = true
|
|
81
|
+
nextTick(() => {
|
|
82
|
+
const panel = (e.currentTarget as HTMLElement).querySelector<HTMLElement>(`.${cls.e('sub')}`)
|
|
83
|
+
if (panel) flipX.value = panel.getBoundingClientRect().right > window.innerWidth
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
onBeforeUnmount(cancelClose)
|
|
88
|
+
</script>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<transition name="zoom-in" appear @after-leave="emit('destroy')">
|
|
4
|
+
<UContextmenuPanel
|
|
5
|
+
v-if="visible"
|
|
6
|
+
:menus="menus"
|
|
7
|
+
:class="[cls.b, cls.m(size)]"
|
|
8
|
+
:style="style"
|
|
9
|
+
v-click-outside="handleClickOutside"
|
|
10
|
+
/>
|
|
11
|
+
</transition>
|
|
12
|
+
</Teleport>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import { useFallbackProps } from '@veltra/compositions'
|
|
17
|
+
import { vClickOutside } from '@veltra/directives'
|
|
18
|
+
import { bem, withUnit, zIndex } from '@veltra/utils'
|
|
19
|
+
import { computed, provide, shallowRef, type CSSProperties } from 'vue'
|
|
20
|
+
|
|
21
|
+
import type { ContextmenuEmits, ContextmenuProps, ComponentSize } from '../../types'
|
|
22
|
+
import UContextmenuPanel from './contextmenu-panel.vue'
|
|
23
|
+
import { ContextmenuRootDIKey } from './di'
|
|
24
|
+
|
|
25
|
+
defineOptions({ name: 'Contextmenu' })
|
|
26
|
+
|
|
27
|
+
const props = withDefaults(defineProps<ContextmenuProps>(), { width: 150 })
|
|
28
|
+
|
|
29
|
+
const emit = defineEmits<ContextmenuEmits>()
|
|
30
|
+
|
|
31
|
+
const { size } = useFallbackProps([props], { size: 'default' as ComponentSize })
|
|
32
|
+
|
|
33
|
+
const cls = bem('contextmenu')
|
|
34
|
+
|
|
35
|
+
const visible = shallowRef(true)
|
|
36
|
+
|
|
37
|
+
const style = computed<CSSProperties>(() => {
|
|
38
|
+
const { x, y } = props.mousePosition
|
|
39
|
+
const flipX = x > window.innerWidth / 2
|
|
40
|
+
const flipY = y > window.innerHeight / 2
|
|
41
|
+
return {
|
|
42
|
+
width: withUnit(props.width, 'px'),
|
|
43
|
+
zIndex: zIndex(),
|
|
44
|
+
...(flipX
|
|
45
|
+
? { right: withUnit(window.innerWidth - x - 1, 'px') }
|
|
46
|
+
: { left: withUnit(x + 1, 'px') }),
|
|
47
|
+
...(flipY
|
|
48
|
+
? { bottom: withUnit(window.innerHeight - y - 1, 'px') }
|
|
49
|
+
: { top: withUnit(y + 1, 'px') }),
|
|
50
|
+
transformOrigin: `${flipY ? 'bottom' : 'top'} ${flipX ? 'right' : 'left'}`
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
const menus = computed(() => (typeof props.menus === 'function' ? props.menus() : props.menus))
|
|
55
|
+
|
|
56
|
+
function close() {
|
|
57
|
+
visible.value = false
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let loading = false
|
|
61
|
+
|
|
62
|
+
provide(ContextmenuRootDIKey, {
|
|
63
|
+
cls,
|
|
64
|
+
onItemClickStart: () => {
|
|
65
|
+
loading = true
|
|
66
|
+
},
|
|
67
|
+
onItemClickEnd: () => {
|
|
68
|
+
loading = false
|
|
69
|
+
close()
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
function handleClickOutside() {
|
|
74
|
+
if (loading) return
|
|
75
|
+
close()
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BEM } from '@veltra/utils'
|
|
2
|
+
import type { ComputedRef, InjectionKey } from 'vue'
|
|
3
|
+
|
|
4
|
+
export const ContextmenuRootDIKey: InjectionKey<{
|
|
5
|
+
cls: BEM<'contextmenu'>
|
|
6
|
+
onItemClickStart: () => void
|
|
7
|
+
onItemClickEnd: () => void
|
|
8
|
+
}> = Symbol('ContextmenuRootDIKey')
|
|
9
|
+
|
|
10
|
+
export const ContextmenuPanelDIKey: InjectionKey<{
|
|
11
|
+
showIconColumn: ComputedRef<boolean>
|
|
12
|
+
showArrowColumn: ComputedRef<boolean>
|
|
13
|
+
}> = Symbol('ContextmenuPanelDIKey')
|