@veltra/desktop 1.7.3 → 1.7.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/auto-complete/style2.css +7 -6
- package/dist/components/breadcrumb/style2.css +1 -1
- package/dist/components/calendar/utils.js +5 -5
- package/dist/components/calendar/utils.js.map +1 -1
- package/dist/components/card/style2.css +2 -2
- package/dist/components/condition-editor/style2.css +4 -4
- package/dist/components/contextmenu/style2.css +7 -7
- package/dist/components/date-picker/date-picker.js +27 -4
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/dual-nav/style2.css +1 -1
- package/dist/components/expression-editor/style2.css +1 -1
- package/dist/components/number-range-input/style2.css +1 -1
- package/dist/components/progress-nodes/style2.css +2 -2
- package/dist/components/rich-text-editor/style2.css +12 -12
- package/dist/components/select/style2.css +4 -4
- package/dist/components/tabs/style2.css +1 -1
- package/dist/components/tree/style2.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/types/date-panel.d.ts +1 -1
- package/dist/types/date-picker.d.ts +10 -2
- package/dist/types/date-range-picker.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +6 -6
- package/src/components/auto-complete/style.scss +31 -6
- package/src/components/breadcrumb/style.scss +1 -1
- package/src/components/calendar/utils.ts +8 -8
- package/src/components/card/style.scss +2 -2
- package/src/components/condition-editor/style.scss +4 -4
- package/src/components/contextmenu/style.scss +25 -5
- package/src/components/date-picker/__test__/date-picker.test.ts +235 -0
- package/src/components/date-picker/date-picker.vue +33 -3
- package/src/components/dual-nav/style.scss +1 -1
- package/src/components/expression-editor/style.scss +1 -1
- package/src/components/number-range-input/style.scss +1 -1
- package/src/components/progress-nodes/style.scss +3 -3
- package/src/components/rich-text-editor/style.scss +12 -12
- package/src/components/select/style.scss +20 -4
- package/src/components/tabs/style.scss +1 -1
- package/src/components/tree/style.scss +1 -1
- package/src/types/date-panel.ts +1 -1
- package/src/types/date-picker.ts +10 -1
- package/src/types/date-range-picker.ts +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ import { NavEmits, NavExposed, NavItem, NavProps, _NavExposed } from "./nav.js";
|
|
|
50
50
|
import { DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, _DualNavExposed } from "./dual-nav.js";
|
|
51
51
|
import { GroupNavEmits, GroupNavGroup, GroupNavProps } from "./group-nav.js";
|
|
52
52
|
import { PasswordInputEmits, PasswordInputExposed, PasswordInputProps, _PasswordInputExposed } from "./password-input.js";
|
|
53
|
-
import { DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./date-picker.js";
|
|
53
|
+
import { DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, _DatePickerExposed } from "./date-picker.js";
|
|
54
54
|
import { DropdownEmits, DropdownExposed, DropdownProps, _DropdownExposed } from "./dropdown.js";
|
|
55
55
|
import { ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, _ContextmenuExposed } from "./contextmenu.js";
|
|
56
56
|
import { SelectEmits, SelectExposed, SelectProps, _SelectExposed } from "./select.js";
|
|
@@ -81,4 +81,4 @@ import { FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, Fil
|
|
|
81
81
|
import { CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue } from "./collapse.js";
|
|
82
82
|
import { SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, _SegmentExposed } from "./segment.js";
|
|
83
83
|
export type * from "@veltra/utils";
|
|
84
|
-
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditFormStatus, BatchEditProps, BatchEditSlots, BatchEditStates, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DatePanelEmits, DatePanelProps, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormEmits, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, GroupNavEmits, GroupNavGroup, GroupNavProps, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, Message, MessageConfirm, MessageConfirmAction, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmInstance, MessageConfirmOptions, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NavEmits, NavExposed, NavItem, NavProps, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationInstance, NotificationOptions, NotificationPosition, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, 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, _DualNavExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NavExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SegmentExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
|
84
|
+
export { ActionEmits, ActionExposed, ActionGroupExposed, ActionGroupProps, ActionProps, AnimationEmits, AnimationExposed, AnimationProps, AutoCompleteEmits, AutoCompleteExposed, AutoCompleteProps, BadgeEmits, BadgeExposed, BadgeProps, BarType, BatchEditColumn, BatchEditEmits, BatchEditExposed, BatchEditFeature, BatchEditFormStatus, BatchEditProps, BatchEditSlots, BatchEditStates, BreadcrumbEmits, BreadcrumbExposed, BreadcrumbItem, BreadcrumbProps, BreadcrumbSlotScope, BreakCols, Breakpoint, ButtonEmits, ButtonExposed, ButtonProps, ButtonType, CalendarDay, CalendarEmits, CalendarExposed, CalendarMonth, CalendarProps, CalendarYear, CardActionProps, CardContentProps, CardCoverProps, CardEmits, CardExposed, CardProps, CascadeEmits, CascadeExposed, CascadeNode, CascadeProps, CheckTagEmits, CheckTagExposed, CheckTagProps, CheckboxButtonEmits, CheckboxButtonProps, CheckboxEmits, CheckboxExposed, CheckboxGroupEmits, CheckboxGroupExposed, CheckboxGroupProps, CheckboxProps, CodeEditorEmits, CodeEditorExposed, CodeEditorLang, CodeEditorProps, CollapseEmits, CollapseItemEmits, CollapseItemProps, CollapseModelValue, CollapseProps, CollapseValue, ConditionConnector, ConditionEditorEmits, ConditionEditorExposed, ConditionEditorProps, ConditionExpression, ConditionField, ConditionGroup, ConditionLeaf, ConditionNode, ConditionValue, ContextmenuEmits, ContextmenuExposed, ContextmenuItem, ContextmenuProps, CssTransitionEmits, CssTransitionExposed, CssTransitionProps, DatePanelEmits, DatePanelProps, DatePickerDataType, DatePickerEmits, DatePickerExposed, DatePickerProps, DateRangePickerEmits, DateRangePickerExposed, DateRangePickerProps, DialogEmits, DialogExposed, DialogProps, DialogTransition, DrawerDirection, DrawerEmits, DrawerExposed, DrawerMode, DrawerProps, DropdownEmits, DropdownExposed, DropdownProps, DualNavEmits, DualNavExposed, DualNavProps, DualNavRailVariant, DualNavRootItem, EmptyEmits, EmptyExposed, EmptyProps, ExpressionEditorEmits, ExpressionEditorExposed, ExpressionEditorProps, ExpressionSelectableLevels, FileViewerEmits, FileViewerExposed, FileViewerItem, FileViewerKind, FileViewerProps, FloatButtonEmits, FloatButtonExposed, FloatButtonItem, FloatButtonProps, FormEmits, FormExposed, FormItemEmits, FormItemExposed, FormItemProps, FormProps, GanttChartEmits, GanttChartExposed, GanttChartProps, GridEmits, GridExposed, GridInputEmits, GridInputExposed, GridInputProps, GridItemProps, GridProps, GroupInputEmits, GroupInputExposed, GroupInputProps, GroupNavEmits, GroupNavGroup, GroupNavProps, IconEmits, IconExposed, IconProps, InputEmits, InputExposed, InputProps, LayoutEmits, LayoutExposed, LayoutProps, ListEmits, ListExposed, ListProps, LoadingEmits, LoadingExposed, LoadingProps, LoadingType, Message, MessageConfirm, MessageConfirmAction, MessageConfirmEmits, MessageConfirmExposed, MessageConfirmInstance, MessageConfirmOptions, MessageConfirmProps, MessageEmits, MessageExposed, MessageInstance, MessageOptions, MessageProps, MessageType, MultiAutoCompleteEmits, MultiAutoCompleteExposed, MultiAutoCompleteProps, MultiSelectEmits, MultiSelectExposed, MultiSelectProps, MultiTreeSelectEmits, MultiTreeSelectExposed, MultiTreeSelectProps, NavEmits, NavExposed, NavItem, NavProps, NodeRenderExposed, NodeRenderProps, Notification, NotificationEmits, NotificationExposed, NotificationInstance, NotificationOptions, NotificationPosition, NotificationProps, NumberEmits, NumberExposed, NumberInputEmits, NumberInputExposed, NumberInputProps, NumberProps, NumberRangeInputEmits, NumberRangeInputExposed, NumberRangeInputProps, NumberRangeTuple, PaginatorEmits, PaginatorExposed, PaginatorProps, PaletteColorType, PaletteEmits, PaletteExposed, PaletteHSV, PaletteProps, PaletteRGB, PanelItem, PanelType, PasswordInputEmits, PasswordInputExposed, PasswordInputProps, PopConfirmEmits, PopConfirmExposed, PopConfirmProps, PopEmits, PopExposed, PopProps, ProgressEmits, ProgressExposed, ProgressNodesEmits, ProgressNodesExposed, ProgressNodesProps, ProgressProps, QuickBatchEditEmits, QuickBatchEditExposed, QuickBatchEditProps, RadioEmits, RadioExposed, RadioGroupEmits, RadioGroupExposed, RadioGroupProps, RadioProps, RichTextEditorEmits, RichTextEditorExposed, RichTextEditorProps, RichTextFormat, ScrollEmits, ScrollExposed, ScrollPosition, ScrollProps, SegmentEmits, SegmentExposed, SegmentItem, SegmentProps, SelectEmits, SelectExposed, SelectProps, SliderEmits, SliderExposed, SliderProps, StepsEmits, StepsExposed, StepsProps, StepsSlotScope, SwitchEmits, SwitchExposed, SwitchProps, TabItem, TableColumn, TableColumnAlign, TableColumnNode, TableColumnRenderContext, TableColumnSlotsScope, 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, _DualNavExposed, _EmptyExposed, _ExpressionEditorExposed, _FileViewerExposed, _FloatButtonExposed, _FormExposed, _GanttChartExposed, _GridExposed, _GridInputExposed, _GroupInputExposed, _InputExposed, _LayoutExposed, _ListExposed, _LoadingExposed, _MessageConfirmExposed, _MessageExposed, _MultiAutoCompleteExposed, _MultiSelectExposed, _MultiTreeSelectExposed, _NavExposed, _NotificationExposed, _PaginatorExposed, _PaletteExposed, _PasswordInputExposed, _PopConfirmExposed, _PopExposed, _ProgressExposed, _ProgressNodesExposed, _QuickBatchEditExposed, _RadioExposed, _RadioGroupExposed, _RichTextEditorExposed, _ScrollExposed, _SegmentExposed, _SelectExposed, _SliderExposed, _StepsExposed, _SwitchExposed, _TableEditorExposed, _TableExposed, _TabsExposed, _TabsHorizontalExposed, _TabsVerticalExposed, _TextEditorExposed, _TextExposed, _TextareaExposed, _ThemeExposed, _TipExposed, _TreeExposed, _TreeSelectExposed, _UploaderExposed, _WatermarkExposed };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veltra/desktop",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.5",
|
|
4
4
|
"homepage": "https://github.com/cabinet-fe/ultra-ui#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/cabinet-fe/ultra-ui/issues"
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@cat-kit/core": ">=1.2.1",
|
|
82
82
|
"@cat-kit/fe": ">=1.2.1",
|
|
83
|
-
"@veltra/compositions": "^1.7.
|
|
84
|
-
"@veltra/directives": "^1.7.
|
|
83
|
+
"@veltra/compositions": "^1.7.5",
|
|
84
|
+
"@veltra/directives": "^1.7.5",
|
|
85
85
|
"@veltra/icons": "^1.5.0",
|
|
86
|
-
"@veltra/sheet-core": "^2.5.
|
|
87
|
-
"@veltra/styles": "^1.7.
|
|
88
|
-
"@veltra/utils": "^1.7.
|
|
86
|
+
"@veltra/sheet-core": "^2.5.4",
|
|
87
|
+
"@veltra/styles": "^1.7.5",
|
|
88
|
+
"@veltra/utils": "^1.7.5",
|
|
89
89
|
"vue": ">=3.5.42"
|
|
90
90
|
},
|
|
91
91
|
"peerDependenciesMeta": {
|
|
@@ -29,21 +29,46 @@ $root-name: auto-complete;
|
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
margin: 2px 0;
|
|
31
31
|
user-select: none;
|
|
32
|
+
color: fn.use-var(text-color, main);
|
|
32
33
|
@include m.ellipsis;
|
|
33
34
|
|
|
34
35
|
&:hover {
|
|
35
|
-
background-color: var(
|
|
36
|
-
|
|
36
|
+
background-color: fn.component-var(
|
|
37
|
+
auto-complete,
|
|
38
|
+
option-hover-bg,
|
|
39
|
+
fn.use-var(bg-color, hover)
|
|
40
|
+
);
|
|
41
|
+
color: fn.component-var(
|
|
42
|
+
auto-complete,
|
|
43
|
+
option-hover-color,
|
|
44
|
+
fn.use-var(text-color, title)
|
|
45
|
+
);
|
|
37
46
|
}
|
|
38
47
|
|
|
39
48
|
@include m.is(active) {
|
|
40
|
-
background-color: var(
|
|
41
|
-
|
|
49
|
+
background-color: fn.component-var(
|
|
50
|
+
auto-complete,
|
|
51
|
+
option-hover-bg,
|
|
52
|
+
fn.use-var(bg-color, hover)
|
|
53
|
+
);
|
|
54
|
+
color: fn.component-var(
|
|
55
|
+
auto-complete,
|
|
56
|
+
option-hover-color,
|
|
57
|
+
fn.use-var(text-color, title)
|
|
58
|
+
);
|
|
42
59
|
}
|
|
43
60
|
|
|
44
61
|
@include m.is(selected) {
|
|
45
|
-
background-color: var(
|
|
46
|
-
|
|
62
|
+
background-color: fn.component-var(
|
|
63
|
+
auto-complete,
|
|
64
|
+
option-selected-bg,
|
|
65
|
+
fn.use-var(color, primary, light-9)
|
|
66
|
+
);
|
|
67
|
+
color: fn.component-var(
|
|
68
|
+
auto-complete,
|
|
69
|
+
option-selected-color,
|
|
70
|
+
fn.use-var(color, primary)
|
|
71
|
+
);
|
|
47
72
|
}
|
|
48
73
|
}
|
|
49
74
|
|
|
@@ -12,7 +12,7 @@ export const weekDays: string[] = ['日', '一', '二', '三', '四', '五', '
|
|
|
12
12
|
*/
|
|
13
13
|
export function getMonthDays(
|
|
14
14
|
d: Date | string | number | Dater,
|
|
15
|
-
disabledDate?: (d: Dater) => boolean
|
|
15
|
+
disabledDate?: (d: Dater, raw: Date) => boolean
|
|
16
16
|
): CalendarDay[] {
|
|
17
17
|
const todayStr = date().format()
|
|
18
18
|
if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {
|
|
@@ -24,7 +24,7 @@ export function getMonthDays(
|
|
|
24
24
|
const currentMonthDays: CalendarDay[] = Array.from({ length: d.getDays() }).map((_, i) => {
|
|
25
25
|
const day: CalendarDay = { date: d.calc(i, 'days'), type: 'current' }
|
|
26
26
|
day.isToday = day.date.format() === todayStr
|
|
27
|
-
day.disabled = disabledDate?.(day.date)
|
|
27
|
+
day.disabled = disabledDate?.(day.date, day.date.raw)
|
|
28
28
|
return day
|
|
29
29
|
})
|
|
30
30
|
|
|
@@ -41,7 +41,7 @@ export function getMonthDays(
|
|
|
41
41
|
let i = 0
|
|
42
42
|
while (i < firstDayWeek) {
|
|
43
43
|
const day: CalendarDay = { date: d.calc(-i, 'days'), type: 'pre' }
|
|
44
|
-
day.disabled = disabledDate?.(day.date)
|
|
44
|
+
day.disabled = disabledDate?.(day.date, day.date.raw)
|
|
45
45
|
preMonthDays.unshift(day)
|
|
46
46
|
i++
|
|
47
47
|
}
|
|
@@ -55,7 +55,7 @@ export function getMonthDays(
|
|
|
55
55
|
|
|
56
56
|
while (j < nextMonthDaysAmount) {
|
|
57
57
|
const day: CalendarDay = { date: d.calc(j++, 'days'), type: 'next' }
|
|
58
|
-
day.disabled = disabledDate?.(day.date)
|
|
58
|
+
day.disabled = disabledDate?.(day.date, day.date.raw)
|
|
59
59
|
nextMonthDays.push(day)
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ export function getMonthDays(
|
|
|
70
70
|
*/
|
|
71
71
|
export function getYearMonths(
|
|
72
72
|
d: Date | string | number | Dater,
|
|
73
|
-
disabledDate?: (d: Dater) => boolean
|
|
73
|
+
disabledDate?: (d: Dater, raw: Date) => boolean
|
|
74
74
|
): CalendarMonth[] {
|
|
75
75
|
if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {
|
|
76
76
|
d = date(d)
|
|
@@ -88,7 +88,7 @@ export function getYearMonths(
|
|
|
88
88
|
monthDate.setMinutes(59)
|
|
89
89
|
monthDate.setSeconds(59)
|
|
90
90
|
|
|
91
|
-
return { key: ym, month, date: monthDate, disabled: disabledDate?.(monthDate) }
|
|
91
|
+
return { key: ym, month, date: monthDate, disabled: disabledDate?.(monthDate, monthDate.raw) }
|
|
92
92
|
})
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -100,7 +100,7 @@ export function getYearMonths(
|
|
|
100
100
|
*/
|
|
101
101
|
export function getTenYears(
|
|
102
102
|
d: Date | string | number | Dater,
|
|
103
|
-
disabledDate?: (d: Dater) => boolean
|
|
103
|
+
disabledDate?: (d: Dater, raw: Date) => boolean
|
|
104
104
|
): CalendarYear[] {
|
|
105
105
|
if (d instanceof Date || typeof d === 'string' || typeof d === 'number') {
|
|
106
106
|
d = date(d)
|
|
@@ -113,6 +113,6 @@ export function getTenYears(
|
|
|
113
113
|
|
|
114
114
|
const yearDate = date(`${year}-12-31 23:59:59`)
|
|
115
115
|
|
|
116
|
-
return { year, date: yearDate, disabled: disabledDate?.(yearDate) }
|
|
116
|
+
return { year, date: yearDate, disabled: disabledDate?.(yearDate, yearDate.raw) }
|
|
117
117
|
})
|
|
118
118
|
}
|
|
@@ -39,7 +39,7 @@ $root-name: card;
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
@include m.e(header) {
|
|
42
|
-
background-color: fn.
|
|
42
|
+
background-color: fn.component-var(card, header-bg, transparent);
|
|
43
43
|
color: fn.use-var(text-color, title);
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -65,7 +65,7 @@ $root-name: card;
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
@include m.e(action) {
|
|
68
|
-
background-color: fn.
|
|
68
|
+
background-color: fn.component-var(card, action-bg, transparent);
|
|
69
69
|
|
|
70
70
|
#{fn.bem(button)} + #{fn.bem(button)} {
|
|
71
71
|
margin-left: fn.use-var(gap, default);
|
|
@@ -84,16 +84,16 @@ $connector-width: 56px;
|
|
|
84
84
|
background-color: fn.use-var(color, primary, light-9);
|
|
85
85
|
|
|
86
86
|
&:hover {
|
|
87
|
-
background-color: fn.use-var(color, primary, light-
|
|
87
|
+
background-color: fn.use-var(color, primary, light-7);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
@include m.m(or) {
|
|
92
|
-
color: fn.use-var(color, warning, dark-
|
|
92
|
+
color: fn.use-var(color, warning, dark-1);
|
|
93
93
|
background-color: fn.use-var(color, warning, light-9);
|
|
94
94
|
|
|
95
95
|
&:hover {
|
|
96
|
-
background-color: fn.use-var(color, warning, light-
|
|
96
|
+
background-color: fn.use-var(color, warning, light-7);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -243,7 +243,7 @@ $connector-width: 56px;
|
|
|
243
243
|
border-color 0.15s ease;
|
|
244
244
|
|
|
245
245
|
&:hover {
|
|
246
|
-
background-color: fn.use-var(color, primary, light-
|
|
246
|
+
background-color: fn.use-var(color, primary, light-7);
|
|
247
247
|
border-color: fn.use-var(color, primary, light-5);
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -92,15 +92,31 @@ $arrow-size: 12px;
|
|
|
92
92
|
|
|
93
93
|
#{$b}__item:not(.is-disabled):not(.is-loading) > & {
|
|
94
94
|
&:hover {
|
|
95
|
-
background-color: var(
|
|
96
|
-
|
|
95
|
+
background-color: fn.component-var(
|
|
96
|
+
contextmenu,
|
|
97
|
+
item-hover-bg,
|
|
98
|
+
fn.use-var(bg-color, hover)
|
|
99
|
+
);
|
|
100
|
+
color: fn.component-var(
|
|
101
|
+
contextmenu,
|
|
102
|
+
item-hover-color,
|
|
103
|
+
fn.use-var(text-color, title)
|
|
104
|
+
);
|
|
97
105
|
}
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
#{$b}__item.is-open:not(.is-disabled) > #{$b}__item-content {
|
|
102
|
-
background-color: var(
|
|
103
|
-
|
|
110
|
+
background-color: fn.component-var(
|
|
111
|
+
contextmenu,
|
|
112
|
+
item-hover-bg,
|
|
113
|
+
fn.use-var(bg-color, hover)
|
|
114
|
+
);
|
|
115
|
+
color: fn.component-var(
|
|
116
|
+
contextmenu,
|
|
117
|
+
item-hover-color,
|
|
118
|
+
fn.use-var(text-color, title)
|
|
119
|
+
);
|
|
104
120
|
}
|
|
105
121
|
|
|
106
122
|
@include m.e(icon-place) {
|
|
@@ -142,7 +158,11 @@ $arrow-size: 12px;
|
|
|
142
158
|
|
|
143
159
|
@include m.e(item-content) {
|
|
144
160
|
padding: 0 fn.use-var(gap, $size);
|
|
145
|
-
min-height:
|
|
161
|
+
min-height: fn.component-var(
|
|
162
|
+
contextmenu,
|
|
163
|
+
item-height-#{$size},
|
|
164
|
+
calc(fn.use-var(form-component-height, $size) - 4px)
|
|
165
|
+
);
|
|
146
166
|
border-radius: calc(fn.use-var(radius, $size) + 1px);
|
|
147
167
|
}
|
|
148
168
|
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { date } from '@cat-kit/core'
|
|
2
|
+
import { describe, expect, it } from 'vitest'
|
|
3
|
+
import { createApp, h, nextTick, ref } from 'vue'
|
|
4
|
+
|
|
5
|
+
import UDatePicker from '../date-picker.vue'
|
|
6
|
+
|
|
7
|
+
function mountDatePicker(
|
|
8
|
+
props: Record<string, unknown> = {},
|
|
9
|
+
emits: Record<string, Function> = {}
|
|
10
|
+
) {
|
|
11
|
+
const host = document.createElement('div')
|
|
12
|
+
document.body.appendChild(host)
|
|
13
|
+
|
|
14
|
+
const model = ref(props.modelValue)
|
|
15
|
+
const app = createApp({
|
|
16
|
+
render() {
|
|
17
|
+
return h(UDatePicker, {
|
|
18
|
+
...props,
|
|
19
|
+
modelValue: model.value,
|
|
20
|
+
'onUpdate:modelValue': (value: unknown) => {
|
|
21
|
+
model.value = value
|
|
22
|
+
emits['update:modelValue']?.(value)
|
|
23
|
+
},
|
|
24
|
+
onChange: (date?: Date) => {
|
|
25
|
+
emits.change?.(date)
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
app.component('Transition', (_, { slots }) => slots.default?.())
|
|
32
|
+
|
|
33
|
+
app.mount(host)
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
host,
|
|
37
|
+
model,
|
|
38
|
+
app,
|
|
39
|
+
unmount() {
|
|
40
|
+
app.unmount()
|
|
41
|
+
host.remove()
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
describe('UDatePicker', () => {
|
|
47
|
+
it('defaults dataType to string and emits change with native Date', async () => {
|
|
48
|
+
let changedDate: Date | undefined
|
|
49
|
+
let updatedVal: unknown
|
|
50
|
+
|
|
51
|
+
const { host, unmount } = mountDatePicker(
|
|
52
|
+
{},
|
|
53
|
+
{
|
|
54
|
+
'update:modelValue': (val: unknown) => {
|
|
55
|
+
updatedVal = val
|
|
56
|
+
},
|
|
57
|
+
change: (d?: Date) => {
|
|
58
|
+
changedDate = d
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
try {
|
|
64
|
+
const inputEl = host.querySelector('input')
|
|
65
|
+
expect(inputEl).not.toBeNull()
|
|
66
|
+
inputEl?.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
67
|
+
await nextTick()
|
|
68
|
+
await nextTick()
|
|
69
|
+
|
|
70
|
+
const cell = document.querySelector('.u-date-panel__cell.is-current') as HTMLElement
|
|
71
|
+
expect(cell).not.toBeNull()
|
|
72
|
+
cell.click()
|
|
73
|
+
await nextTick()
|
|
74
|
+
|
|
75
|
+
expect(typeof updatedVal).toBe('string')
|
|
76
|
+
expect(updatedVal).toMatch(/^\d{4}-\d{2}-\d{2}$/)
|
|
77
|
+
expect(changedDate instanceof Date).toBe(true)
|
|
78
|
+
} finally {
|
|
79
|
+
unmount()
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
|
|
83
|
+
it('supports dataType="date" and emits native Date for modelValue and change', async () => {
|
|
84
|
+
let changedDate: Date | undefined
|
|
85
|
+
let updatedVal: unknown
|
|
86
|
+
|
|
87
|
+
const { host, unmount } = mountDatePicker(
|
|
88
|
+
{ dataType: 'date', valueFormat: 'yyyyMMdd' },
|
|
89
|
+
{
|
|
90
|
+
'update:modelValue': (val: unknown) => {
|
|
91
|
+
updatedVal = val
|
|
92
|
+
},
|
|
93
|
+
change: (d?: Date) => {
|
|
94
|
+
changedDate = d
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
try {
|
|
100
|
+
const inputEl = host.querySelector('input')
|
|
101
|
+
inputEl?.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
102
|
+
await nextTick()
|
|
103
|
+
await nextTick()
|
|
104
|
+
|
|
105
|
+
const cell = document.querySelector('.u-date-panel__cell.is-current') as HTMLElement
|
|
106
|
+
cell.click()
|
|
107
|
+
await nextTick()
|
|
108
|
+
|
|
109
|
+
expect(updatedVal instanceof Date).toBe(true)
|
|
110
|
+
expect(changedDate instanceof Date).toBe(true)
|
|
111
|
+
} finally {
|
|
112
|
+
unmount()
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
it('supports dataType="timestamp" and emits timestamp for modelValue and native Date for change', async () => {
|
|
117
|
+
let changedDate: Date | undefined
|
|
118
|
+
let updatedVal: unknown
|
|
119
|
+
|
|
120
|
+
const { host, unmount } = mountDatePicker(
|
|
121
|
+
{ dataType: 'timestamp', valueFormat: 'yyyyMMdd' },
|
|
122
|
+
{
|
|
123
|
+
'update:modelValue': (val: unknown) => {
|
|
124
|
+
updatedVal = val
|
|
125
|
+
},
|
|
126
|
+
change: (d?: Date) => {
|
|
127
|
+
changedDate = d
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
const inputEl = host.querySelector('input')
|
|
134
|
+
inputEl?.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
135
|
+
await nextTick()
|
|
136
|
+
await nextTick()
|
|
137
|
+
|
|
138
|
+
const cell = document.querySelector('.u-date-panel__cell.is-current') as HTMLElement
|
|
139
|
+
cell.click()
|
|
140
|
+
await nextTick()
|
|
141
|
+
|
|
142
|
+
expect(typeof updatedVal).toBe('number')
|
|
143
|
+
expect(updatedVal).toBeGreaterThan(0)
|
|
144
|
+
expect(changedDate instanceof Date).toBe(true)
|
|
145
|
+
} finally {
|
|
146
|
+
unmount()
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
|
|
150
|
+
it('applies valueFormat when dataType="string"', async () => {
|
|
151
|
+
let changedDate: Date | undefined
|
|
152
|
+
let updatedVal: unknown
|
|
153
|
+
|
|
154
|
+
const { host, unmount } = mountDatePicker(
|
|
155
|
+
{ dataType: 'string', valueFormat: 'yyyy/MM/dd' },
|
|
156
|
+
{
|
|
157
|
+
'update:modelValue': (val: unknown) => {
|
|
158
|
+
updatedVal = val
|
|
159
|
+
},
|
|
160
|
+
change: (d?: Date) => {
|
|
161
|
+
changedDate = d
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
try {
|
|
167
|
+
const inputEl = host.querySelector('input')
|
|
168
|
+
inputEl?.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
169
|
+
await nextTick()
|
|
170
|
+
await nextTick()
|
|
171
|
+
|
|
172
|
+
const cell = document.querySelector('.u-date-panel__cell.is-current') as HTMLElement
|
|
173
|
+
cell.click()
|
|
174
|
+
await nextTick()
|
|
175
|
+
|
|
176
|
+
expect(typeof updatedVal).toBe('string')
|
|
177
|
+
expect(updatedVal).toMatch(/^\d{4}\/\d{2}\/\d{2}$/)
|
|
178
|
+
expect(changedDate instanceof Date).toBe(true)
|
|
179
|
+
} finally {
|
|
180
|
+
unmount()
|
|
181
|
+
}
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
it('emits undefined for modelValue and change when cleared', async () => {
|
|
185
|
+
let changedDate: Date | undefined = new Date()
|
|
186
|
+
let updatedVal: unknown = '2024-05-01'
|
|
187
|
+
|
|
188
|
+
const { host, unmount } = mountDatePicker(
|
|
189
|
+
{ modelValue: '2024-05-01', clearable: true },
|
|
190
|
+
{
|
|
191
|
+
'update:modelValue': (val: unknown) => {
|
|
192
|
+
updatedVal = val
|
|
193
|
+
},
|
|
194
|
+
change: (d?: Date) => {
|
|
195
|
+
changedDate = d
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
try {
|
|
201
|
+
const inputWrapper = host.querySelector('.u-input') as HTMLElement
|
|
202
|
+
inputWrapper.dispatchEvent(new MouseEvent('mouseenter', { bubbles: true }))
|
|
203
|
+
await new Promise((r) => setTimeout(r, 50))
|
|
204
|
+
|
|
205
|
+
const clearBtn = host.querySelector('.u-input__clear') as HTMLElement
|
|
206
|
+
expect(clearBtn).not.toBeNull()
|
|
207
|
+
clearBtn.click()
|
|
208
|
+
await nextTick()
|
|
209
|
+
|
|
210
|
+
expect(updatedVal).toBeUndefined()
|
|
211
|
+
expect(changedDate).toBeUndefined()
|
|
212
|
+
} finally {
|
|
213
|
+
unmount()
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
|
|
217
|
+
it('correctly parses modelValue of Date, timestamp, and custom formatted string', async () => {
|
|
218
|
+
const dateObj = new Date(2024, 4, 15)
|
|
219
|
+
const d1 = mountDatePicker({ modelValue: dateObj })
|
|
220
|
+
await nextTick()
|
|
221
|
+
expect(d1.host.querySelector('input')?.value).toBe('2024-05-15')
|
|
222
|
+
d1.unmount()
|
|
223
|
+
|
|
224
|
+
const ts = date('2024-06-20').timestamp
|
|
225
|
+
const d2 = mountDatePicker({ modelValue: ts })
|
|
226
|
+
await nextTick()
|
|
227
|
+
expect(d2.host.querySelector('input')?.value).toBe('2024-06-20')
|
|
228
|
+
d2.unmount()
|
|
229
|
+
|
|
230
|
+
const d3 = mountDatePicker({ modelValue: '20240725', valueFormat: 'yyyyMMdd' })
|
|
231
|
+
await nextTick()
|
|
232
|
+
expect(d3.host.querySelector('input')?.value).toBe('2024-07-25')
|
|
233
|
+
d3.unmount()
|
|
234
|
+
})
|
|
235
|
+
})
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<script lang="ts" setup>
|
|
39
|
-
import { date,
|
|
39
|
+
import { date, Dater } from '@cat-kit/core'
|
|
40
40
|
import { useFormFallbackProps, useUserAction } from '@veltra/compositions'
|
|
41
41
|
import { Calendar } from '@veltra/icons/normal'
|
|
42
42
|
import { bem, FORM_EMPTY_CONTENT } from '@veltra/utils'
|
|
@@ -55,6 +55,7 @@ defineOptions({ name: 'UDatePicker', inheritAttrs: false })
|
|
|
55
55
|
const props = withDefaults(defineProps<DatePickerProps>(), {
|
|
56
56
|
placeholder: '选择日期',
|
|
57
57
|
type: 'date',
|
|
58
|
+
dataType: 'string',
|
|
58
59
|
disabled: undefined,
|
|
59
60
|
readonly: undefined,
|
|
60
61
|
clearable: true
|
|
@@ -91,11 +92,28 @@ const currentDate = shallowRef<Dater>()
|
|
|
91
92
|
|
|
92
93
|
const { userAction, isUserActive } = useUserAction()
|
|
93
94
|
|
|
95
|
+
function parseModelValue(val?: string | number | Date): Dater | undefined {
|
|
96
|
+
if (val == null || val === '') return undefined
|
|
97
|
+
if (val instanceof Date || typeof val === 'number') {
|
|
98
|
+
const d = date(val)
|
|
99
|
+
return isNaN(d.timestamp) ? undefined : d
|
|
100
|
+
}
|
|
101
|
+
if (typeof val === 'string') {
|
|
102
|
+
if (props.dataType === 'string' && props.valueFormat) {
|
|
103
|
+
const parsed = Dater.parse(val, props.valueFormat)
|
|
104
|
+
if (!isNaN(parsed.timestamp)) return parsed
|
|
105
|
+
}
|
|
106
|
+
const fallback = date(val)
|
|
107
|
+
return isNaN(fallback.timestamp) ? undefined : fallback
|
|
108
|
+
}
|
|
109
|
+
return undefined
|
|
110
|
+
}
|
|
111
|
+
|
|
94
112
|
watch(
|
|
95
113
|
() => props.modelValue,
|
|
96
114
|
(modelValue) => {
|
|
97
115
|
if (isUserActive()) return
|
|
98
|
-
currentDate.value =
|
|
116
|
+
currentDate.value = parseModelValue(modelValue)
|
|
99
117
|
},
|
|
100
118
|
{ immediate: true }
|
|
101
119
|
)
|
|
@@ -104,9 +122,20 @@ const displayedValue = computed(() => {
|
|
|
104
122
|
return currentDate.value?.format(formatStr.value) ?? ''
|
|
105
123
|
})
|
|
106
124
|
|
|
125
|
+
function formatModelValue(d: Dater) {
|
|
126
|
+
if (props.dataType === 'date') {
|
|
127
|
+
return d.raw
|
|
128
|
+
}
|
|
129
|
+
if (props.dataType === 'timestamp') {
|
|
130
|
+
return d.timestamp
|
|
131
|
+
}
|
|
132
|
+
return d.format(props.valueFormat ?? formatStr.value)
|
|
133
|
+
}
|
|
134
|
+
|
|
107
135
|
const commitSelectedDate = userAction((date: Dater) => {
|
|
108
136
|
currentDate.value = date
|
|
109
|
-
emit('update:modelValue', date
|
|
137
|
+
emit('update:modelValue', formatModelValue(date))
|
|
138
|
+
emit('change', date.raw)
|
|
110
139
|
})
|
|
111
140
|
|
|
112
141
|
async function handleSelectDate(date: Dater) {
|
|
@@ -117,5 +146,6 @@ async function handleSelectDate(date: Dater) {
|
|
|
117
146
|
function handleClear() {
|
|
118
147
|
currentDate.value = undefined
|
|
119
148
|
emit('update:modelValue', undefined)
|
|
149
|
+
emit('change', undefined)
|
|
120
150
|
}
|
|
121
151
|
</script>
|
|
@@ -39,7 +39,7 @@ $root-name: progress-nodes;
|
|
|
39
39
|
transition:
|
|
40
40
|
background-color 0.2s,
|
|
41
41
|
color 0.2s;
|
|
42
|
-
border-radius: fn.use-var(radius,
|
|
42
|
+
border-radius: fn.use-var(radius, default);
|
|
43
43
|
|
|
44
44
|
&:hover {
|
|
45
45
|
@include m.bem($root-name, dot) {
|
|
@@ -47,7 +47,7 @@ $root-name: progress-nodes;
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
@include m.bem($root-name, label) {
|
|
50
|
-
color: fn.use-var(
|
|
50
|
+
color: fn.use-var(color, primary);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -64,7 +64,7 @@ $root-name: progress-nodes;
|
|
|
64
64
|
@include m.e(link) {
|
|
65
65
|
position: absolute;
|
|
66
66
|
border-style: dashed;
|
|
67
|
-
border-color: fn.use-var(text
|
|
67
|
+
border-color: fn.use-var(text-color, placeholder);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
// 节点圆点
|