persagy-vant 0.0.28 → 0.0.30
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/blue-mark/CollapseToggle.d.ts +4 -0
- package/es/blue-mark/CollapseToggle.mjs +11 -1
- package/es/blue-mark/index.css +1 -1
- package/es/blue-mark/index.d.ts +3 -0
- package/es/blue-mark/index.less +25 -0
- package/es/blue-mark/style/index.mjs +1 -0
- package/es/blue-mark/style/less.mjs +1 -0
- package/es/collapse-toggle/index.css +1 -0
- package/es/collapse-toggle/index.d.ts +2 -0
- package/es/collapse-toggle/index.less +1 -0
- package/es/collapse-toggle/index.mjs +4 -0
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/info-card/InfoCard.d.ts +128 -0
- package/es/info-card/InfoCard.mjs +84 -0
- package/es/info-card/index.css +1 -0
- package/es/info-card/index.d.ts +88 -0
- package/es/info-card/index.less +60 -0
- package/es/info-card/index.mjs +8 -0
- package/es/info-card/style/index.mjs +8 -0
- package/es/info-card/style/less.mjs +8 -0
- package/es/info-card/var.css +0 -0
- package/es/info-card/var.less +7 -0
- package/es/label/Label.d.ts +3 -0
- package/es/label/Label.mjs +9 -2
- package/es/label/index.css +1 -1
- package/es/label/index.d.ts +2 -0
- package/es/label/index.less +35 -0
- package/es/label/var.less +5 -0
- package/es/loading/Loading.d.ts +1 -1
- package/es/loading/Loading.mjs +40 -4
- package/es/loading/assets/building.gif +0 -0
- package/es/loading/index.css +1 -1
- package/es/loading/index.less +14 -0
- package/es/material-add/style/index.mjs +2 -1
- package/es/material-add/style/less.mjs +2 -1
- package/es/multi-person-select/style/index.mjs +2 -1
- package/es/multi-person-select/style/less.mjs +2 -1
- package/es/object-select/style/index.mjs +2 -1
- package/es/object-select/style/less.mjs +2 -1
- package/es/single-person-select/style/index.mjs +2 -1
- package/es/single-person-select/style/less.mjs +2 -1
- package/es/tag/Tag.mjs +1 -1
- package/es/vue-sfc-shim.d.ts +5 -0
- package/es/work-order-filter/style/index.mjs +2 -1
- package/es/work-order-filter/style/less.mjs +2 -1
- package/lib/blue-mark/CollapseToggle.d.ts +4 -0
- package/lib/blue-mark/CollapseToggle.js +11 -1
- package/lib/blue-mark/index.css +1 -1
- package/lib/blue-mark/index.d.ts +3 -0
- package/lib/blue-mark/index.less +25 -0
- package/lib/blue-mark/style/index.js +1 -0
- package/lib/blue-mark/style/less.js +1 -0
- package/lib/collapse-toggle/index.css +1 -0
- package/lib/collapse-toggle/index.d.ts +2 -0
- package/lib/collapse-toggle/index.js +23 -0
- package/lib/collapse-toggle/index.less +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/index.less +7 -6
- package/lib/info-card/InfoCard.d.ts +128 -0
- package/lib/info-card/InfoCard.js +113 -0
- package/lib/info-card/index.css +1 -0
- package/lib/info-card/index.d.ts +88 -0
- package/lib/info-card/index.js +37 -0
- package/lib/info-card/index.less +60 -0
- package/lib/info-card/style/index.js +8 -0
- package/lib/info-card/style/less.js +8 -0
- package/lib/info-card/var.css +0 -0
- package/lib/info-card/var.less +7 -0
- package/lib/label/Label.d.ts +3 -0
- package/lib/label/Label.js +9 -2
- package/lib/label/index.css +1 -1
- package/lib/label/index.d.ts +2 -0
- package/lib/label/index.less +35 -0
- package/lib/label/var.less +5 -0
- package/lib/loading/Loading.d.ts +1 -1
- package/lib/loading/Loading.js +40 -4
- package/lib/loading/assets/building.gif +0 -0
- package/lib/loading/index.css +1 -1
- package/lib/loading/index.less +14 -0
- package/lib/material-add/style/index.js +2 -1
- package/lib/material-add/style/less.js +2 -1
- package/lib/multi-person-select/style/index.js +2 -1
- package/lib/multi-person-select/style/less.js +2 -1
- package/lib/object-select/style/index.js +2 -1
- package/lib/object-select/style/less.js +2 -1
- package/lib/single-person-select/style/index.js +2 -1
- package/lib/single-person-select/style/less.js +2 -1
- package/lib/tag/Tag.js +1 -1
- package/lib/vant.cjs.js +541 -410
- package/lib/vant.es.js +541 -410
- package/lib/vant.js +541 -410
- package/lib/vant.min.js +1 -1
- package/lib/vue-sfc-shim.d.ts +5 -0
- package/lib/web-types.json +1 -1
- package/lib/work-order-filter/style/index.js +2 -1
- package/lib/work-order-filter/style/less.js +2 -1
- package/package.json +2 -1
- package/skills/use-persagy-vant/SKILL.md +2 -2
- package/skills/use-persagy-vant/agents/openai.yaml +1 -1
- package/skills/use-persagy-vant/references/business-component-catalog.md +3 -1
- package/skills/use-persagy-vant/references/component-catalog.md +7 -2
- package/skills/use-persagy-vant/references/component-documentation.md +45 -0
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +4 -3
- package/skills/use-persagy-vant/references/page-recipes.md +10 -7
package/lib/index.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export * from "./image";
|
|
|
49
49
|
export * from "./image-preview";
|
|
50
50
|
export * from "./index-anchor";
|
|
51
51
|
export * from "./index-bar";
|
|
52
|
+
export * from "./info-card";
|
|
52
53
|
export * from "./label";
|
|
53
54
|
export * from "./lazyload";
|
|
54
55
|
export * from "./list";
|
|
@@ -110,4 +111,4 @@ declare namespace _default {
|
|
|
110
111
|
}
|
|
111
112
|
export default _default;
|
|
112
113
|
export function install(app: any): void;
|
|
113
|
-
export const version: "0.0.
|
|
114
|
+
export const version: "0.0.30";
|
package/lib/index.js
CHANGED
|
@@ -74,6 +74,7 @@ var import_image = require("./image");
|
|
|
74
74
|
var import_image_preview = require("./image-preview");
|
|
75
75
|
var import_index_anchor = require("./index-anchor");
|
|
76
76
|
var import_index_bar = require("./index-bar");
|
|
77
|
+
var import_info_card = require("./info-card");
|
|
77
78
|
var import_label = require("./label");
|
|
78
79
|
var import_list = require("./list");
|
|
79
80
|
var import_loading = require("./loading");
|
|
@@ -179,6 +180,7 @@ __reExport(stdin_exports, require("./image"), module.exports);
|
|
|
179
180
|
__reExport(stdin_exports, require("./image-preview"), module.exports);
|
|
180
181
|
__reExport(stdin_exports, require("./index-anchor"), module.exports);
|
|
181
182
|
__reExport(stdin_exports, require("./index-bar"), module.exports);
|
|
183
|
+
__reExport(stdin_exports, require("./info-card"), module.exports);
|
|
182
184
|
__reExport(stdin_exports, require("./label"), module.exports);
|
|
183
185
|
__reExport(stdin_exports, require("./lazyload"), module.exports);
|
|
184
186
|
__reExport(stdin_exports, require("./list"), module.exports);
|
|
@@ -234,7 +236,7 @@ __reExport(stdin_exports, require("./uploader"), module.exports);
|
|
|
234
236
|
__reExport(stdin_exports, require("./video-preview"), module.exports);
|
|
235
237
|
__reExport(stdin_exports, require("./work-order-card"), module.exports);
|
|
236
238
|
__reExport(stdin_exports, require("./work-order-filter"), module.exports);
|
|
237
|
-
const version = "0.0.
|
|
239
|
+
const version = "0.0.30";
|
|
238
240
|
function install(app) {
|
|
239
241
|
const components = [
|
|
240
242
|
import_action_bar.ActionBar,
|
|
@@ -288,6 +290,7 @@ function install(app) {
|
|
|
288
290
|
import_image_preview.ImagePreview,
|
|
289
291
|
import_index_anchor.IndexAnchor,
|
|
290
292
|
import_index_bar.IndexBar,
|
|
293
|
+
import_info_card.InfoCard,
|
|
291
294
|
import_label.Label,
|
|
292
295
|
import_list.List,
|
|
293
296
|
import_loading.Loading,
|
package/lib/index.less
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
@import "./notice-bar/index.less";
|
|
6
6
|
@import "./image/index.less";
|
|
7
7
|
@import "./filter-tag/index.less";
|
|
8
|
-
@import "./blue-mark/index.less";
|
|
9
8
|
@import "./tag/index.less";
|
|
10
9
|
@import "./label/index.less";
|
|
11
10
|
@import "./card/index.less";
|
|
@@ -39,7 +38,6 @@
|
|
|
39
38
|
@import "./radio-group/index.less";
|
|
40
39
|
@import "./radio/index.less";
|
|
41
40
|
@import "./cell/index.less";
|
|
42
|
-
@import "./work-order-filter/index.less";
|
|
43
41
|
@import "./rate/index.less";
|
|
44
42
|
@import "./quantity-input/index.less";
|
|
45
43
|
@import "./tree-select/index.less";
|
|
@@ -51,12 +49,17 @@
|
|
|
51
49
|
@import "./address-list/index.less";
|
|
52
50
|
@import "./field/index.less";
|
|
53
51
|
@import "./search/index.less";
|
|
54
|
-
@import "./single-person-select/index.less";
|
|
55
|
-
@import "./multi-person-select/index.less";
|
|
56
52
|
@import "./dialog/index.less";
|
|
57
53
|
@import "./contact-edit/index.less";
|
|
58
54
|
@import "./address-edit/index.less";
|
|
59
55
|
@import "./background/index.less";
|
|
56
|
+
@import "./divider/index.less";
|
|
57
|
+
@import "./work-order-card/index.less";
|
|
58
|
+
@import "./info-card/index.less";
|
|
59
|
+
@import "./blue-mark/index.less";
|
|
60
|
+
@import "./work-order-filter/index.less";
|
|
61
|
+
@import "./single-person-select/index.less";
|
|
62
|
+
@import "./multi-person-select/index.less";
|
|
60
63
|
@import "./sticky/index.less";
|
|
61
64
|
@import "./swipe/index.less";
|
|
62
65
|
@import "./swipe-item/index.less";
|
|
@@ -75,8 +78,6 @@
|
|
|
75
78
|
@import "./empty/index.less";
|
|
76
79
|
@import "./radio-panel/index.less";
|
|
77
80
|
@import "./coupon-list/index.less";
|
|
78
|
-
@import "./divider/index.less";
|
|
79
|
-
@import "./work-order-card/index.less";
|
|
80
81
|
@import "./dropdown-menu/index.less";
|
|
81
82
|
@import "./dropdown-item/index.less";
|
|
82
83
|
@import "./sidebar/index.less";
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from 'vue';
|
|
2
|
+
import { type LabelMedia, type LabelType } from '../label';
|
|
3
|
+
export declare type InfoCardField = {
|
|
4
|
+
label: string;
|
|
5
|
+
content?: string;
|
|
6
|
+
type?: LabelType;
|
|
7
|
+
vertical?: boolean;
|
|
8
|
+
href?: string;
|
|
9
|
+
tags?: string[];
|
|
10
|
+
media?: LabelMedia[];
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const infoCardProps: {
|
|
14
|
+
title: {
|
|
15
|
+
type: PropType<string>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
showTitle: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
default: true;
|
|
21
|
+
};
|
|
22
|
+
fields: {
|
|
23
|
+
type: PropType<InfoCardField[]>;
|
|
24
|
+
default: () => never[];
|
|
25
|
+
};
|
|
26
|
+
extraFields: {
|
|
27
|
+
type: PropType<InfoCardField[]>;
|
|
28
|
+
default: () => never[];
|
|
29
|
+
};
|
|
30
|
+
modelValue: BooleanConstructor;
|
|
31
|
+
collapsible: BooleanConstructor;
|
|
32
|
+
showCollapse: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: true;
|
|
35
|
+
};
|
|
36
|
+
divider: BooleanConstructor;
|
|
37
|
+
expandText: {
|
|
38
|
+
type: PropType<string>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
collapseText: {
|
|
42
|
+
type: PropType<string>;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare type InfoCardProps = ExtractPropTypes<typeof infoCardProps>;
|
|
47
|
+
declare const _default: import("vue").DefineComponent<{
|
|
48
|
+
title: {
|
|
49
|
+
type: PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
showTitle: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: true;
|
|
55
|
+
};
|
|
56
|
+
fields: {
|
|
57
|
+
type: PropType<InfoCardField[]>;
|
|
58
|
+
default: () => never[];
|
|
59
|
+
};
|
|
60
|
+
extraFields: {
|
|
61
|
+
type: PropType<InfoCardField[]>;
|
|
62
|
+
default: () => never[];
|
|
63
|
+
};
|
|
64
|
+
modelValue: BooleanConstructor;
|
|
65
|
+
collapsible: BooleanConstructor;
|
|
66
|
+
showCollapse: {
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
default: true;
|
|
69
|
+
};
|
|
70
|
+
divider: BooleanConstructor;
|
|
71
|
+
expandText: {
|
|
72
|
+
type: PropType<string>;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
collapseText: {
|
|
76
|
+
type: PropType<string>;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue" | "click-media")[], "click" | "change" | "update:modelValue" | "click-media", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
80
|
+
title: {
|
|
81
|
+
type: PropType<string>;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
showTitle: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: true;
|
|
87
|
+
};
|
|
88
|
+
fields: {
|
|
89
|
+
type: PropType<InfoCardField[]>;
|
|
90
|
+
default: () => never[];
|
|
91
|
+
};
|
|
92
|
+
extraFields: {
|
|
93
|
+
type: PropType<InfoCardField[]>;
|
|
94
|
+
default: () => never[];
|
|
95
|
+
};
|
|
96
|
+
modelValue: BooleanConstructor;
|
|
97
|
+
collapsible: BooleanConstructor;
|
|
98
|
+
showCollapse: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: true;
|
|
101
|
+
};
|
|
102
|
+
divider: BooleanConstructor;
|
|
103
|
+
expandText: {
|
|
104
|
+
type: PropType<string>;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
collapseText: {
|
|
108
|
+
type: PropType<string>;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
}>> & {
|
|
112
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
115
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
title: string;
|
|
118
|
+
modelValue: boolean;
|
|
119
|
+
fields: InfoCardField[];
|
|
120
|
+
divider: boolean;
|
|
121
|
+
expandText: string;
|
|
122
|
+
collapseText: string;
|
|
123
|
+
showTitle: boolean;
|
|
124
|
+
extraFields: InfoCardField[];
|
|
125
|
+
collapsible: boolean;
|
|
126
|
+
showCollapse: boolean;
|
|
127
|
+
}>;
|
|
128
|
+
export default _default;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name2 in all)
|
|
9
|
+
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
default: () => stdin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_vue = require("vue");
|
|
34
|
+
var import_utils = require("../utils");
|
|
35
|
+
var import_collapse_toggle = __toESM(require("../collapse-toggle"));
|
|
36
|
+
var import_divider = require("../divider");
|
|
37
|
+
var import_label = require("../label");
|
|
38
|
+
const [name, bem] = (0, import_utils.createNamespace)("info-card");
|
|
39
|
+
const infoCardProps = {
|
|
40
|
+
title: (0, import_utils.makeStringProp)(""),
|
|
41
|
+
showTitle: import_utils.truthProp,
|
|
42
|
+
fields: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
46
|
+
extraFields: {
|
|
47
|
+
type: Array,
|
|
48
|
+
default: () => []
|
|
49
|
+
},
|
|
50
|
+
modelValue: Boolean,
|
|
51
|
+
collapsible: Boolean,
|
|
52
|
+
showCollapse: import_utils.truthProp,
|
|
53
|
+
divider: Boolean,
|
|
54
|
+
expandText: (0, import_utils.makeStringProp)("\u67E5\u770B\u66F4\u591A"),
|
|
55
|
+
collapseText: (0, import_utils.makeStringProp)("\u6536\u8D77")
|
|
56
|
+
};
|
|
57
|
+
var stdin_default = (0, import_vue.defineComponent)({
|
|
58
|
+
name,
|
|
59
|
+
props: infoCardProps,
|
|
60
|
+
emits: ["update:modelValue", "change", "click", "click-media"],
|
|
61
|
+
setup(props, {
|
|
62
|
+
slots,
|
|
63
|
+
emit
|
|
64
|
+
}) {
|
|
65
|
+
const visibleFields = (0, import_vue.computed)(() => props.fields.filter((field) => field.visible !== false));
|
|
66
|
+
const visibleExtraFields = (0, import_vue.computed)(() => props.extraFields.filter((field) => field.visible !== false));
|
|
67
|
+
const hasExtra = (0, import_vue.computed)(() => visibleExtraFields.value.length > 0 || !!slots.extra);
|
|
68
|
+
const showCollapse = (0, import_vue.computed)(() => props.collapsible && props.showCollapse);
|
|
69
|
+
const showExtra = (0, import_vue.computed)(() => !showCollapse.value || props.modelValue);
|
|
70
|
+
const renderField = (field, index) => (0, import_vue.createVNode)(import_label.Label, {
|
|
71
|
+
"key": `${field.label}-${index}`,
|
|
72
|
+
"label": field.label,
|
|
73
|
+
"content": field.content,
|
|
74
|
+
"type": field.type,
|
|
75
|
+
"vertical": field.vertical,
|
|
76
|
+
"href": field.href,
|
|
77
|
+
"tags": field.tags,
|
|
78
|
+
"media": field.media,
|
|
79
|
+
"onClick": (event) => emit("click", field, index, event),
|
|
80
|
+
"onClick-media": (item, mediaIndex, event) => emit("click-media", item, mediaIndex, field, index, event)
|
|
81
|
+
}, null);
|
|
82
|
+
const renderExtra = () => {
|
|
83
|
+
var _a;
|
|
84
|
+
if (!hasExtra.value)
|
|
85
|
+
return;
|
|
86
|
+
const extraSlot = (_a = slots.extra) == null ? void 0 : _a.call(slots);
|
|
87
|
+
return (0, import_vue.createVNode)(import_vue.Transition, {
|
|
88
|
+
"name": "van-info-card-expand"
|
|
89
|
+
}, {
|
|
90
|
+
default: () => [showExtra.value && (0, import_vue.createVNode)("div", {
|
|
91
|
+
"class": bem("extra")
|
|
92
|
+
}, [visibleExtraFields.value.map(renderField), extraSlot])]
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
return () => {
|
|
96
|
+
var _a, _b;
|
|
97
|
+
return (0, import_vue.createVNode)("section", {
|
|
98
|
+
"class": bem()
|
|
99
|
+
}, [props.showTitle && (slots.title || props.title) && (0, import_vue.createVNode)("div", {
|
|
100
|
+
"class": bem("title")
|
|
101
|
+
}, [((_a = slots.title) == null ? void 0 : _a.call(slots)) || props.title]), visibleFields.value.map(renderField), (_b = slots.default) == null ? void 0 : _b.call(slots), hasExtra.value && showCollapse.value && (0, import_vue.createVNode)(import_collapse_toggle.default, {
|
|
102
|
+
"modelValue": props.modelValue,
|
|
103
|
+
"divider": true,
|
|
104
|
+
"expandText": props.expandText,
|
|
105
|
+
"collapseText": props.collapseText,
|
|
106
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
107
|
+
"onChange": (value) => emit("change", value)
|
|
108
|
+
}, null), hasExtra.value && !showCollapse.value && props.divider && (0, import_vue.createVNode)(import_divider.Divider, {
|
|
109
|
+
"class": bem("divider")
|
|
110
|
+
}, null), renderExtra()]);
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--van-info-card-padding: 12px var(--van-padding-md);--van-info-card-radius: var(--van-border-radius-lg);--van-info-card-gap: 4px;--van-info-card-title-color: var(--van-gray-8);--van-info-card-title-font-size: var(--van-font-size-md);--van-info-card-title-line-height: var(--van-line-height-lg);--van-info-card-divider-margin: 10px 0}.van-info-card{display:flex;flex-direction:column;gap:var(--van-info-card-gap);padding:var(--van-info-card-padding);overflow:hidden;background:var(--van-white);border-radius:var(--van-info-card-radius)}.van-info-card__title{color:var(--van-info-card-title-color);font-size:var(--van-info-card-title-font-size);font-weight:var(--van-font-weight-bold);line-height:var(--van-info-card-title-line-height);overflow-wrap:anywhere}.van-info-card__extra{display:flex;flex-direction:column;gap:var(--van-info-card-gap)}.van-info-card__divider.van-divider{width:100%;margin:var(--van-info-card-divider-margin)}.van-info-card-expand-enter-active,.van-info-card-expand-leave-active{overflow:hidden;transition:max-height var(--van-animation-duration-fast) var(--van-animation-timing-function-enter),opacity var(--van-animation-duration-fast) ease}.van-info-card-expand-enter-from,.van-info-card-expand-leave-to{max-height:0;opacity:0}.van-info-card-expand-enter-to,.van-info-card-expand-leave-from{max-height:480px;opacity:1}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const InfoCard: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
title: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
showTitle: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: true;
|
|
9
|
+
};
|
|
10
|
+
fields: {
|
|
11
|
+
type: import("vue").PropType<import("./InfoCard").InfoCardField[]>;
|
|
12
|
+
default: () => never[];
|
|
13
|
+
};
|
|
14
|
+
extraFields: {
|
|
15
|
+
type: import("vue").PropType<import("./InfoCard").InfoCardField[]>;
|
|
16
|
+
default: () => never[];
|
|
17
|
+
};
|
|
18
|
+
modelValue: BooleanConstructor;
|
|
19
|
+
collapsible: BooleanConstructor;
|
|
20
|
+
showCollapse: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: true;
|
|
23
|
+
};
|
|
24
|
+
divider: BooleanConstructor;
|
|
25
|
+
expandText: {
|
|
26
|
+
type: import("vue").PropType<string>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
collapseText: {
|
|
30
|
+
type: import("vue").PropType<string>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "change" | "update:modelValue" | "click-media")[], "click" | "change" | "update:modelValue" | "click-media", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
|
+
title: {
|
|
35
|
+
type: import("vue").PropType<string>;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
showTitle: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: true;
|
|
41
|
+
};
|
|
42
|
+
fields: {
|
|
43
|
+
type: import("vue").PropType<import("./InfoCard").InfoCardField[]>;
|
|
44
|
+
default: () => never[];
|
|
45
|
+
};
|
|
46
|
+
extraFields: {
|
|
47
|
+
type: import("vue").PropType<import("./InfoCard").InfoCardField[]>;
|
|
48
|
+
default: () => never[];
|
|
49
|
+
};
|
|
50
|
+
modelValue: BooleanConstructor;
|
|
51
|
+
collapsible: BooleanConstructor;
|
|
52
|
+
showCollapse: {
|
|
53
|
+
type: BooleanConstructor;
|
|
54
|
+
default: true;
|
|
55
|
+
};
|
|
56
|
+
divider: BooleanConstructor;
|
|
57
|
+
expandText: {
|
|
58
|
+
type: import("vue").PropType<string>;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
collapseText: {
|
|
62
|
+
type: import("vue").PropType<string>;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
}>> & {
|
|
66
|
+
onChange?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
onClick?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
title: string;
|
|
72
|
+
modelValue: boolean;
|
|
73
|
+
fields: import("./InfoCard").InfoCardField[];
|
|
74
|
+
divider: boolean;
|
|
75
|
+
expandText: string;
|
|
76
|
+
collapseText: string;
|
|
77
|
+
showTitle: boolean;
|
|
78
|
+
extraFields: import("./InfoCard").InfoCardField[];
|
|
79
|
+
collapsible: boolean;
|
|
80
|
+
showCollapse: boolean;
|
|
81
|
+
}>>;
|
|
82
|
+
export default InfoCard;
|
|
83
|
+
export type { InfoCardField, InfoCardProps } from './InfoCard';
|
|
84
|
+
declare module 'vue' {
|
|
85
|
+
interface GlobalComponents {
|
|
86
|
+
VanInfoCard: typeof InfoCard;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
InfoCard: () => InfoCard,
|
|
31
|
+
default: () => stdin_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
34
|
+
var import_utils = require("../utils");
|
|
35
|
+
var import_InfoCard = __toESM(require("./InfoCard"));
|
|
36
|
+
const InfoCard = (0, import_utils.withInstall)(import_InfoCard.default);
|
|
37
|
+
var stdin_default = InfoCard;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@import './var.less';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--van-info-card-padding: @info-card-padding;
|
|
5
|
+
--van-info-card-radius: @info-card-radius;
|
|
6
|
+
--van-info-card-gap: @info-card-gap;
|
|
7
|
+
--van-info-card-title-color: @info-card-title-color;
|
|
8
|
+
--van-info-card-title-font-size: @info-card-title-font-size;
|
|
9
|
+
--van-info-card-title-line-height: @info-card-title-line-height;
|
|
10
|
+
--van-info-card-divider-margin: @info-card-divider-margin;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.van-info-card {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: var(--van-info-card-gap);
|
|
17
|
+
padding: var(--van-info-card-padding);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
background: var(--van-white);
|
|
20
|
+
border-radius: var(--van-info-card-radius);
|
|
21
|
+
|
|
22
|
+
&__title {
|
|
23
|
+
color: var(--van-info-card-title-color);
|
|
24
|
+
font-size: var(--van-info-card-title-font-size);
|
|
25
|
+
font-weight: var(--van-font-weight-bold);
|
|
26
|
+
line-height: var(--van-info-card-title-line-height);
|
|
27
|
+
overflow-wrap: anywhere;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__extra {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: var(--van-info-card-gap);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__divider.van-divider {
|
|
37
|
+
width: 100%;
|
|
38
|
+
margin: var(--van-info-card-divider-margin);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.van-info-card-expand-enter-active,
|
|
43
|
+
.van-info-card-expand-leave-active {
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
transition: max-height var(--van-animation-duration-fast)
|
|
46
|
+
var(--van-animation-timing-function-enter),
|
|
47
|
+
opacity var(--van-animation-duration-fast) ease;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.van-info-card-expand-enter-from,
|
|
51
|
+
.van-info-card-expand-leave-to {
|
|
52
|
+
max-height: 0;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.van-info-card-expand-enter-to,
|
|
57
|
+
.van-info-card-expand-leave-from {
|
|
58
|
+
max-height: 480px;
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require("../../style/base.css");
|
|
2
|
+
require("../../badge/index.css");
|
|
3
|
+
require("../../icon/index.css");
|
|
4
|
+
require("../../image/index.css");
|
|
5
|
+
require("../../tag/index.css");
|
|
6
|
+
require("../../label/index.css");
|
|
7
|
+
require("../../divider/index.css");
|
|
8
|
+
require("../index.css");
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
require("../../style/base.less");
|
|
2
|
+
require("../../badge/index.less");
|
|
3
|
+
require("../../icon/index.less");
|
|
4
|
+
require("../../image/index.less");
|
|
5
|
+
require("../../tag/index.less");
|
|
6
|
+
require("../../label/index.less");
|
|
7
|
+
require("../../divider/index.less");
|
|
8
|
+
require("../index.less");
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
@info-card-padding: 12px var(--van-padding-md);
|
|
2
|
+
@info-card-radius: var(--van-border-radius-lg);
|
|
3
|
+
@info-card-gap: 4px;
|
|
4
|
+
@info-card-title-color: var(--van-gray-8);
|
|
5
|
+
@info-card-title-font-size: var(--van-font-size-md);
|
|
6
|
+
@info-card-title-line-height: var(--van-line-height-lg);
|
|
7
|
+
@info-card-divider-margin: 10px 0;
|
package/lib/label/Label.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare const labelProps: {
|
|
|
22
22
|
};
|
|
23
23
|
vertical: BooleanConstructor;
|
|
24
24
|
href: StringConstructor;
|
|
25
|
+
location: StringConstructor;
|
|
25
26
|
tags: {
|
|
26
27
|
type: PropType<string[]>;
|
|
27
28
|
default: () => never[];
|
|
@@ -47,6 +48,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
47
48
|
};
|
|
48
49
|
vertical: BooleanConstructor;
|
|
49
50
|
href: StringConstructor;
|
|
51
|
+
location: StringConstructor;
|
|
50
52
|
tags: {
|
|
51
53
|
type: PropType<string[]>;
|
|
52
54
|
default: () => never[];
|
|
@@ -70,6 +72,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
70
72
|
};
|
|
71
73
|
vertical: BooleanConstructor;
|
|
72
74
|
href: StringConstructor;
|
|
75
|
+
location: StringConstructor;
|
|
73
76
|
tags: {
|
|
74
77
|
type: PropType<string[]>;
|
|
75
78
|
default: () => never[];
|
package/lib/label/Label.js
CHANGED
|
@@ -32,6 +32,7 @@ const labelProps = {
|
|
|
32
32
|
type: (0, import_utils.makeStringProp)("default"),
|
|
33
33
|
vertical: Boolean,
|
|
34
34
|
href: String,
|
|
35
|
+
location: String,
|
|
35
36
|
tags: {
|
|
36
37
|
type: Array,
|
|
37
38
|
default: () => []
|
|
@@ -50,6 +51,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
50
51
|
emit
|
|
51
52
|
}) {
|
|
52
53
|
const vertical = (0, import_vue.computed)(() => props.vertical || props.type === "media");
|
|
54
|
+
const showLocation = (0, import_vue.computed)(() => props.vertical && (props.type === "bold" || props.type === "link") && !!props.location);
|
|
53
55
|
const renderText = () => {
|
|
54
56
|
var _a;
|
|
55
57
|
const content = ((_a = slots.default) == null ? void 0 : _a.call(slots)) || props.content;
|
|
@@ -103,12 +105,17 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
103
105
|
};
|
|
104
106
|
return () => (0, import_vue.createVNode)("div", {
|
|
105
107
|
"class": bem([props.type, {
|
|
106
|
-
vertical: vertical.value
|
|
108
|
+
vertical: vertical.value,
|
|
109
|
+
location: showLocation.value
|
|
107
110
|
}])
|
|
108
111
|
}, [(0, import_vue.createVNode)("span", {
|
|
109
112
|
"class": bem("label")
|
|
110
113
|
}, [props.label]), (0, import_vue.createVNode)("div", {
|
|
111
114
|
"class": bem("value")
|
|
112
|
-
}, [renderContent()
|
|
115
|
+
}, [renderContent(), showLocation.value && (0, import_vue.createVNode)("div", {
|
|
116
|
+
"class": bem("location")
|
|
117
|
+
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
118
|
+
"name": "location-o"
|
|
119
|
+
}, null), (0, import_vue.createVNode)("span", null, [props.location])])])]);
|
|
113
120
|
}
|
|
114
121
|
});
|
package/lib/label/index.css
CHANGED
|
@@ -1 +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)}
|
|
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-location-color: var(--van-gray-7);--van-label-location-font-size: var(--van-font-size-sm);--van-label-location-line-height: var(--van-line-height-md);--van-label-location-icon-size: 12px;--van-label-location-gap: 2px}.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--location .van-label__value{display:flex;flex-direction:column;gap:var(--van-label-location-gap);width:100%}.van-label--location .van-label__link{align-self:flex-start;text-align:left}.van-label__location{display:inline-flex;gap:var(--van-label-location-gap);align-items:center;width:-moz-fit-content;width:fit-content;max-width:100%;color:var(--van-label-location-color);font-size:var(--van-label-location-font-size);font-weight:400;line-height:var(--van-label-location-line-height);overflow-wrap:anywhere}.van-label__location .van-icon{flex:none;font-size:var(--van-label-location-icon-size)}.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)}
|
package/lib/label/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
|
|
|
13
13
|
};
|
|
14
14
|
vertical: BooleanConstructor;
|
|
15
15
|
href: StringConstructor;
|
|
16
|
+
location: StringConstructor;
|
|
16
17
|
tags: {
|
|
17
18
|
type: import("vue").PropType<string[]>;
|
|
18
19
|
default: () => never[];
|
|
@@ -36,6 +37,7 @@ export declare const Label: import("../utils").WithInstall<import("vue").DefineC
|
|
|
36
37
|
};
|
|
37
38
|
vertical: BooleanConstructor;
|
|
38
39
|
href: StringConstructor;
|
|
40
|
+
location: StringConstructor;
|
|
39
41
|
tags: {
|
|
40
42
|
type: import("vue").PropType<string[]>;
|
|
41
43
|
default: () => never[];
|