persagy-vant 0.0.27 → 0.0.28
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/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +1 -1
- package/es/coupon-list/style/less.mjs +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.mjs +4 -4
- package/es/label/Label.d.ts +92 -0
- package/es/label/Label.mjs +95 -0
- package/es/label/index.css +1 -0
- package/es/label/index.d.ts +64 -0
- package/es/label/index.less +113 -0
- package/es/label/index.mjs +8 -0
- package/es/label/style/index.mjs +6 -0
- package/es/label/style/less.mjs +6 -0
- package/es/label/var.less +11 -0
- package/es/location-select/style/index.mjs +1 -1
- package/es/location-select/style/less.mjs +1 -1
- package/es/material-add/MaterialAdd.d.ts +105 -1
- package/es/material-add/MaterialAdd.mjs +63 -23
- package/es/material-add/index.d.ts +73 -1
- package/es/quantity-input/QuantityInput.d.ts +1 -1
- package/es/quantity-input/index.d.ts +2 -2
- package/es/radio-panel/RadioPanel.d.ts +46 -1
- package/es/radio-panel/RadioPanel.mjs +115 -29
- package/es/radio-panel/index.css +1 -1
- package/es/radio-panel/index.d.ts +35 -1
- package/es/radio-panel/index.less +17 -0
- package/es/radio-panel/style/index.mjs +4 -0
- package/es/radio-panel/style/less.mjs +4 -0
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/tabs/TabsTitle.mjs +1 -0
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +11 -0
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.css +1 -1
- package/es/tag/index.less +7 -0
- package/es/tag/var.less +3 -0
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/coupon-list/style/index.js +1 -1
- package/lib/coupon-list/style/less.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +4 -4
- package/lib/index.less +6 -6
- package/lib/label/Label.d.ts +92 -0
- package/lib/label/Label.js +114 -0
- package/lib/label/index.css +1 -0
- package/lib/label/index.d.ts +64 -0
- package/lib/{bot-mobile/session-filter.js → label/index.js} +16 -13
- package/lib/label/index.less +113 -0
- package/lib/label/style/index.js +6 -0
- package/lib/label/style/less.js +6 -0
- package/lib/label/var.less +11 -0
- package/lib/location-select/style/index.js +1 -1
- package/lib/location-select/style/less.js +1 -1
- package/lib/material-add/MaterialAdd.d.ts +105 -1
- package/lib/material-add/MaterialAdd.js +63 -23
- package/lib/material-add/index.d.ts +73 -1
- package/lib/quantity-input/QuantityInput.d.ts +1 -1
- package/lib/quantity-input/index.d.ts +2 -2
- package/lib/radio-panel/RadioPanel.d.ts +46 -1
- package/lib/radio-panel/RadioPanel.js +114 -28
- package/lib/radio-panel/index.css +1 -1
- package/lib/radio-panel/index.d.ts +35 -1
- package/lib/radio-panel/index.less +17 -0
- package/lib/radio-panel/style/index.js +4 -0
- package/lib/radio-panel/style/less.js +4 -0
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/tabs/TabsTitle.js +1 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +11 -0
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.less +7 -0
- package/lib/tag/var.less +3 -0
- package/lib/vant.cjs.js +1212 -1769
- package/lib/vant.es.js +1212 -1769
- package/lib/vant.js +13016 -24376
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +4 -4
- package/es/bot-mobile/BotFab.d.ts +0 -72
- package/es/bot-mobile/BotFab.mjs +0 -152
- package/es/bot-mobile/BotHistoryDrawer.d.ts +0 -72
- package/es/bot-mobile/BotHistoryDrawer.mjs +0 -97
- package/es/bot-mobile/BotMobile.d.ts +0 -83
- package/es/bot-mobile/BotMobile.mjs +0 -47
- package/es/bot-mobile/BotMobileContextTags.d.ts +0 -52
- package/es/bot-mobile/BotMobileContextTags.mjs +0 -52
- package/es/bot-mobile/BotMobilePrompts.d.ts +0 -54
- package/es/bot-mobile/BotMobilePrompts.mjs +0 -49
- package/es/bot-mobile/BotMobileSheet.d.ts +0 -92
- package/es/bot-mobile/BotMobileSheet.mjs +0 -50
- package/es/bot-mobile/BotMobileView.d.ts +0 -82
- package/es/bot-mobile/BotMobileView.mjs +0 -45
- package/es/bot-mobile/BotSessionList.d.ts +0 -71
- package/es/bot-mobile/BotSessionList.mjs +0 -99
- package/es/bot-mobile/BotVoiceBar.d.ts +0 -80
- package/es/bot-mobile/BotVoiceBar.mjs +0 -138
- package/es/bot-mobile/fab-position.d.ts +0 -9
- package/es/bot-mobile/fab-position.mjs +0 -10
- package/es/bot-mobile/fab-position.test.d.ts +0 -1
- package/es/bot-mobile/fab-position.test.mjs +0 -29
- package/es/bot-mobile/index.css +0 -1
- package/es/bot-mobile/index.d.ts +0 -469
- package/es/bot-mobile/index.less +0 -464
- package/es/bot-mobile/index.mjs +0 -50
- package/es/bot-mobile/session-filter.d.ts +0 -6
- package/es/bot-mobile/session-filter.mjs +0 -15
- package/es/bot-mobile/session-item.d.ts +0 -15
- package/es/bot-mobile/session-item.mjs +0 -73
- package/es/bot-mobile/style/index.mjs +0 -15
- package/es/bot-mobile/style/less.mjs +0 -15
- package/es/bot-mobile/types.d.ts +0 -23
- package/es/bot-mobile/types.mjs +0 -0
- package/es/bot-mobile/var.less +0 -58
- package/es/bot-mobile/voice-zone.d.ts +0 -6
- package/es/bot-mobile/voice-zone.mjs +0 -6
- package/es/bot-mobile/voice-zone.test.d.ts +0 -1
- package/es/bot-mobile/voice-zone.test.mjs +0 -19
- package/lib/bot-mobile/BotFab.d.ts +0 -72
- package/lib/bot-mobile/BotFab.js +0 -171
- package/lib/bot-mobile/BotHistoryDrawer.d.ts +0 -72
- package/lib/bot-mobile/BotHistoryDrawer.js +0 -116
- package/lib/bot-mobile/BotMobile.d.ts +0 -83
- package/lib/bot-mobile/BotMobile.js +0 -66
- package/lib/bot-mobile/BotMobileContextTags.d.ts +0 -52
- package/lib/bot-mobile/BotMobileContextTags.js +0 -71
- package/lib/bot-mobile/BotMobilePrompts.d.ts +0 -54
- package/lib/bot-mobile/BotMobilePrompts.js +0 -68
- package/lib/bot-mobile/BotMobileSheet.d.ts +0 -92
- package/lib/bot-mobile/BotMobileSheet.js +0 -79
- package/lib/bot-mobile/BotMobileView.d.ts +0 -82
- package/lib/bot-mobile/BotMobileView.js +0 -64
- package/lib/bot-mobile/BotSessionList.d.ts +0 -71
- package/lib/bot-mobile/BotSessionList.js +0 -118
- package/lib/bot-mobile/BotVoiceBar.d.ts +0 -80
- package/lib/bot-mobile/BotVoiceBar.js +0 -157
- package/lib/bot-mobile/fab-position.d.ts +0 -9
- package/lib/bot-mobile/fab-position.js +0 -29
- package/lib/bot-mobile/fab-position.test.d.ts +0 -1
- package/lib/bot-mobile/fab-position.test.js +0 -29
- package/lib/bot-mobile/index.css +0 -1
- package/lib/bot-mobile/index.d.ts +0 -469
- package/lib/bot-mobile/index.js +0 -79
- package/lib/bot-mobile/index.less +0 -464
- package/lib/bot-mobile/session-filter.d.ts +0 -6
- package/lib/bot-mobile/session-item.d.ts +0 -15
- package/lib/bot-mobile/session-item.js +0 -92
- package/lib/bot-mobile/style/index.js +0 -15
- package/lib/bot-mobile/style/less.js +0 -15
- package/lib/bot-mobile/types.d.ts +0 -23
- package/lib/bot-mobile/types.js +0 -15
- package/lib/bot-mobile/var.less +0 -58
- package/lib/bot-mobile/voice-zone.d.ts +0 -6
- package/lib/bot-mobile/voice-zone.js +0 -25
- package/lib/bot-mobile/voice-zone.test.d.ts +0 -1
- package/lib/bot-mobile/voice-zone.test.js +0 -19
- /package/es/{bot-mobile → label}/var.css +0 -0
- /package/lib/{bot-mobile → label}/var.css +0 -0
package/es/cascader/index.d.ts
CHANGED
|
@@ -60,8 +60,8 @@ export declare const Cascader: import("../utils").WithInstall<import("vue").Defi
|
|
|
60
60
|
closeIcon: string;
|
|
61
61
|
closeable: boolean;
|
|
62
62
|
options: import("./types").CascaderOption[];
|
|
63
|
-
showHeader: boolean;
|
|
64
63
|
swipeable: boolean;
|
|
64
|
+
showHeader: boolean;
|
|
65
65
|
}>>;
|
|
66
66
|
export default Cascader;
|
|
67
67
|
export type { CascaderProps } from './Cascader';
|
|
@@ -13,10 +13,10 @@ import "../../radio-group/index.css";
|
|
|
13
13
|
import "../../radio/index.css";
|
|
14
14
|
import "../../cell/index.css";
|
|
15
15
|
import "../../field/index.css";
|
|
16
|
-
import "../../empty/index.css";
|
|
17
16
|
import "../../sticky/index.css";
|
|
18
17
|
import "../../swipe/index.css";
|
|
19
18
|
import "../../swipe-item/index.css";
|
|
20
19
|
import "../../tabs/index.css";
|
|
21
20
|
import "../../tab/index.css";
|
|
21
|
+
import "../../empty/index.css";
|
|
22
22
|
import "../index.css";
|
|
@@ -13,10 +13,10 @@ import "../../radio-group/index.less";
|
|
|
13
13
|
import "../../radio/index.less";
|
|
14
14
|
import "../../cell/index.less";
|
|
15
15
|
import "../../field/index.less";
|
|
16
|
-
import "../../empty/index.less";
|
|
17
16
|
import "../../sticky/index.less";
|
|
18
17
|
import "../../swipe/index.less";
|
|
19
18
|
import "../../swipe-item/index.less";
|
|
20
19
|
import "../../tabs/index.less";
|
|
21
20
|
import "../../tab/index.less";
|
|
21
|
+
import "../../empty/index.less";
|
|
22
22
|
import "../index.less";
|
package/es/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export * from "./area";
|
|
|
8
8
|
export * from "./background";
|
|
9
9
|
export * from "./badge";
|
|
10
10
|
export * from "./blue-mark";
|
|
11
|
-
export * from "./bot-mobile";
|
|
12
11
|
export * from "./bottom-action-bar";
|
|
13
12
|
export * from "./button";
|
|
14
13
|
export * from "./calendar";
|
|
@@ -50,6 +49,7 @@ export * from "./image";
|
|
|
50
49
|
export * from "./image-preview";
|
|
51
50
|
export * from "./index-anchor";
|
|
52
51
|
export * from "./index-bar";
|
|
52
|
+
export * from "./label";
|
|
53
53
|
export * from "./lazyload";
|
|
54
54
|
export * from "./list";
|
|
55
55
|
export * from "./loading";
|
|
@@ -110,4 +110,4 @@ declare namespace _default {
|
|
|
110
110
|
}
|
|
111
111
|
export default _default;
|
|
112
112
|
export function install(app: any): void;
|
|
113
|
-
export const version: "0.0.
|
|
113
|
+
export const version: "0.0.28";
|
package/es/index.mjs
CHANGED
|
@@ -8,7 +8,6 @@ import { Area } from "./area/index.mjs";
|
|
|
8
8
|
import { Background } from "./background/index.mjs";
|
|
9
9
|
import { Badge } from "./badge/index.mjs";
|
|
10
10
|
import { BlueMark } from "./blue-mark/index.mjs";
|
|
11
|
-
import { BotMobile } from "./bot-mobile/index.mjs";
|
|
12
11
|
import { BottomActionBar } from "./bottom-action-bar/index.mjs";
|
|
13
12
|
import { Button } from "./button/index.mjs";
|
|
14
13
|
import { Calendar } from "./calendar/index.mjs";
|
|
@@ -50,6 +49,7 @@ import { Image } from "./image/index.mjs";
|
|
|
50
49
|
import { ImagePreview } from "./image-preview/index.mjs";
|
|
51
50
|
import { IndexAnchor } from "./index-anchor/index.mjs";
|
|
52
51
|
import { IndexBar } from "./index-bar/index.mjs";
|
|
52
|
+
import { Label } from "./label/index.mjs";
|
|
53
53
|
import { List } from "./list/index.mjs";
|
|
54
54
|
import { Loading } from "./loading/index.mjs";
|
|
55
55
|
import { Locale } from "./locale/index.mjs";
|
|
@@ -103,7 +103,7 @@ import { Uploader } from "./uploader/index.mjs";
|
|
|
103
103
|
import { VideoPreview } from "./video-preview/index.mjs";
|
|
104
104
|
import { WorkOrderCard } from "./work-order-card/index.mjs";
|
|
105
105
|
import { WorkOrderFilter } from "./work-order-filter/index.mjs";
|
|
106
|
-
const version = "0.0.
|
|
106
|
+
const version = "0.0.28";
|
|
107
107
|
function install(app) {
|
|
108
108
|
const components = [
|
|
109
109
|
ActionBar,
|
|
@@ -116,7 +116,6 @@ function install(app) {
|
|
|
116
116
|
Background,
|
|
117
117
|
Badge,
|
|
118
118
|
BlueMark,
|
|
119
|
-
BotMobile,
|
|
120
119
|
BottomActionBar,
|
|
121
120
|
Button,
|
|
122
121
|
Calendar,
|
|
@@ -158,6 +157,7 @@ function install(app) {
|
|
|
158
157
|
ImagePreview,
|
|
159
158
|
IndexAnchor,
|
|
160
159
|
IndexBar,
|
|
160
|
+
Label,
|
|
161
161
|
List,
|
|
162
162
|
Loading,
|
|
163
163
|
Locale,
|
|
@@ -230,7 +230,6 @@ export * from "./area/index.mjs";
|
|
|
230
230
|
export * from "./background/index.mjs";
|
|
231
231
|
export * from "./badge/index.mjs";
|
|
232
232
|
export * from "./blue-mark/index.mjs";
|
|
233
|
-
export * from "./bot-mobile/index.mjs";
|
|
234
233
|
export * from "./bottom-action-bar/index.mjs";
|
|
235
234
|
export * from "./button/index.mjs";
|
|
236
235
|
export * from "./calendar/index.mjs";
|
|
@@ -272,6 +271,7 @@ export * from "./image/index.mjs";
|
|
|
272
271
|
export * from "./image-preview/index.mjs";
|
|
273
272
|
export * from "./index-anchor/index.mjs";
|
|
274
273
|
export * from "./index-bar/index.mjs";
|
|
274
|
+
export * from "./label/index.mjs";
|
|
275
275
|
export * from "./lazyload/index.mjs";
|
|
276
276
|
export * from "./list/index.mjs";
|
|
277
277
|
export * from "./loading/index.mjs";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from 'vue';
|
|
2
|
+
export declare type LabelType = 'default' | 'bold' | 'link' | 'tag' | 'media';
|
|
3
|
+
export declare type LabelMediaType = 'image' | 'video';
|
|
4
|
+
export declare type LabelMedia = {
|
|
5
|
+
url: string;
|
|
6
|
+
type?: LabelMediaType;
|
|
7
|
+
poster?: string;
|
|
8
|
+
alt?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const labelProps: {
|
|
11
|
+
label: {
|
|
12
|
+
type: PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
content: {
|
|
16
|
+
type: PropType<string>;
|
|
17
|
+
default: string;
|
|
18
|
+
};
|
|
19
|
+
type: {
|
|
20
|
+
type: PropType<LabelType>;
|
|
21
|
+
default: LabelType;
|
|
22
|
+
};
|
|
23
|
+
vertical: BooleanConstructor;
|
|
24
|
+
href: StringConstructor;
|
|
25
|
+
tags: {
|
|
26
|
+
type: PropType<string[]>;
|
|
27
|
+
default: () => never[];
|
|
28
|
+
};
|
|
29
|
+
media: {
|
|
30
|
+
type: PropType<LabelMedia[]>;
|
|
31
|
+
default: () => never[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare type LabelProps = ExtractPropTypes<typeof labelProps>;
|
|
35
|
+
declare const _default: import("vue").DefineComponent<{
|
|
36
|
+
label: {
|
|
37
|
+
type: PropType<string>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
content: {
|
|
41
|
+
type: PropType<string>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
type: {
|
|
45
|
+
type: PropType<LabelType>;
|
|
46
|
+
default: LabelType;
|
|
47
|
+
};
|
|
48
|
+
vertical: BooleanConstructor;
|
|
49
|
+
href: StringConstructor;
|
|
50
|
+
tags: {
|
|
51
|
+
type: PropType<string[]>;
|
|
52
|
+
default: () => never[];
|
|
53
|
+
};
|
|
54
|
+
media: {
|
|
55
|
+
type: PropType<LabelMedia[]>;
|
|
56
|
+
default: () => never[];
|
|
57
|
+
};
|
|
58
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "click-media")[], "click" | "click-media", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
59
|
+
label: {
|
|
60
|
+
type: PropType<string>;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
content: {
|
|
64
|
+
type: PropType<string>;
|
|
65
|
+
default: string;
|
|
66
|
+
};
|
|
67
|
+
type: {
|
|
68
|
+
type: PropType<LabelType>;
|
|
69
|
+
default: LabelType;
|
|
70
|
+
};
|
|
71
|
+
vertical: BooleanConstructor;
|
|
72
|
+
href: StringConstructor;
|
|
73
|
+
tags: {
|
|
74
|
+
type: PropType<string[]>;
|
|
75
|
+
default: () => never[];
|
|
76
|
+
};
|
|
77
|
+
media: {
|
|
78
|
+
type: PropType<LabelMedia[]>;
|
|
79
|
+
default: () => never[];
|
|
80
|
+
};
|
|
81
|
+
}>> & {
|
|
82
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
83
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
type: LabelType;
|
|
86
|
+
label: string;
|
|
87
|
+
content: string;
|
|
88
|
+
tags: string[];
|
|
89
|
+
media: LabelMedia[];
|
|
90
|
+
vertical: boolean;
|
|
91
|
+
}>;
|
|
92
|
+
export default _default;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { computed, defineComponent, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { createNamespace, makeStringProp } from "../utils/index.mjs";
|
|
3
|
+
import { Image } from "../image/index.mjs";
|
|
4
|
+
import { Icon } from "../icon/index.mjs";
|
|
5
|
+
import { Tag } from "../tag/index.mjs";
|
|
6
|
+
const [name, bem] = createNamespace("label");
|
|
7
|
+
const labelProps = {
|
|
8
|
+
label: makeStringProp(""),
|
|
9
|
+
content: makeStringProp(""),
|
|
10
|
+
type: makeStringProp("default"),
|
|
11
|
+
vertical: Boolean,
|
|
12
|
+
href: String,
|
|
13
|
+
tags: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
},
|
|
17
|
+
media: {
|
|
18
|
+
type: Array,
|
|
19
|
+
default: () => []
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
var stdin_default = defineComponent({
|
|
23
|
+
name,
|
|
24
|
+
props: labelProps,
|
|
25
|
+
emits: ["click", "click-media"],
|
|
26
|
+
setup(props, {
|
|
27
|
+
slots,
|
|
28
|
+
emit
|
|
29
|
+
}) {
|
|
30
|
+
const vertical = computed(() => props.vertical || props.type === "media");
|
|
31
|
+
const renderText = () => {
|
|
32
|
+
var _a;
|
|
33
|
+
const content = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || props.content;
|
|
34
|
+
if (props.type === "link") {
|
|
35
|
+
return props.href ? _createVNode("a", {
|
|
36
|
+
"class": bem("link"),
|
|
37
|
+
"href": props.href,
|
|
38
|
+
"onClick": (event) => emit("click", event)
|
|
39
|
+
}, [content]) : _createVNode("button", {
|
|
40
|
+
"class": bem("link"),
|
|
41
|
+
"type": "button",
|
|
42
|
+
"onClick": (event) => emit("click", event)
|
|
43
|
+
}, [content]);
|
|
44
|
+
}
|
|
45
|
+
return _createVNode("span", {
|
|
46
|
+
"class": bem("text")
|
|
47
|
+
}, [content]);
|
|
48
|
+
};
|
|
49
|
+
const renderTags = () => _createVNode("div", {
|
|
50
|
+
"class": bem("tags")
|
|
51
|
+
}, [props.tags.map((tag) => _createVNode(Tag, {
|
|
52
|
+
"key": tag,
|
|
53
|
+
"type": "gray"
|
|
54
|
+
}, {
|
|
55
|
+
default: () => [tag]
|
|
56
|
+
}))]);
|
|
57
|
+
const renderMedia = () => _createVNode("div", {
|
|
58
|
+
"class": bem("media")
|
|
59
|
+
}, [props.media.map((item, index) => _createVNode("button", {
|
|
60
|
+
"key": `${item.url}-${index}`,
|
|
61
|
+
"class": bem("media-item"),
|
|
62
|
+
"type": "button",
|
|
63
|
+
"onClick": (event) => emit("click-media", item, index, event)
|
|
64
|
+
}, [_createVNode(Image, {
|
|
65
|
+
"src": item.type === "video" ? item.poster || item.url : item.url,
|
|
66
|
+
"alt": item.alt,
|
|
67
|
+
"width": "64",
|
|
68
|
+
"height": "64",
|
|
69
|
+
"radius": "4",
|
|
70
|
+
"fit": "cover"
|
|
71
|
+
}, null), item.type === "video" && _createVNode(Icon, {
|
|
72
|
+
"name": "play-circle-o",
|
|
73
|
+
"class": bem("play")
|
|
74
|
+
}, null)]))]);
|
|
75
|
+
const renderContent = () => {
|
|
76
|
+
if (props.type === "tag")
|
|
77
|
+
return renderTags();
|
|
78
|
+
if (props.type === "media")
|
|
79
|
+
return renderMedia();
|
|
80
|
+
return renderText();
|
|
81
|
+
};
|
|
82
|
+
return () => _createVNode("div", {
|
|
83
|
+
"class": bem([props.type, {
|
|
84
|
+
vertical: vertical.value
|
|
85
|
+
}])
|
|
86
|
+
}, [_createVNode("span", {
|
|
87
|
+
"class": bem("label")
|
|
88
|
+
}, [props.label]), _createVNode("div", {
|
|
89
|
+
"class": bem("value")
|
|
90
|
+
}, [renderContent()])]);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
stdin_default as default
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--van-label-font-size: var(--van-font-size-md);--van-label-line-height: var(--van-line-height-lg);--van-label-label-color: var(--van-gray-7);--van-label-value-color: var(--van-black);--van-label-bold-color: var(--van-gray-8);--van-label-link-color: var(--van-primary-color);--van-label-gap: 2px;--van-label-tags-gap: 4px;--van-label-media-gap: 6px;--van-label-media-size: 64px;--van-label-media-radius: 4px}.van-label{display:flex;align-items:flex-start;gap:var(--van-label-gap);color:var(--van-label-value-color);font-size:var(--van-label-font-size);line-height:var(--van-label-line-height)}.van-label--vertical{flex-direction:column}.van-label__label{flex:none;color:var(--van-label-label-color);white-space:nowrap}.van-label__value{flex:1;min-width:0;color:inherit;overflow-wrap:anywhere}.van-label__text{display:block}.van-label--bold .van-label__value{color:var(--van-label-bold-color);font-weight:var(--van-font-weight-bold)}.van-label__link{display:inline;padding:0;color:var(--van-label-link-color);font:inherit;font-weight:var(--van-font-weight-bold);text-decoration:none;background:transparent;border:0;cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__link:active{opacity:var(--van-active-opacity)}.van-label__tags,.van-label__media{display:flex;flex-wrap:wrap;align-items:flex-start}.van-label__tags{gap:var(--van-label-tags-gap);min-height:var(--van-label-line-height);align-items:center}.van-label__media{gap:var(--van-label-media-gap);width:100%}.van-label__media-item{position:relative;flex:none;width:var(--van-label-media-size);height:var(--van-label-media-size);padding:0;overflow:hidden;background:transparent;border:0;border-radius:var(--van-label-media-radius);cursor:pointer;transition:opacity var(--van-animation-duration-fast)}.van-label__media-item:active{opacity:var(--van-active-opacity)}.van-label__play{position:absolute;top:50%;left:50%;color:var(--van-white);font-size:24px;transform:translate(-50%,-50%);text-shadow:0 1px 2px rgba(0,0,0,.45)}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export declare const Label: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
label: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
content: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
type: {
|
|
11
|
+
type: import("vue").PropType<import("./Label").LabelType>;
|
|
12
|
+
default: import("./Label").LabelType;
|
|
13
|
+
};
|
|
14
|
+
vertical: BooleanConstructor;
|
|
15
|
+
href: StringConstructor;
|
|
16
|
+
tags: {
|
|
17
|
+
type: import("vue").PropType<string[]>;
|
|
18
|
+
default: () => never[];
|
|
19
|
+
};
|
|
20
|
+
media: {
|
|
21
|
+
type: import("vue").PropType<import("./Label").LabelMedia[]>;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "click-media")[], "click" | "click-media", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
+
label: {
|
|
26
|
+
type: import("vue").PropType<string>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
content: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
type: {
|
|
34
|
+
type: import("vue").PropType<import("./Label").LabelType>;
|
|
35
|
+
default: import("./Label").LabelType;
|
|
36
|
+
};
|
|
37
|
+
vertical: BooleanConstructor;
|
|
38
|
+
href: StringConstructor;
|
|
39
|
+
tags: {
|
|
40
|
+
type: import("vue").PropType<string[]>;
|
|
41
|
+
default: () => never[];
|
|
42
|
+
};
|
|
43
|
+
media: {
|
|
44
|
+
type: import("vue").PropType<import("./Label").LabelMedia[]>;
|
|
45
|
+
default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
}>> & {
|
|
48
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
49
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
type: import("./Label").LabelType;
|
|
52
|
+
label: string;
|
|
53
|
+
content: string;
|
|
54
|
+
tags: string[];
|
|
55
|
+
media: import("./Label").LabelMedia[];
|
|
56
|
+
vertical: boolean;
|
|
57
|
+
}>>;
|
|
58
|
+
export default Label;
|
|
59
|
+
export type { LabelMedia, LabelMediaType, LabelProps, LabelType } from './Label';
|
|
60
|
+
declare module 'vue' {
|
|
61
|
+
interface GlobalComponents {
|
|
62
|
+
VanLabel: typeof Label;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
@import './var.less';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--van-label-font-size: @label-font-size;
|
|
5
|
+
--van-label-line-height: @label-line-height;
|
|
6
|
+
--van-label-label-color: @label-label-color;
|
|
7
|
+
--van-label-value-color: @label-value-color;
|
|
8
|
+
--van-label-bold-color: @label-bold-color;
|
|
9
|
+
--van-label-link-color: @label-link-color;
|
|
10
|
+
--van-label-gap: @label-gap;
|
|
11
|
+
--van-label-tags-gap: @label-tags-gap;
|
|
12
|
+
--van-label-media-gap: @label-media-gap;
|
|
13
|
+
--van-label-media-size: @label-media-size;
|
|
14
|
+
--van-label-media-radius: @label-media-radius;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.van-label {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
gap: var(--van-label-gap);
|
|
21
|
+
color: var(--van-label-value-color);
|
|
22
|
+
font-size: var(--van-label-font-size);
|
|
23
|
+
line-height: var(--van-label-line-height);
|
|
24
|
+
|
|
25
|
+
&--vertical {
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__label {
|
|
30
|
+
flex: none;
|
|
31
|
+
color: var(--van-label-label-color);
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__value {
|
|
36
|
+
flex: 1;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
color: inherit;
|
|
39
|
+
overflow-wrap: anywhere;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&__text {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&--bold .van-label__value {
|
|
47
|
+
color: var(--van-label-bold-color);
|
|
48
|
+
font-weight: var(--van-font-weight-bold);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__link {
|
|
52
|
+
display: inline;
|
|
53
|
+
padding: 0;
|
|
54
|
+
color: var(--van-label-link-color);
|
|
55
|
+
font: inherit;
|
|
56
|
+
font-weight: var(--van-font-weight-bold);
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
background: transparent;
|
|
59
|
+
border: 0;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: opacity var(--van-animation-duration-fast);
|
|
62
|
+
|
|
63
|
+
&:active {
|
|
64
|
+
opacity: var(--van-active-opacity);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&__tags,
|
|
69
|
+
&__media {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-wrap: wrap;
|
|
72
|
+
align-items: flex-start;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&__tags {
|
|
76
|
+
gap: var(--van-label-tags-gap);
|
|
77
|
+
min-height: var(--van-label-line-height);
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__media {
|
|
82
|
+
gap: var(--van-label-media-gap);
|
|
83
|
+
width: 100%;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&__media-item {
|
|
87
|
+
position: relative;
|
|
88
|
+
flex: none;
|
|
89
|
+
width: var(--van-label-media-size);
|
|
90
|
+
height: var(--van-label-media-size);
|
|
91
|
+
padding: 0;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
background: transparent;
|
|
94
|
+
border: 0;
|
|
95
|
+
border-radius: var(--van-label-media-radius);
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
transition: opacity var(--van-animation-duration-fast);
|
|
98
|
+
|
|
99
|
+
&:active {
|
|
100
|
+
opacity: var(--van-active-opacity);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&__play {
|
|
105
|
+
position: absolute;
|
|
106
|
+
top: 50%;
|
|
107
|
+
left: 50%;
|
|
108
|
+
color: var(--van-white);
|
|
109
|
+
font-size: 24px;
|
|
110
|
+
transform: translate(-50%, -50%);
|
|
111
|
+
text-shadow: 0 1px 2px rgb(0 0 0 / 45%);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@label-font-size: var(--van-font-size-md);
|
|
2
|
+
@label-line-height: var(--van-line-height-lg);
|
|
3
|
+
@label-label-color: var(--van-gray-7);
|
|
4
|
+
@label-value-color: var(--van-black);
|
|
5
|
+
@label-bold-color: var(--van-gray-8);
|
|
6
|
+
@label-link-color: var(--van-primary-color);
|
|
7
|
+
@label-gap: 2px;
|
|
8
|
+
@label-tags-gap: 4px;
|
|
9
|
+
@label-media-gap: 6px;
|
|
10
|
+
@label-media-size: 64px;
|
|
11
|
+
@label-media-radius: 4px;
|
|
@@ -17,8 +17,8 @@ import "../../radio/index.css";
|
|
|
17
17
|
import "../../cell/index.css";
|
|
18
18
|
import "../../tree-select/index.css";
|
|
19
19
|
import "../../field/index.css";
|
|
20
|
-
import "../../dialog/index.css";
|
|
21
20
|
import "../../search/index.css";
|
|
21
|
+
import "../../dialog/index.css";
|
|
22
22
|
import "../../sticky/index.css";
|
|
23
23
|
import "../../swipe/index.css";
|
|
24
24
|
import "../../swipe-item/index.css";
|
|
@@ -17,8 +17,8 @@ import "../../radio/index.less";
|
|
|
17
17
|
import "../../cell/index.less";
|
|
18
18
|
import "../../tree-select/index.less";
|
|
19
19
|
import "../../field/index.less";
|
|
20
|
-
import "../../dialog/index.less";
|
|
21
20
|
import "../../search/index.less";
|
|
21
|
+
import "../../dialog/index.less";
|
|
22
22
|
import "../../sticky/index.less";
|
|
23
23
|
import "../../swipe/index.less";
|
|
24
24
|
import "../../swipe-item/index.less";
|