persagy-vant 0.0.34 → 0.0.36
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/label/Label.d.ts +11 -1
- package/es/label/Label.mjs +34 -3
- package/es/label/index.css +1 -1
- package/es/label/index.d.ts +6 -2
- package/es/label/index.less +22 -0
- package/es/label/var.less +1 -0
- package/es/material-action-bar/MaterialActionBar.d.ts +15 -0
- package/es/material-action-bar/MaterialActionBar.mjs +107 -58
- package/es/material-action-bar/index.css +1 -1
- package/es/material-action-bar/index.d.ts +76 -2
- package/es/material-action-bar/index.less +9 -5
- package/es/material-action-bar/index.mjs +4 -2
- package/es/material-action-bar/style/index.mjs +1 -0
- package/es/material-action-bar/style/less.mjs +1 -0
- package/es/material-add/MaterialAdd.mjs +0 -1
- package/es/material-add/index.css +1 -1
- package/es/material-add/style/index.mjs +1 -0
- package/es/material-add/style/less.mjs +1 -0
- package/es/material-detail/MaterialDetail.mjs +7 -2
- package/es/material-display-bar/MaterialDisplayBar.d.ts +2 -1
- package/es/material-display-bar/MaterialDisplayBar.mjs +5 -3
- package/es/material-display-bar/index.css +1 -1
- package/es/material-display-bar/index.d.ts +205 -3
- package/es/material-display-bar/index.less +34 -1
- package/es/material-display-bar/index.mjs +6 -2
- package/es/material-display-bar/var.less +2 -1
- package/es/tag/Tag.d.ts +15 -2
- package/es/tag/Tag.mjs +20 -3
- package/es/tag/index.css +1 -1
- package/es/tag/index.d.ts +9 -0
- package/es/tag/index.less +45 -1
- package/es/tag/var.less +13 -0
- package/es/title-bar/TitleBar.d.ts +29 -11
- package/es/title-bar/TitleBar.mjs +38 -8
- package/es/title-bar/index.css +1 -1
- package/es/title-bar/index.d.ts +14 -1
- package/es/title-bar/index.less +10 -2
- package/es/title-bar/style/index.mjs +2 -0
- package/es/title-bar/style/less.mjs +2 -0
- package/es/title-bar/var.less +4 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +1 -1
- package/lib/label/Label.d.ts +11 -1
- package/lib/label/Label.js +34 -3
- package/lib/label/index.css +1 -1
- package/lib/label/index.d.ts +6 -2
- package/lib/label/index.less +22 -0
- package/lib/label/var.less +1 -0
- package/lib/material-action-bar/MaterialActionBar.d.ts +15 -0
- package/lib/material-action-bar/MaterialActionBar.js +106 -57
- package/lib/material-action-bar/index.css +1 -1
- package/lib/material-action-bar/index.d.ts +76 -2
- package/lib/material-action-bar/index.js +4 -2
- package/lib/material-action-bar/index.less +9 -5
- package/lib/material-action-bar/style/index.js +1 -0
- package/lib/material-action-bar/style/less.js +1 -0
- package/lib/material-add/MaterialAdd.js +0 -1
- package/lib/material-add/index.css +1 -1
- package/lib/material-add/style/index.js +1 -0
- package/lib/material-add/style/less.js +1 -0
- package/lib/material-detail/MaterialDetail.js +7 -2
- package/lib/material-display-bar/MaterialDisplayBar.d.ts +2 -1
- package/lib/material-display-bar/MaterialDisplayBar.js +5 -3
- package/lib/material-display-bar/index.css +1 -1
- package/lib/material-display-bar/index.d.ts +205 -3
- package/lib/material-display-bar/index.js +6 -2
- package/lib/material-display-bar/index.less +34 -1
- package/lib/material-display-bar/var.less +2 -1
- package/lib/tag/Tag.d.ts +15 -2
- package/lib/tag/Tag.js +20 -3
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.d.ts +9 -0
- package/lib/tag/index.less +45 -1
- package/lib/tag/var.less +13 -0
- package/lib/title-bar/TitleBar.d.ts +29 -11
- package/lib/title-bar/TitleBar.js +38 -8
- package/lib/title-bar/index.css +1 -1
- package/lib/title-bar/index.d.ts +14 -1
- package/lib/title-bar/index.less +10 -2
- package/lib/title-bar/style/index.js +2 -0
- package/lib/title-bar/style/less.js +2 -0
- package/lib/title-bar/var.less +4 -0
- package/lib/vant.cjs.js +218 -80
- package/lib/vant.es.js +218 -80
- package/lib/vant.js +218 -80
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +2 -2
- package/skills/use-persagy-vant/references/component-catalog.md +3 -2
- package/skills/use-persagy-vant/references/component-documentation.md +1 -1
- package/skills/use-persagy-vant/references/component-gap-template.md +3 -0
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +1 -0
- package/skills/use-persagy-vant/references/page-recipes.md +1 -1
- package/skills/use-persagy-vant/references/reuse-policy.md +27 -1
- package/skills/use-persagy-vant/references/usage-patterns.md +1 -1
package/es/tag/index.d.ts
CHANGED
|
@@ -17,6 +17,10 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
17
17
|
round: BooleanConstructor;
|
|
18
18
|
textColor: StringConstructor;
|
|
19
19
|
closeable: BooleanConstructor;
|
|
20
|
+
rightIcon: StringConstructor;
|
|
21
|
+
number: (NumberConstructor | StringConstructor)[];
|
|
22
|
+
showNumber: BooleanConstructor;
|
|
23
|
+
numberColor: StringConstructor;
|
|
20
24
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
21
25
|
size: {
|
|
22
26
|
type: import("vue").PropType<import("./Tag").TagSize>;
|
|
@@ -36,6 +40,10 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
36
40
|
round: BooleanConstructor;
|
|
37
41
|
textColor: StringConstructor;
|
|
38
42
|
closeable: BooleanConstructor;
|
|
43
|
+
rightIcon: StringConstructor;
|
|
44
|
+
number: (NumberConstructor | StringConstructor)[];
|
|
45
|
+
showNumber: BooleanConstructor;
|
|
46
|
+
numberColor: StringConstructor;
|
|
39
47
|
}>> & {
|
|
40
48
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
41
49
|
}, {
|
|
@@ -46,6 +54,7 @@ export declare const Tag: import("../utils").WithInstall<import("vue").DefineCom
|
|
|
46
54
|
show: boolean;
|
|
47
55
|
plain: boolean;
|
|
48
56
|
closeable: boolean;
|
|
57
|
+
showNumber: boolean;
|
|
49
58
|
}>>;
|
|
50
59
|
export default Tag;
|
|
51
60
|
export type { TagSize, TagType, TagProps } from './Tag';
|
package/es/tag/index.less
CHANGED
|
@@ -7,10 +7,16 @@
|
|
|
7
7
|
--van-tag-border-radius: @tag-border-radius;
|
|
8
8
|
--van-tag-line-height: @tag-line-height;
|
|
9
9
|
--van-tag-medium-padding: @tag-medium-padding;
|
|
10
|
+
--van-tag-small-padding: @tag-small-padding;
|
|
11
|
+
--van-tag-small-font-size: @tag-small-font-size;
|
|
10
12
|
--van-tag-large-padding: @tag-large-padding;
|
|
11
13
|
--van-tag-large-border-radius: @tag-large-border-radius;
|
|
12
14
|
--van-tag-large-font-size: @tag-large-font-size;
|
|
13
15
|
--van-tag-round-border-radius: @tag-round-border-radius;
|
|
16
|
+
--van-tag-icon-gap: @tag-icon-gap;
|
|
17
|
+
--van-tag-right-icon-size: @tag-right-icon-size;
|
|
18
|
+
--van-tag-small-right-icon-size: @tag-small-right-icon-size;
|
|
19
|
+
--van-tag-large-right-icon-size: @tag-large-right-icon-size;
|
|
14
20
|
--van-tag-danger-color: @tag-danger-color;
|
|
15
21
|
--van-tag-danger-background-color: @tag-danger-background-color;
|
|
16
22
|
--van-tag-primary-color: @tag-primary-color;
|
|
@@ -21,6 +27,12 @@
|
|
|
21
27
|
--van-tag-warning-background-color: @tag-warning-background-color;
|
|
22
28
|
--van-tag-gray-color: @tag-gray-color;
|
|
23
29
|
--van-tag-gray-background-color: @tag-gray-background-color;
|
|
30
|
+
--van-tag-turquoise-color: @tag-turquoise-color;
|
|
31
|
+
--van-tag-turquoise-background-color: @tag-turquoise-background-color;
|
|
32
|
+
--van-tag-purple-color: @tag-purple-color;
|
|
33
|
+
--van-tag-purple-background-color: @tag-purple-background-color;
|
|
34
|
+
--van-tag-violet-color: @tag-violet-color;
|
|
35
|
+
--van-tag-violet-background-color: @tag-violet-background-color;
|
|
24
36
|
--van-tag-default-color: @tag-default-color;
|
|
25
37
|
--van-tag-plain-background-color: @tag-plain-background-color;
|
|
26
38
|
}
|
|
@@ -68,6 +80,21 @@
|
|
|
68
80
|
color: var(--van-tag-gray-color);
|
|
69
81
|
}
|
|
70
82
|
|
|
83
|
+
&--turquoise {
|
|
84
|
+
background: var(--van-tag-turquoise-background-color);
|
|
85
|
+
color: var(--van-tag-turquoise-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&--purple {
|
|
89
|
+
background: var(--van-tag-purple-background-color);
|
|
90
|
+
color: var(--van-tag-purple-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--violet {
|
|
94
|
+
background: var(--van-tag-violet-background-color);
|
|
95
|
+
color: var(--van-tag-violet-color);
|
|
96
|
+
}
|
|
97
|
+
|
|
71
98
|
&--plain {
|
|
72
99
|
background: var(--van-tag-plain-background-color);
|
|
73
100
|
border-color: currentColor;
|
|
@@ -90,10 +117,17 @@
|
|
|
90
117
|
padding: var(--van-tag-medium-padding);
|
|
91
118
|
}
|
|
92
119
|
|
|
120
|
+
&--small {
|
|
121
|
+
padding: var(--van-tag-small-padding);
|
|
122
|
+
font-size: var(--van-tag-small-font-size);
|
|
123
|
+
--van-tag-right-icon-size: var(--van-tag-small-right-icon-size);
|
|
124
|
+
}
|
|
125
|
+
|
|
93
126
|
&--large {
|
|
94
127
|
padding: var(--van-tag-large-padding);
|
|
95
128
|
font-size: var(--van-tag-large-font-size);
|
|
96
129
|
border-radius: var(--van-tag-large-border-radius);
|
|
130
|
+
--van-tag-right-icon-size: var(--van-tag-large-right-icon-size);
|
|
97
131
|
}
|
|
98
132
|
|
|
99
133
|
&--mark {
|
|
@@ -112,6 +146,16 @@
|
|
|
112
146
|
}
|
|
113
147
|
|
|
114
148
|
&__close {
|
|
115
|
-
margin-left:
|
|
149
|
+
margin-left: var(--van-tag-icon-gap);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&__right-icon {
|
|
153
|
+
margin-left: var(--van-tag-icon-gap);
|
|
154
|
+
font-size: var(--van-tag-right-icon-size);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__number {
|
|
158
|
+
margin-right: 2px;
|
|
159
|
+
font-weight: 600;
|
|
116
160
|
}
|
|
117
161
|
}
|
package/es/tag/var.less
CHANGED
|
@@ -6,10 +6,16 @@
|
|
|
6
6
|
@tag-border-radius: 2px;
|
|
7
7
|
@tag-line-height: 16px;
|
|
8
8
|
@tag-medium-padding: 2px 6px;
|
|
9
|
+
@tag-small-padding: 1px 4px;
|
|
10
|
+
@tag-small-font-size: var(--van-font-size-xs);
|
|
9
11
|
@tag-large-padding: var(--van-padding-base) var(--van-padding-xs);
|
|
10
12
|
@tag-large-border-radius: var(--van-border-radius-md);
|
|
11
13
|
@tag-large-font-size: var(--van-font-size-md);
|
|
12
14
|
@tag-round-border-radius: var(--van-border-radius-max);
|
|
15
|
+
@tag-icon-gap: 2px;
|
|
16
|
+
@tag-right-icon-size: 12px;
|
|
17
|
+
@tag-small-right-icon-size: 10px;
|
|
18
|
+
@tag-large-right-icon-size: 14px;
|
|
13
19
|
|
|
14
20
|
@tag-danger-color: var(--van-red-700);
|
|
15
21
|
@tag-danger-background-color: var(--van-red-100);
|
|
@@ -26,6 +32,13 @@
|
|
|
26
32
|
@tag-gray-color: var(--van-gray-8);
|
|
27
33
|
@tag-gray-background-color: var(--van-gray-3);
|
|
28
34
|
|
|
35
|
+
@tag-turquoise-color: #0f766e;
|
|
36
|
+
@tag-turquoise-background-color: #ccfbf1;
|
|
37
|
+
@tag-purple-color: #7e22ce;
|
|
38
|
+
@tag-purple-background-color: #f3e8ff;
|
|
39
|
+
@tag-violet-color: #6d28d9;
|
|
40
|
+
@tag-violet-background-color: #ede9fe;
|
|
41
|
+
|
|
29
42
|
@tag-default-color: var(--van-gray-6);
|
|
30
43
|
|
|
31
44
|
@tag-plain-background-color: transparent;
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { type ExtractPropTypes
|
|
1
|
+
import { type ExtractPropTypes } from 'vue';
|
|
2
2
|
export declare type TitleBarSize = 'default' | 'mini';
|
|
3
3
|
declare const titleBarProps: {
|
|
4
4
|
title: {
|
|
5
|
-
type: PropType<string>;
|
|
5
|
+
type: import("vue").PropType<string>;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
8
|
description: {
|
|
9
|
-
type: PropType<string>;
|
|
9
|
+
type: import("vue").PropType<string>;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
12
|
icon: StringConstructor;
|
|
13
13
|
showIcon: BooleanConstructor;
|
|
14
14
|
showDescription: BooleanConstructor;
|
|
15
15
|
showArrow: BooleanConstructor;
|
|
16
|
+
actionText: {
|
|
17
|
+
type: import("vue").PropType<string>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
showAction: BooleanConstructor;
|
|
16
21
|
size: {
|
|
17
|
-
type: PropType<TitleBarSize>;
|
|
22
|
+
type: import("vue").PropType<TitleBarSize>;
|
|
18
23
|
default: TitleBarSize;
|
|
19
24
|
};
|
|
20
25
|
expandable: BooleanConstructor;
|
|
@@ -26,19 +31,24 @@ declare const titleBarProps: {
|
|
|
26
31
|
export declare type TitleBarProps = ExtractPropTypes<typeof titleBarProps>;
|
|
27
32
|
declare const _default: import("vue").DefineComponent<{
|
|
28
33
|
title: {
|
|
29
|
-
type: PropType<string>;
|
|
34
|
+
type: import("vue").PropType<string>;
|
|
30
35
|
default: string;
|
|
31
36
|
};
|
|
32
37
|
description: {
|
|
33
|
-
type: PropType<string>;
|
|
38
|
+
type: import("vue").PropType<string>;
|
|
34
39
|
default: string;
|
|
35
40
|
};
|
|
36
41
|
icon: StringConstructor;
|
|
37
42
|
showIcon: BooleanConstructor;
|
|
38
43
|
showDescription: BooleanConstructor;
|
|
39
44
|
showArrow: BooleanConstructor;
|
|
45
|
+
actionText: {
|
|
46
|
+
type: import("vue").PropType<string>;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
49
|
+
showAction: BooleanConstructor;
|
|
40
50
|
size: {
|
|
41
|
-
type: PropType<TitleBarSize>;
|
|
51
|
+
type: import("vue").PropType<TitleBarSize>;
|
|
42
52
|
default: TitleBarSize;
|
|
43
53
|
};
|
|
44
54
|
expandable: BooleanConstructor;
|
|
@@ -46,21 +56,26 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
56
|
type: BooleanConstructor;
|
|
47
57
|
default: true;
|
|
48
58
|
};
|
|
49
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue")[], "click" | "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
59
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue" | "click-action")[], "click" | "change" | "update:modelValue" | "click-action", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
50
60
|
title: {
|
|
51
|
-
type: PropType<string>;
|
|
61
|
+
type: import("vue").PropType<string>;
|
|
52
62
|
default: string;
|
|
53
63
|
};
|
|
54
64
|
description: {
|
|
55
|
-
type: PropType<string>;
|
|
65
|
+
type: import("vue").PropType<string>;
|
|
56
66
|
default: string;
|
|
57
67
|
};
|
|
58
68
|
icon: StringConstructor;
|
|
59
69
|
showIcon: BooleanConstructor;
|
|
60
70
|
showDescription: BooleanConstructor;
|
|
61
71
|
showArrow: BooleanConstructor;
|
|
72
|
+
actionText: {
|
|
73
|
+
type: import("vue").PropType<string>;
|
|
74
|
+
default: string;
|
|
75
|
+
};
|
|
76
|
+
showAction: BooleanConstructor;
|
|
62
77
|
size: {
|
|
63
|
-
type: PropType<TitleBarSize>;
|
|
78
|
+
type: import("vue").PropType<TitleBarSize>;
|
|
64
79
|
default: TitleBarSize;
|
|
65
80
|
};
|
|
66
81
|
expandable: BooleanConstructor;
|
|
@@ -72,13 +87,16 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
87
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
73
88
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
74
89
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
"onClick-action"?: ((...args: any[]) => any) | undefined;
|
|
75
91
|
}, {
|
|
76
92
|
title: string;
|
|
77
93
|
size: TitleBarSize;
|
|
78
94
|
modelValue: boolean;
|
|
79
95
|
description: string;
|
|
96
|
+
actionText: string;
|
|
80
97
|
expandable: boolean;
|
|
81
98
|
showArrow: boolean;
|
|
99
|
+
showAction: boolean;
|
|
82
100
|
showDescription: boolean;
|
|
83
101
|
showIcon: boolean;
|
|
84
102
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { Button } from "../button/index.mjs";
|
|
2
3
|
import { Icon } from "../icon/index.mjs";
|
|
3
4
|
import { createNamespace, makeStringProp, truthProp } from "../utils/index.mjs";
|
|
4
5
|
const [name, bem] = createNamespace("title-bar");
|
|
@@ -9,6 +10,8 @@ const titleBarProps = {
|
|
|
9
10
|
showIcon: Boolean,
|
|
10
11
|
showDescription: Boolean,
|
|
11
12
|
showArrow: Boolean,
|
|
13
|
+
actionText: makeStringProp("\u64CD\u4F5C"),
|
|
14
|
+
showAction: Boolean,
|
|
12
15
|
size: makeStringProp("default"),
|
|
13
16
|
expandable: Boolean,
|
|
14
17
|
modelValue: truthProp
|
|
@@ -16,7 +19,7 @@ const titleBarProps = {
|
|
|
16
19
|
var stdin_default = defineComponent({
|
|
17
20
|
name,
|
|
18
21
|
props: titleBarProps,
|
|
19
|
-
emits: ["update:modelValue", "change", "click"],
|
|
22
|
+
emits: ["update:modelValue", "change", "click", "click-action"],
|
|
20
23
|
setup(props, {
|
|
21
24
|
slots,
|
|
22
25
|
emit
|
|
@@ -28,6 +31,21 @@ var stdin_default = defineComponent({
|
|
|
28
31
|
emit("update:modelValue", value);
|
|
29
32
|
emit("change", value);
|
|
30
33
|
};
|
|
34
|
+
const onHeaderClick = (event) => {
|
|
35
|
+
emit("click", event);
|
|
36
|
+
toggle();
|
|
37
|
+
};
|
|
38
|
+
const onActionClick = (event) => {
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
emit("click-action", event);
|
|
41
|
+
};
|
|
42
|
+
const onHeaderKeydown = (event) => {
|
|
43
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
emit("click", event);
|
|
46
|
+
toggle();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
31
49
|
return () => {
|
|
32
50
|
var _a, _b, _c;
|
|
33
51
|
return _createVNode("section", {
|
|
@@ -35,20 +53,32 @@ var stdin_default = defineComponent({
|
|
|
35
53
|
mini: props.size === "mini",
|
|
36
54
|
expandable: props.expandable
|
|
37
55
|
})
|
|
38
|
-
}, [_createVNode("
|
|
39
|
-
"type": "button",
|
|
56
|
+
}, [_createVNode("div", {
|
|
40
57
|
"class": bem("header"),
|
|
58
|
+
"role": "button",
|
|
59
|
+
"tabindex": "0",
|
|
41
60
|
"aria-expanded": props.expandable ? props.modelValue : void 0,
|
|
42
|
-
"onClick":
|
|
43
|
-
|
|
44
|
-
toggle();
|
|
45
|
-
}
|
|
61
|
+
"onClick": onHeaderClick,
|
|
62
|
+
"onKeydown": onHeaderKeydown
|
|
46
63
|
}, [props.showIcon && props.icon && _createVNode(Icon, {
|
|
47
64
|
"name": props.icon,
|
|
48
65
|
"class": bem("icon")
|
|
49
66
|
}, null), _createVNode("span", {
|
|
50
67
|
"class": bem("text")
|
|
51
|
-
}, [_createVNode("
|
|
68
|
+
}, [_createVNode("span", {
|
|
69
|
+
"class": bem("title-row")
|
|
70
|
+
}, [_createVNode("strong", null, [((_a = slots.title) == null ? void 0 : _a.call(slots)) || props.title]), props.showAction && props.actionText && _createVNode("span", {
|
|
71
|
+
"class": bem("action")
|
|
72
|
+
}, [_createVNode("i", {
|
|
73
|
+
"class": bem("action-divider")
|
|
74
|
+
}, null), _createVNode(Button, {
|
|
75
|
+
"type": "text",
|
|
76
|
+
"size": "small",
|
|
77
|
+
"text": props.actionText,
|
|
78
|
+
"onClick": onActionClick
|
|
79
|
+
}, null)])]), props.size !== "mini" && props.showDescription && props.description && _createVNode("span", {
|
|
80
|
+
"class": bem("description")
|
|
81
|
+
}, [((_b = slots.description) == null ? void 0 : _b.call(slots)) || props.description])]), (props.showArrow || props.expandable) && _createVNode(Icon, {
|
|
52
82
|
"name": "arrow-up",
|
|
53
83
|
"class": bem("arrow", {
|
|
54
84
|
expanded: props.expandable && props.modelValue
|
package/es/title-bar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--van-title-bar-padding: 12px var(--van-padding-md) 4px;--van-title-bar-gap: 4px;--van-title-bar-title-color: var(--van-gray-8);--van-title-bar-description-color: var(--van-gray-6)}.van-title-bar{color:var(--van-title-bar-title-color)}.van-title-bar__header{display:flex;align-items:flex-start;width:100%;padding:var(--van-title-bar-padding);color:inherit;font:inherit;text-align:left;background:transparent;border:0}.van-title-bar--expandable .van-title-bar__header{cursor:pointer}.van-title-bar--expandable .van-title-bar__header:active{background:var(--van-active-color)}.van-title-bar__icon{flex:none;margin:3px 4px 0 0;font-size:16px}.van-title-bar__text{display:flex;flex:1;flex-direction:column;min-width:0}.van-title-bar__text strong{overflow:hidden;font-size:var(--van-font-size-md);font-weight:var(--van-font-weight-bold);line-height:var(--van-line-height-lg);text-overflow:ellipsis;white-space:nowrap}.van-title-
|
|
1
|
+
:root{--van-title-bar-padding: 12px var(--van-padding-md) 4px;--van-title-bar-gap: 4px;--van-title-bar-title-color: var(--van-gray-8);--van-title-bar-description-color: var(--van-gray-6);--van-title-bar-action-divider-before-gap: 8px;--van-title-bar-action-divider-after-gap: 2px;--van-title-bar-action-divider-color: var(--van-gray-4);--van-title-bar-action-divider-height: 12px}.van-title-bar{color:var(--van-title-bar-title-color)}.van-title-bar__header{display:flex;align-items:flex-start;width:100%;padding:var(--van-title-bar-padding);color:inherit;font:inherit;text-align:left;background:transparent;border:0}.van-title-bar--expandable .van-title-bar__header{cursor:pointer}.van-title-bar--expandable .van-title-bar__header:active{background:var(--van-active-color)}.van-title-bar__icon{flex:none;margin:3px 4px 0 0;font-size:16px}.van-title-bar__text{display:flex;flex:1;flex-direction:column;min-width:0}.van-title-bar__title-row{display:flex;align-items:center;min-width:0}.van-title-bar__text strong{flex:0 1 auto;min-width:0;overflow:hidden;font-size:var(--van-font-size-md);font-weight:var(--van-font-weight-bold);line-height:var(--van-line-height-lg);text-overflow:ellipsis;white-space:nowrap}.van-title-bar__description{overflow:hidden;color:var(--van-title-bar-description-color);font-size:var(--van-font-size-sm);font-weight:400;line-height:var(--van-line-height-md);text-overflow:ellipsis;white-space:nowrap}.van-title-bar__action{display:flex;flex:none;align-items:center;margin-left:var(--van-title-bar-action-divider-before-gap)}.van-title-bar__action-divider{width:1px;height:var(--van-title-bar-action-divider-height);margin-right:var(--van-title-bar-action-divider-after-gap);background:var(--van-title-bar-action-divider-color)}.van-title-bar__action .van-button{flex:none}.van-title-bar__arrow{flex:none;margin:4px 0 0 8px;color:var(--van-gray-6);font-size:14px;transition:transform var(--van-animation-duration-fast);transform:rotate(180deg)}.van-title-bar__arrow--expanded{transform:rotate(0)}.van-title-bar--mini .van-title-bar__header{padding-top:12px;padding-bottom:4px}.van-title-bar--mini .van-title-bar__text strong{font-size:var(--van-font-size-sm);line-height:var(--van-line-height-md)}.van-title-bar--mini .van-title-bar__icon{margin-top:3px;font-size:14px}.van-title-bar--mini .van-title-bar__arrow{margin-top:3px}
|
package/es/title-bar/index.d.ts
CHANGED
|
@@ -11,6 +11,11 @@ export declare const TitleBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
11
11
|
showIcon: BooleanConstructor;
|
|
12
12
|
showDescription: BooleanConstructor;
|
|
13
13
|
showArrow: BooleanConstructor;
|
|
14
|
+
actionText: {
|
|
15
|
+
type: import("vue").PropType<string>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
showAction: BooleanConstructor;
|
|
14
19
|
size: {
|
|
15
20
|
type: import("vue").PropType<import("./TitleBar").TitleBarSize>;
|
|
16
21
|
default: import("./TitleBar").TitleBarSize;
|
|
@@ -20,7 +25,7 @@ export declare const TitleBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
20
25
|
type: BooleanConstructor;
|
|
21
26
|
default: true;
|
|
22
27
|
};
|
|
23
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue")[], "click" | "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue" | "click-action")[], "click" | "change" | "update:modelValue" | "click-action", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
29
|
title: {
|
|
25
30
|
type: import("vue").PropType<string>;
|
|
26
31
|
default: string;
|
|
@@ -33,6 +38,11 @@ export declare const TitleBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
33
38
|
showIcon: BooleanConstructor;
|
|
34
39
|
showDescription: BooleanConstructor;
|
|
35
40
|
showArrow: BooleanConstructor;
|
|
41
|
+
actionText: {
|
|
42
|
+
type: import("vue").PropType<string>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
showAction: BooleanConstructor;
|
|
36
46
|
size: {
|
|
37
47
|
type: import("vue").PropType<import("./TitleBar").TitleBarSize>;
|
|
38
48
|
default: import("./TitleBar").TitleBarSize;
|
|
@@ -46,13 +56,16 @@ export declare const TitleBar: import("../utils").WithInstall<import("vue").Defi
|
|
|
46
56
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
47
57
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
48
58
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
"onClick-action"?: ((...args: any[]) => any) | undefined;
|
|
49
60
|
}, {
|
|
50
61
|
title: string;
|
|
51
62
|
size: import("./TitleBar").TitleBarSize;
|
|
52
63
|
modelValue: boolean;
|
|
53
64
|
description: string;
|
|
65
|
+
actionText: string;
|
|
54
66
|
expandable: boolean;
|
|
55
67
|
showArrow: boolean;
|
|
68
|
+
showAction: boolean;
|
|
56
69
|
showDescription: boolean;
|
|
57
70
|
showIcon: boolean;
|
|
58
71
|
}>>;
|
package/es/title-bar/index.less
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
--van-title-bar-gap: @title-bar-gap;
|
|
6
6
|
--van-title-bar-title-color: @title-bar-title-color;
|
|
7
7
|
--van-title-bar-description-color: @title-bar-description-color;
|
|
8
|
+
--van-title-bar-action-divider-before-gap: @title-bar-action-divider-before-gap;
|
|
9
|
+
--van-title-bar-action-divider-after-gap: @title-bar-action-divider-after-gap;
|
|
10
|
+
--van-title-bar-action-divider-color: @title-bar-action-divider-color;
|
|
11
|
+
--van-title-bar-action-divider-height: @title-bar-action-divider-height;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
.van-title-bar {
|
|
@@ -14,8 +18,12 @@
|
|
|
14
18
|
&--expandable &__header { cursor: pointer; &:active { background: var(--van-active-color); } }
|
|
15
19
|
&__icon { flex: none; margin: 3px 4px 0 0; font-size: 16px; }
|
|
16
20
|
&__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
|
|
17
|
-
&
|
|
18
|
-
&__text
|
|
21
|
+
&__title-row { display: flex; align-items: center; min-width: 0; }
|
|
22
|
+
&__text strong { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: var(--van-font-size-md); font-weight: var(--van-font-weight-bold); line-height: var(--van-line-height-lg); text-overflow: ellipsis; white-space: nowrap; }
|
|
23
|
+
&__description { overflow: hidden; color: var(--van-title-bar-description-color); font-size: var(--van-font-size-sm); font-weight: 400; line-height: var(--van-line-height-md); text-overflow: ellipsis; white-space: nowrap; }
|
|
24
|
+
&__action { display: flex; flex: none; align-items: center; margin-left: var(--van-title-bar-action-divider-before-gap); }
|
|
25
|
+
&__action-divider { width: 1px; height: var(--van-title-bar-action-divider-height); margin-right: var(--van-title-bar-action-divider-after-gap); background: var(--van-title-bar-action-divider-color); }
|
|
26
|
+
&__action .van-button { flex: none; }
|
|
19
27
|
&__arrow { flex: none; margin: 4px 0 0 8px; color: var(--van-gray-6); font-size: 14px; transition: transform var(--van-animation-duration-fast); transform: rotate(180deg); }
|
|
20
28
|
&__arrow--expanded { transform: rotate(0); }
|
|
21
29
|
&--mini &__header { padding-top: 12px; padding-bottom: 4px; }
|
package/es/title-bar/var.less
CHANGED
|
@@ -4,3 +4,7 @@
|
|
|
4
4
|
@title-bar-gap: 4px;
|
|
5
5
|
@title-bar-title-color: var(--van-gray-8);
|
|
6
6
|
@title-bar-description-color: var(--van-gray-6);
|
|
7
|
+
@title-bar-action-divider-before-gap: 8px;
|
|
8
|
+
@title-bar-action-divider-after-gap: 2px;
|
|
9
|
+
@title-bar-action-divider-color: var(--van-gray-4);
|
|
10
|
+
@title-bar-action-divider-height: 12px;
|