@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
|
@@ -8,7 +8,7 @@ $root-name: rich-text-editor;
|
|
|
8
8
|
width: 100%;
|
|
9
9
|
border: 1px solid fn.use-var(border, muted-color);
|
|
10
10
|
border-radius: fn.use-var(radius, default);
|
|
11
|
-
background-color: fn.use-var(color,
|
|
11
|
+
background-color: fn.use-var(bg-color, top);
|
|
12
12
|
transition: border-color 0.25s ease;
|
|
13
13
|
display: flex;
|
|
14
14
|
flex-direction: column;
|
|
@@ -38,7 +38,7 @@ $root-name: rich-text-editor;
|
|
|
38
38
|
gap: 2px;
|
|
39
39
|
padding: 6px 8px;
|
|
40
40
|
border-bottom: 1px solid fn.use-var(border-color);
|
|
41
|
-
background-color: fn.use-var(color,
|
|
41
|
+
background-color: fn.use-var(bg-color, middle);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@include m.e(toolbar-btn) {
|
|
@@ -50,19 +50,19 @@ $root-name: rich-text-editor;
|
|
|
50
50
|
border: none;
|
|
51
51
|
border-radius: 4px;
|
|
52
52
|
background: transparent;
|
|
53
|
-
color: fn.use-var(text-color);
|
|
53
|
+
color: fn.use-var(text-color, main);
|
|
54
54
|
cursor: pointer;
|
|
55
55
|
transition: all 0.15s ease;
|
|
56
56
|
padding: 0;
|
|
57
57
|
|
|
58
58
|
@include m.is-not(disabled) {
|
|
59
59
|
&:hover {
|
|
60
|
-
background-color: fn.use-var(color, hover);
|
|
60
|
+
background-color: fn.use-var(bg-color, hover);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&.is-active {
|
|
65
|
-
background-color: fn.use-var(color, primary, light);
|
|
65
|
+
background-color: fn.use-var(color, primary, light-9);
|
|
66
66
|
color: fn.use-var(color, primary);
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -104,7 +104,7 @@ $root-name: rich-text-editor;
|
|
|
104
104
|
border: 1px solid fn.use-var(border, muted-color);
|
|
105
105
|
border-radius: 4px;
|
|
106
106
|
background-color: transparent;
|
|
107
|
-
color: fn.use-var(text-color);
|
|
107
|
+
color: fn.use-var(text-color, main);
|
|
108
108
|
font-size: 13px;
|
|
109
109
|
cursor: pointer;
|
|
110
110
|
outline: none;
|
|
@@ -146,7 +146,7 @@ $root-name: rich-text-editor;
|
|
|
146
146
|
outline: none;
|
|
147
147
|
font-size: 14px;
|
|
148
148
|
line-height: 1.6;
|
|
149
|
-
color: fn.use-var(text-color);
|
|
149
|
+
color: fn.use-var(text-color, main);
|
|
150
150
|
word-break: break-word;
|
|
151
151
|
|
|
152
152
|
&:focus {
|
|
@@ -259,7 +259,7 @@ $root-name: rich-text-editor;
|
|
|
259
259
|
font-weight: 600;
|
|
260
260
|
line-height: 1.4;
|
|
261
261
|
margin: 10px 0 4px 0;
|
|
262
|
-
color: fn.use-var(text-color,
|
|
262
|
+
color: fn.use-var(text-color, second);
|
|
263
263
|
|
|
264
264
|
&:first-child {
|
|
265
265
|
margin-top: 0;
|
|
@@ -286,7 +286,7 @@ $root-name: rich-text-editor;
|
|
|
286
286
|
.u-rte-code {
|
|
287
287
|
font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
|
|
288
288
|
font-size: 0.9em;
|
|
289
|
-
background-color: fn.use-var(color,
|
|
289
|
+
background-color: fn.use-var(bg-color, middle);
|
|
290
290
|
padding: 2px 6px;
|
|
291
291
|
border-radius: 3px;
|
|
292
292
|
border: 1px solid fn.use-var(border-color);
|
|
@@ -318,8 +318,8 @@ $root-name: rich-text-editor;
|
|
|
318
318
|
margin: 8px 0;
|
|
319
319
|
padding: 8px 16px;
|
|
320
320
|
border-left: 3px solid fn.use-var(color, primary);
|
|
321
|
-
background-color: fn.use-var(color,
|
|
322
|
-
color: fn.use-var(text-color,
|
|
321
|
+
background-color: fn.use-var(bg-color, middle);
|
|
322
|
+
color: fn.use-var(text-color, second);
|
|
323
323
|
font-style: italic;
|
|
324
324
|
}
|
|
325
325
|
|
|
@@ -328,7 +328,7 @@ $root-name: rich-text-editor;
|
|
|
328
328
|
font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
|
|
329
329
|
font-size: 13px;
|
|
330
330
|
line-height: 1.6;
|
|
331
|
-
background-color: fn.use-var(color,
|
|
331
|
+
background-color: fn.use-var(bg-color, middle);
|
|
332
332
|
border: 1px solid fn.use-var(border-color);
|
|
333
333
|
border-radius: 6px;
|
|
334
334
|
padding: 12px 16px;
|
|
@@ -63,14 +63,30 @@ $root-name: select;
|
|
|
63
63
|
@include m.ellipsis;
|
|
64
64
|
|
|
65
65
|
&:hover {
|
|
66
|
-
background-color: var(
|
|
67
|
-
|
|
66
|
+
background-color: fn.component-var(
|
|
67
|
+
select,
|
|
68
|
+
option-hover-bg,
|
|
69
|
+
fn.use-var(bg-color, hover)
|
|
70
|
+
);
|
|
71
|
+
color: fn.component-var(
|
|
72
|
+
select,
|
|
73
|
+
option-hover-color,
|
|
74
|
+
fn.use-var(text-color, title)
|
|
75
|
+
);
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
@include m.is(selected) {
|
|
71
79
|
position: relative;
|
|
72
|
-
background-color: var(
|
|
73
|
-
|
|
80
|
+
background-color: fn.component-var(
|
|
81
|
+
select,
|
|
82
|
+
option-selected-bg,
|
|
83
|
+
fn.use-var(color, primary, light-9)
|
|
84
|
+
);
|
|
85
|
+
color: fn.component-var(
|
|
86
|
+
select,
|
|
87
|
+
option-selected-color,
|
|
88
|
+
fn.use-var(color, primary)
|
|
89
|
+
);
|
|
74
90
|
font-weight: 600;
|
|
75
91
|
|
|
76
92
|
&::before {
|
|
@@ -159,7 +159,7 @@ $active-shadow: fn.use-var(shadow, sm);
|
|
|
159
159
|
padding: 0;
|
|
160
160
|
border: none;
|
|
161
161
|
background: transparent;
|
|
162
|
-
color: fn.use-var(text-color,
|
|
162
|
+
color: fn.use-var(text-color, second);
|
|
163
163
|
cursor: pointer;
|
|
164
164
|
border-radius: fn.use-var(radius, default);
|
|
165
165
|
font-size: 12px;
|
package/src/types/date-panel.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface DatePanelProps {
|
|
|
7
7
|
date?: Dater
|
|
8
8
|
rangeDate?: [Dater, Dater]
|
|
9
9
|
range?: boolean
|
|
10
|
-
disabledDate?: (date: Dater) => boolean
|
|
10
|
+
disabledDate?: (date: Dater, raw: Date) => boolean
|
|
11
11
|
type?: 'date' | 'month' | 'year'
|
|
12
12
|
size?: FormComponentProps['size']
|
|
13
13
|
}
|
package/src/types/date-picker.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { Dater } from '@cat-kit/core'
|
|
2
2
|
import type { DeconstructValue, FormComponentProps } from '@veltra/utils'
|
|
3
3
|
|
|
4
|
+
/** 绑定值类型 */
|
|
5
|
+
export type DatePickerDataType = 'date' | 'timestamp' | 'string'
|
|
6
|
+
|
|
4
7
|
/** date-picker组件属性 */
|
|
5
8
|
export interface DatePickerProps extends FormComponentProps {
|
|
6
9
|
modelValue?: string | number | Date
|
|
@@ -12,8 +15,13 @@ export interface DatePickerProps extends FormComponentProps {
|
|
|
12
15
|
format?: string
|
|
13
16
|
/** 日期值格式化, 当没有指定时默认使用format属性,仅当值和显示的内容不一致时才需要使用到该属性 */
|
|
14
17
|
valueFormat?: string
|
|
18
|
+
/**
|
|
19
|
+
* 绑定值的类型,默认为字符串。
|
|
20
|
+
* 当 dataType 没有指定为字符串时,valueFormat 属性不生效
|
|
21
|
+
*/
|
|
22
|
+
dataType?: DatePickerDataType
|
|
15
23
|
/** 最小可选日期 */
|
|
16
|
-
disabledDate?: (date: Dater) => boolean
|
|
24
|
+
disabledDate?: (date: Dater, raw: Date) => boolean
|
|
17
25
|
/** 是否显示清除按钮 */
|
|
18
26
|
clearable?: boolean
|
|
19
27
|
}
|
|
@@ -21,6 +29,7 @@ export interface DatePickerProps extends FormComponentProps {
|
|
|
21
29
|
/** date-picker组件定义的事件 */
|
|
22
30
|
export interface DatePickerEmits {
|
|
23
31
|
(e: 'update:modelValue', value?: string | number | Date): void
|
|
32
|
+
(e: 'change', date?: Date): void
|
|
24
33
|
}
|
|
25
34
|
|
|
26
35
|
/** date-picker组件暴露的属性和方法(组件内部使用) */
|
|
@@ -13,7 +13,7 @@ export interface DateRangePickerProps extends FormComponentProps {
|
|
|
13
13
|
/** 日期值格式化, 当没有指定时默认使用format属性,仅当值和显示的内容不一致时才需要使用到该属性 */
|
|
14
14
|
valueFormat?: string
|
|
15
15
|
/** 最小可选日期 */
|
|
16
|
-
disabledDate?: (date: Dater) => boolean
|
|
16
|
+
disabledDate?: (date: Dater, raw: Date) => boolean
|
|
17
17
|
/** 是否显示清除按钮 */
|
|
18
18
|
clearable?: boolean
|
|
19
19
|
}
|