persagy-vant 0.0.30 → 0.0.32
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/README.md +11 -12
- package/bin/persagy-vant.mjs +63 -0
- package/es/cell/Cell.d.ts +34 -1
- package/es/cell/Cell.mjs +48 -12
- package/es/cell/index.css +1 -1
- package/es/cell/index.d.ts +20 -1
- package/es/cell/index.less +19 -0
- package/es/cell/var.less +1 -1
- package/es/collapse-item/CollapseItem.d.ts +25 -0
- package/es/collapse-item/index.d.ts +18 -0
- package/es/content-panel/ContentPanel.d.ts +46 -0
- package/es/content-panel/ContentPanel.mjs +72 -0
- package/es/content-panel/index.css +1 -0
- package/es/content-panel/index.d.ts +33 -0
- package/es/content-panel/index.less +54 -0
- package/es/content-panel/index.mjs +8 -0
- package/es/content-panel/style/index.mjs +11 -0
- package/es/content-panel/style/less.mjs +11 -0
- package/es/content-panel/var.css +0 -0
- package/es/content-panel/var.less +3 -0
- package/es/dialog/Dialog.d.ts +4 -0
- package/es/dialog/Dialog.mjs +14 -1
- package/es/dialog/function-call.d.ts +2 -0
- package/es/dialog/types.d.ts +2 -0
- package/es/field/Field.d.ts +25 -0
- package/es/field/Field.mjs +1 -1
- package/es/field/index.d.ts +18 -0
- package/es/index.d.ts +6 -1
- package/es/index.mjs +16 -1
- package/es/info-card/InfoCard.d.ts +1 -0
- package/es/info-card/InfoCard.mjs +1 -0
- package/es/label/Label.d.ts +67 -0
- package/es/label/Label.mjs +22 -7
- package/es/label/index.css +1 -1
- package/es/label/index.d.ts +45 -0
- package/es/label/index.less +19 -0
- package/es/label/var.less +4 -1
- package/es/loading/Loading.mjs +18 -21
- package/es/material-action-bar/MaterialActionBar.d.ts +66 -0
- package/es/material-action-bar/MaterialActionBar.mjs +132 -0
- package/es/material-action-bar/index.css +1 -0
- package/es/material-action-bar/index.d.ts +58 -0
- package/es/material-action-bar/index.less +33 -0
- package/es/material-action-bar/index.mjs +8 -0
- package/es/material-action-bar/style/index.mjs +19 -0
- package/es/material-action-bar/style/less.mjs +19 -0
- package/es/material-add/MaterialAdd.mjs +12 -7
- package/es/material-add/index.css +1 -1
- package/es/material-add/index.less +7 -5
- package/es/material-add/style/index.mjs +7 -0
- package/es/material-add/style/less.mjs +7 -0
- package/es/material-detail/MaterialDetail.d.ts +64 -0
- package/es/material-detail/MaterialDetail.mjs +192 -0
- package/es/material-detail/index.css +1 -0
- package/es/material-detail/index.d.ts +40 -0
- package/es/material-detail/index.less +20 -0
- package/es/material-detail/index.mjs +8 -0
- package/es/material-detail/style/index.mjs +11 -0
- package/es/material-detail/style/less.mjs +11 -0
- package/es/material-display-bar/MaterialDisplayBar.d.ts +159 -0
- package/es/material-display-bar/MaterialDisplayBar.mjs +109 -0
- package/es/material-display-bar/index.css +1 -0
- package/es/material-display-bar/index.d.ts +103 -0
- package/es/material-display-bar/index.less +113 -0
- package/es/material-display-bar/index.mjs +8 -0
- package/es/material-display-bar/style/index.mjs +11 -0
- package/es/material-display-bar/style/less.mjs +11 -0
- package/es/material-display-bar/var.css +0 -0
- package/es/material-display-bar/var.less +12 -0
- package/es/rate/RateCell.mjs +4 -1
- package/es/rate/index.css +1 -1
- package/es/rate/index.less +16 -3
- package/es/search/Search.d.ts +14 -1
- package/es/search/Search.mjs +5 -3
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +9 -0
- package/es/search/index.less +10 -0
- package/es/search/types.d.ts +1 -0
- package/es/step/index.css +1 -1
- package/es/step/var.less +2 -2
- package/es/style/base.css +1 -1
- package/es/style/css-variables.css +1 -1
- package/es/style/var.less +1 -1
- package/es/title-bar/TitleBar.d.ts +85 -0
- package/es/title-bar/TitleBar.mjs +62 -0
- package/es/title-bar/index.css +1 -0
- package/es/title-bar/index.d.ts +60 -0
- package/es/title-bar/index.less +25 -0
- package/es/title-bar/index.mjs +8 -0
- package/es/title-bar/style/index.mjs +4 -0
- package/es/title-bar/style/less.mjs +4 -0
- package/es/title-bar/var.css +0 -0
- package/es/title-bar/var.less +6 -0
- package/es/tree-select/TreeSelect.d.ts +13 -0
- package/es/tree-select/TreeSelect.mjs +4 -2
- package/es/tree-select/index.css +1 -1
- package/es/tree-select/index.d.ts +9 -0
- package/es/tree-select/index.less +6 -0
- package/lib/cell/Cell.d.ts +34 -1
- package/lib/cell/Cell.js +46 -10
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.d.ts +20 -1
- package/lib/cell/index.less +19 -0
- package/lib/cell/var.less +1 -1
- package/lib/collapse-item/CollapseItem.d.ts +25 -0
- package/lib/collapse-item/index.d.ts +18 -0
- package/lib/content-panel/ContentPanel.d.ts +46 -0
- package/lib/content-panel/ContentPanel.js +91 -0
- package/lib/content-panel/index.css +1 -0
- package/lib/content-panel/index.d.ts +33 -0
- package/lib/content-panel/index.js +37 -0
- package/lib/content-panel/index.less +54 -0
- package/lib/content-panel/style/index.js +11 -0
- package/lib/content-panel/style/less.js +11 -0
- package/lib/content-panel/var.css +0 -0
- package/lib/content-panel/var.less +3 -0
- package/lib/dialog/Dialog.d.ts +4 -0
- package/lib/dialog/Dialog.js +13 -0
- package/lib/dialog/function-call.d.ts +2 -0
- package/lib/dialog/types.d.ts +2 -0
- package/lib/dog1.jpg +0 -0
- package/lib/dog2.jpg +0 -0
- package/lib/dog3.jpg +0 -0
- package/lib/field/Field.d.ts +25 -0
- package/lib/field/Field.js +1 -1
- package/lib/field/index.d.ts +18 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +6 -1
- package/lib/index.js +16 -1
- package/lib/index.less +6 -1
- package/lib/info-card/InfoCard.d.ts +1 -0
- package/lib/info-card/InfoCard.js +1 -0
- package/lib/label/Label.d.ts +67 -0
- package/lib/label/Label.js +21 -6
- package/lib/label/index.css +1 -1
- package/lib/label/index.d.ts +45 -0
- package/lib/label/index.less +19 -0
- package/lib/label/var.less +4 -1
- package/lib/loading/Loading.js +18 -21
- package/lib/material-action-bar/MaterialActionBar.d.ts +66 -0
- package/lib/material-action-bar/MaterialActionBar.js +151 -0
- package/lib/material-action-bar/index.css +1 -0
- package/lib/material-action-bar/index.d.ts +58 -0
- package/lib/material-action-bar/index.js +37 -0
- package/lib/material-action-bar/index.less +33 -0
- package/lib/material-action-bar/style/index.js +19 -0
- package/lib/material-action-bar/style/less.js +19 -0
- package/lib/material-add/MaterialAdd.js +12 -7
- package/lib/material-add/index.css +1 -1
- package/lib/material-add/index.less +7 -5
- package/lib/material-add/style/index.js +7 -0
- package/lib/material-add/style/less.js +7 -0
- package/lib/material-detail/MaterialDetail.d.ts +64 -0
- package/lib/material-detail/MaterialDetail.js +211 -0
- package/lib/material-detail/index.css +1 -0
- package/lib/material-detail/index.d.ts +40 -0
- package/lib/material-detail/index.js +37 -0
- package/lib/material-detail/index.less +20 -0
- package/lib/material-detail/style/index.js +11 -0
- package/lib/material-detail/style/less.js +11 -0
- package/lib/material-display-bar/MaterialDisplayBar.d.ts +159 -0
- package/lib/material-display-bar/MaterialDisplayBar.js +128 -0
- package/lib/material-display-bar/index.css +1 -0
- package/lib/material-display-bar/index.d.ts +103 -0
- package/lib/material-display-bar/index.js +37 -0
- package/lib/material-display-bar/index.less +113 -0
- package/lib/material-display-bar/style/index.js +11 -0
- package/lib/material-display-bar/style/less.js +11 -0
- package/lib/material-display-bar/var.css +0 -0
- package/lib/material-display-bar/var.less +12 -0
- package/lib/rate/RateCell.js +4 -1
- package/lib/rate/index.css +1 -1
- package/lib/rate/index.less +16 -3
- package/lib/search/Search.d.ts +14 -1
- package/lib/search/Search.js +5 -3
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +9 -0
- package/lib/search/index.less +10 -0
- package/lib/search/types.d.ts +1 -0
- package/lib/step/index.css +1 -1
- package/lib/step/var.less +2 -2
- package/lib/style/base.css +1 -1
- package/lib/style/css-variables.css +1 -1
- package/lib/style/var.less +1 -1
- package/lib/title-bar/TitleBar.d.ts +85 -0
- package/lib/title-bar/TitleBar.js +81 -0
- package/lib/title-bar/index.css +1 -0
- package/lib/title-bar/index.d.ts +60 -0
- package/lib/title-bar/index.js +37 -0
- package/lib/title-bar/index.less +25 -0
- package/lib/title-bar/style/index.js +4 -0
- package/lib/title-bar/style/less.js +4 -0
- package/lib/title-bar/var.css +0 -0
- package/lib/title-bar/var.less +6 -0
- package/lib/tree-select/TreeSelect.d.ts +13 -0
- package/lib/tree-select/TreeSelect.js +3 -1
- package/lib/tree-select/index.css +1 -1
- package/lib/tree-select/index.d.ts +9 -0
- package/lib/tree-select/index.less +6 -0
- package/lib/vant.cjs.js +1641 -1218
- package/lib/vant.es.js +1641 -1218
- package/lib/vant.js +1641 -1218
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +6 -2
- package/skills/use-persagy-vant/references/business-component-catalog.md +8 -3
- package/skills/use-persagy-vant/references/component-catalog.md +7 -4
- package/skills/use-persagy-vant/references/component-documentation.md +1 -1
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +3 -3
- package/skills/use-persagy-vant/references/page-recipes.md +18 -5
- package/skills/use-persagy-vant/references/reuse-policy.md +1 -1
- package/skills/use-persagy-vant/references/usage-patterns.md +9 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { Transition, computed, defineComponent, ref, createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
|
|
2
|
+
import { BlueMarkHeader } from "../blue-mark/index.mjs";
|
|
3
|
+
import { Icon } from "../icon/index.mjs";
|
|
4
|
+
import { Label } from "../label/index.mjs";
|
|
5
|
+
import { Swipe } from "../swipe/index.mjs";
|
|
6
|
+
import { SwipeItem } from "../swipe-item/index.mjs";
|
|
7
|
+
import { createNamespace, makeArrayProp } from "../utils/index.mjs";
|
|
8
|
+
import { Image } from "../image/index.mjs";
|
|
9
|
+
const [name, bem] = createNamespace("material-detail");
|
|
10
|
+
const defaultImages = ["/dog1.jpg", "/dog2.jpg", "/dog3.jpg"];
|
|
11
|
+
const materialDetailProps = {
|
|
12
|
+
show: Boolean,
|
|
13
|
+
item: Object,
|
|
14
|
+
categories: makeArrayProp(),
|
|
15
|
+
fields: makeArrayProp(),
|
|
16
|
+
images: makeArrayProp()
|
|
17
|
+
};
|
|
18
|
+
var stdin_default = defineComponent({
|
|
19
|
+
name,
|
|
20
|
+
props: materialDetailProps,
|
|
21
|
+
emits: ["update:show"],
|
|
22
|
+
setup(props, {
|
|
23
|
+
emit,
|
|
24
|
+
slots
|
|
25
|
+
}) {
|
|
26
|
+
const infoExpanded = ref(true);
|
|
27
|
+
const usageExpanded = ref(true);
|
|
28
|
+
const noticeExpanded = ref(true);
|
|
29
|
+
const bannerIndex = ref(0);
|
|
30
|
+
const item = computed(() => props.item);
|
|
31
|
+
const close = () => emit("update:show", false);
|
|
32
|
+
const infoRows = computed(() => {
|
|
33
|
+
if (props.fields.length) {
|
|
34
|
+
return props.fields;
|
|
35
|
+
}
|
|
36
|
+
if (!item.value)
|
|
37
|
+
return [];
|
|
38
|
+
const [brand = "-", specification = "-", warehouse = "-"] = item.value.detail.split("\uFF5C");
|
|
39
|
+
const group = props.categories.find((entry) => entry.categories.some((category2) => {
|
|
40
|
+
var _a;
|
|
41
|
+
return category2.value === ((_a = item.value) == null ? void 0 : _a.category);
|
|
42
|
+
}));
|
|
43
|
+
const category = group == null ? void 0 : group.categories.find((entry) => {
|
|
44
|
+
var _a;
|
|
45
|
+
return entry.value === ((_a = item.value) == null ? void 0 : _a.category);
|
|
46
|
+
});
|
|
47
|
+
return [{
|
|
48
|
+
label: "\u7269\u6599\u540D\u79F0",
|
|
49
|
+
content: item.value.name
|
|
50
|
+
}, {
|
|
51
|
+
label: "\u53EF\u7533\u8BF7",
|
|
52
|
+
content: item.value.available || 0
|
|
53
|
+
}, {
|
|
54
|
+
label: "\u5F85\u5165\u5E93",
|
|
55
|
+
content: "12"
|
|
56
|
+
}, {
|
|
57
|
+
label: "\u6240\u5C5E\u5206\u7C7B",
|
|
58
|
+
content: category && group ? `${group.text}/${category.text}` : item.value.category
|
|
59
|
+
}, {
|
|
60
|
+
label: "\u54C1\u724C",
|
|
61
|
+
content: brand
|
|
62
|
+
}, {
|
|
63
|
+
label: "\u89C4\u683C",
|
|
64
|
+
content: specification
|
|
65
|
+
}, {
|
|
66
|
+
label: "\u5355\u4F4D",
|
|
67
|
+
content: item.value.unit
|
|
68
|
+
}, {
|
|
69
|
+
label: "\u4F9B\u5E94\u5546",
|
|
70
|
+
content: "\u6DF1\u5733\u96C6\u5B89"
|
|
71
|
+
}, {
|
|
72
|
+
label: "\u4ED3\u5E93\u540D\u79F0",
|
|
73
|
+
content: warehouse
|
|
74
|
+
}, {
|
|
75
|
+
label: "\u4ED3\u5E93\u4F4D\u7F6E",
|
|
76
|
+
content: "A\u5EA7/B3/\u505C\u8F66\u573A\u5E93\u623F",
|
|
77
|
+
type: "link"
|
|
78
|
+
}, {
|
|
79
|
+
label: "\u5E93\u7BA1\u5458",
|
|
80
|
+
content: "\u674E\u590D\u6052 13880588688",
|
|
81
|
+
type: "link"
|
|
82
|
+
}];
|
|
83
|
+
});
|
|
84
|
+
const displayImages = computed(() => props.images.length ? props.images : defaultImages);
|
|
85
|
+
return () => _createVNode(Transition, {
|
|
86
|
+
"name": "van-material-detail"
|
|
87
|
+
}, {
|
|
88
|
+
default: () => [props.show && item.value ? _createVNode("div", {
|
|
89
|
+
"class": bem()
|
|
90
|
+
}, [_createVNode("div", {
|
|
91
|
+
"class": bem("banner")
|
|
92
|
+
}, [_createVNode(Swipe, {
|
|
93
|
+
"loop": false,
|
|
94
|
+
"showIndicators": false,
|
|
95
|
+
"class": bem("swipe"),
|
|
96
|
+
"onChange": (index) => {
|
|
97
|
+
bannerIndex.value = index;
|
|
98
|
+
}
|
|
99
|
+
}, {
|
|
100
|
+
default: () => [displayImages.value.map((image, index) => _createVNode(SwipeItem, {
|
|
101
|
+
"key": `${image}-${index}`
|
|
102
|
+
}, {
|
|
103
|
+
default: () => [_createVNode(Image, {
|
|
104
|
+
"class": bem("image"),
|
|
105
|
+
"src": image,
|
|
106
|
+
"fit": "cover",
|
|
107
|
+
"alt": `${item.value.name}\u56FE\u7247${index + 1}`
|
|
108
|
+
}, null)]
|
|
109
|
+
}))]
|
|
110
|
+
})]), _createVNode("div", {
|
|
111
|
+
"class": bem("dots"),
|
|
112
|
+
"aria-label": `\u7B2C ${bannerIndex.value + 1} \u5F20\uFF0C\u5171 ${displayImages.value.length} \u5F20`
|
|
113
|
+
}, [displayImages.value.map((_, index) => _createVNode("i", {
|
|
114
|
+
"key": index,
|
|
115
|
+
"class": {
|
|
116
|
+
"van-material-detail__dot--active": bannerIndex.value === index
|
|
117
|
+
}
|
|
118
|
+
}, null))]), _createVNode("button", {
|
|
119
|
+
"type": "button",
|
|
120
|
+
"class": bem("close"),
|
|
121
|
+
"aria-label": "\u5173\u95ED\u7269\u6599\u8BE6\u60C5",
|
|
122
|
+
"onClick": close
|
|
123
|
+
}, [_createVNode(Icon, {
|
|
124
|
+
"name": "cross",
|
|
125
|
+
"size": "16"
|
|
126
|
+
}, null)]), _createVNode("div", {
|
|
127
|
+
"class": bem("content")
|
|
128
|
+
}, [_createVNode("div", {
|
|
129
|
+
"class": bem("body")
|
|
130
|
+
}, [_createVNode("section", {
|
|
131
|
+
"class": bem("section")
|
|
132
|
+
}, [_createVNode(BlueMarkHeader, {
|
|
133
|
+
"title": "\u57FA\u672C\u4FE1\u606F",
|
|
134
|
+
"expandable": true,
|
|
135
|
+
"modelValue": infoExpanded.value,
|
|
136
|
+
"onUpdate:modelValue": (value) => {
|
|
137
|
+
infoExpanded.value = value;
|
|
138
|
+
}
|
|
139
|
+
}, null), _createVNode(Transition, {
|
|
140
|
+
"name": "van-material-detail-section"
|
|
141
|
+
}, {
|
|
142
|
+
default: () => {
|
|
143
|
+
var _a;
|
|
144
|
+
return [infoExpanded.value && _createVNode("div", {
|
|
145
|
+
"class": bem("card")
|
|
146
|
+
}, [((_a = slots["basic-info"]) == null ? void 0 : _a.call(slots)) || _createVNode("div", {
|
|
147
|
+
"class": bem("info-rows")
|
|
148
|
+
}, [infoRows.value.map((field) => _createVNode(Label, {
|
|
149
|
+
"key": field.label,
|
|
150
|
+
"label": field.label,
|
|
151
|
+
"content": String(field.content),
|
|
152
|
+
"contentAlign": "right",
|
|
153
|
+
"type": field.type || "default"
|
|
154
|
+
}, null))])])];
|
|
155
|
+
}
|
|
156
|
+
})]), _createVNode("section", {
|
|
157
|
+
"class": bem("section")
|
|
158
|
+
}, [_createVNode(BlueMarkHeader, {
|
|
159
|
+
"title": "\u4F7F\u7528\u8BF4\u660E",
|
|
160
|
+
"expandable": true,
|
|
161
|
+
"modelValue": usageExpanded.value,
|
|
162
|
+
"onUpdate:modelValue": (value) => {
|
|
163
|
+
usageExpanded.value = value;
|
|
164
|
+
}
|
|
165
|
+
}, null), _createVNode(Transition, {
|
|
166
|
+
"name": "van-material-detail-section"
|
|
167
|
+
}, {
|
|
168
|
+
default: () => [usageExpanded.value && _createVNode("div", {
|
|
169
|
+
"class": bem("card")
|
|
170
|
+
}, [_createTextVNode("\u9002\u7528\u4E8E\u8D85\u5E02\u548C\u5546\u4E1A\u5EFA\u7B51\u7684\u98CE\u51B7\u548C\u6C34\u51B7\u5F0F\u51B7\u6C34\u673A\u7EC4\uFF0C\u4EE5\u53CA\u5176\u4ED6\u4E2D\u6E29\u5E94\u7528\u3002\u5B89\u88C5\u65F6\u8981\u786E\u4FDD\u7CFB\u7EDF\u7684\u5BC6\u5C01\u6027\u826F\u597D\uFF0C\u9632\u6B62\u5236\u51B7\u5242\u6CC4\u6F0F\uFF0C\u5E76\u6309\u7167\u76F8\u5173\u8BBE\u5907\u7684\u5B89\u88C5\u624B\u518C\u8FDB\u884C\u7BA1\u9053\u8FDE\u63A5\u3001\u5145\u6CE8\u7B49\u64CD\u4F5C\u3002")])]
|
|
171
|
+
})]), _createVNode("section", {
|
|
172
|
+
"class": bem("section")
|
|
173
|
+
}, [_createVNode(BlueMarkHeader, {
|
|
174
|
+
"title": "\u6CE8\u610F\u4E8B\u9879",
|
|
175
|
+
"expandable": true,
|
|
176
|
+
"modelValue": noticeExpanded.value,
|
|
177
|
+
"onUpdate:modelValue": (value) => {
|
|
178
|
+
noticeExpanded.value = value;
|
|
179
|
+
}
|
|
180
|
+
}, null), _createVNode(Transition, {
|
|
181
|
+
"name": "van-material-detail-section"
|
|
182
|
+
}, {
|
|
183
|
+
default: () => [noticeExpanded.value && _createVNode("div", {
|
|
184
|
+
"class": bem("card")
|
|
185
|
+
}, [_createTextVNode("\u4F7F\u7528\u8FC7\u7A0B\u4E2D\u8981\u5B9A\u671F\u68C0\u67E5\u7CFB\u7EDF\u7684\u538B\u529B\u3001\u6E29\u5EA6\u7B49\u53C2\u6570\uFF0C\u786E\u4FDD\u7CFB\u7EDF\u6B63\u5E38\u8FD0\u884C\u3002\u5982\u51FA\u73B0\u6CC4\u6F0F\u7B49\u95EE\u9898\uFF0C\u8BF7\u53CA\u65F6\u8FDB\u884C\u7EF4\u4FEE\u5904\u7406\u3002")])]
|
|
186
|
+
})])])])]) : null]
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
export {
|
|
191
|
+
stdin_default as default
|
|
192
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.van-material-detail{position:fixed;z-index:3000;inset:0;display:flex;flex-direction:column;overflow:hidden;background:var(--van-gray-2)}.van-material-detail__banner{position:absolute;top:0;right:0;left:0;height:320px;overflow:hidden;background:var(--van-gray-8)}.van-material-detail__swipe{height:320px;touch-action:pan-y}.van-material-detail__image{width:100%;height:310px}.van-material-detail__dots{position:absolute;z-index:2;top:226px;left:50%;display:flex;gap:6px;transform:translate(-50%)}.van-material-detail__dots>i{width:6px;height:6px;background:rgba(255,255,255,.55);border-radius:50%}.van-material-detail__dot--active{background:var(--van-white)!important}.van-material-detail__close{position:absolute;z-index:1;top:56px;left:var(--van-padding-md);display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;color:var(--van-gray-9);background:var(--van-gray-3);border:0;border-radius:50%;box-shadow:0 2px 5px rgba(27,33,41,.1)}.van-material-detail__content{position:relative;z-index:1;display:flex;flex:1;flex-direction:column;box-sizing:border-box;min-height:0;margin-top:246px;padding-top:var(--van-padding-sm);overflow:hidden;background:var(--van-white);border-radius:16px 16px 0 0}.van-material-detail__body{flex:1;min-height:0;padding:var(--van-padding-md) var(--van-padding-md) 24px;overflow-y:auto}.van-material-detail__section+.van-material-detail__section{margin-top:24px}.van-material-detail__section .van-blue-mark-header{margin-bottom:8px;padding:0}.van-material-detail__card{padding:8px 12px;color:var(--van-gray-9);font-size:var(--van-font-size-md);line-height:var(--van-line-height-lg);background:linear-gradient(90deg,var(--van-gray-2),rgba(241,244,246,.2));border-radius:8px}.van-material-detail__info-rows{display:flex;flex-direction:column;gap:8px}.van-material-detail-enter-active{transition:transform var(--van-animation-duration-fast) var(--van-animation-timing-function-enter);will-change:transform}.van-material-detail-leave-active{transition:transform var(--van-animation-duration-fast) var(--van-animation-timing-function-leave);will-change:transform}.van-material-detail-enter-from,.van-material-detail-leave-to{transform:translateY(100%)}.van-material-detail-section-enter-active,.van-material-detail-section-leave-active{overflow:hidden;transition:max-height .2s ease,opacity .2s ease}.van-material-detail-section-enter-from,.van-material-detail-section-leave-to{max-height:0;opacity:0}.van-material-detail-section-enter-to,.van-material-detail-section-leave-from{max-height:480px;opacity:1}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const MaterialDetail: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
show: BooleanConstructor;
|
|
3
|
+
item: import("vue").PropType<import("..").MaterialAddItem>;
|
|
4
|
+
categories: {
|
|
5
|
+
type: import("vue").PropType<import("..").MaterialAddCategory[]>;
|
|
6
|
+
default: () => never[];
|
|
7
|
+
};
|
|
8
|
+
fields: {
|
|
9
|
+
type: import("vue").PropType<import("./MaterialDetail").MaterialDetailField[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
images: {
|
|
13
|
+
type: import("vue").PropType<string[]>;
|
|
14
|
+
default: () => never[];
|
|
15
|
+
};
|
|
16
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:show"[], "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
show: BooleanConstructor;
|
|
18
|
+
item: import("vue").PropType<import("..").MaterialAddItem>;
|
|
19
|
+
categories: {
|
|
20
|
+
type: import("vue").PropType<import("..").MaterialAddCategory[]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
fields: {
|
|
24
|
+
type: import("vue").PropType<import("./MaterialDetail").MaterialDetailField[]>;
|
|
25
|
+
default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
images: {
|
|
28
|
+
type: import("vue").PropType<string[]>;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
}>> & {
|
|
32
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
show: boolean;
|
|
35
|
+
fields: import("./MaterialDetail").MaterialDetailField[];
|
|
36
|
+
images: string[];
|
|
37
|
+
categories: import("..").MaterialAddCategory[];
|
|
38
|
+
}>>;
|
|
39
|
+
export default MaterialDetail;
|
|
40
|
+
export type { MaterialDetailProps } from './MaterialDetail';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.van-material-detail { position: fixed; z-index: 3000; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--van-gray-2); }
|
|
2
|
+
.van-material-detail__banner { position: absolute; top: 0; right: 0; left: 0; height: 320px; overflow: hidden; background: var(--van-gray-8); }
|
|
3
|
+
.van-material-detail__swipe { height: 320px; touch-action: pan-y; }
|
|
4
|
+
.van-material-detail__image { width: 100%; height: 310px; }
|
|
5
|
+
.van-material-detail__dots { position: absolute; z-index: 2; top: 226px; left: 50%; display: flex; gap: 6px; transform: translateX(-50%); }
|
|
6
|
+
.van-material-detail__dots > i { width: 6px; height: 6px; background: rgb(255 255 255 / 55%); border-radius: 50%; }
|
|
7
|
+
.van-material-detail__dot--active { background: var(--van-white) !important; }
|
|
8
|
+
.van-material-detail__close { position: absolute; z-index: 1; top: 56px; left: var(--van-padding-md); display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; color: var(--van-gray-9); background: var(--van-gray-3); border: 0; border-radius: 50%; box-shadow: 0 2px 5px rgb(27 33 41 / 10%); }
|
|
9
|
+
.van-material-detail__content { position: relative; z-index: 1; display: flex; flex: 1; flex-direction: column; box-sizing: border-box; min-height: 0; margin-top: 246px; padding-top: var(--van-padding-sm); overflow: hidden; background: var(--van-white); border-radius: 16px 16px 0 0; }
|
|
10
|
+
.van-material-detail__body { flex: 1; min-height: 0; padding: var(--van-padding-md) var(--van-padding-md) 24px; overflow-y: auto; }
|
|
11
|
+
.van-material-detail__section + .van-material-detail__section { margin-top: 24px; }
|
|
12
|
+
.van-material-detail__section .van-blue-mark-header { margin-bottom: 8px; padding: 0; }
|
|
13
|
+
.van-material-detail__card { padding: 8px 12px; color: var(--van-gray-9); font-size: var(--van-font-size-md); line-height: var(--van-line-height-lg); background: linear-gradient(90deg, var(--van-gray-2), rgb(241 244 246 / 20%)); border-radius: 8px; }
|
|
14
|
+
.van-material-detail__info-rows { display: flex; flex-direction: column; gap: 8px; }
|
|
15
|
+
.van-material-detail-enter-active { transition: transform var(--van-animation-duration-fast) var(--van-animation-timing-function-enter); will-change: transform; }
|
|
16
|
+
.van-material-detail-leave-active { transition: transform var(--van-animation-duration-fast) var(--van-animation-timing-function-leave); will-change: transform; }
|
|
17
|
+
.van-material-detail-enter-from, .van-material-detail-leave-to { transform: translateY(100%); }
|
|
18
|
+
.van-material-detail-section-enter-active, .van-material-detail-section-leave-active { overflow: hidden; transition: max-height .2s ease, opacity .2s ease; }
|
|
19
|
+
.van-material-detail-section-enter-from, .van-material-detail-section-leave-to { max-height: 0; opacity: 0; }
|
|
20
|
+
.van-material-detail-section-enter-to, .van-material-detail-section-leave-from { max-height: 480px; opacity: 1; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../style/base.css";
|
|
2
|
+
import "../../badge/index.css";
|
|
3
|
+
import "../../icon/index.css";
|
|
4
|
+
import "../../image/index.css";
|
|
5
|
+
import "../../tag/index.css";
|
|
6
|
+
import "../../label/index.css";
|
|
7
|
+
import "../../divider/index.css";
|
|
8
|
+
import "../../blue-mark/index.css";
|
|
9
|
+
import "../../swipe/index.css";
|
|
10
|
+
import "../../swipe-item/index.css";
|
|
11
|
+
import "../index.css";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../style/base.less";
|
|
2
|
+
import "../../badge/index.less";
|
|
3
|
+
import "../../icon/index.less";
|
|
4
|
+
import "../../image/index.less";
|
|
5
|
+
import "../../tag/index.less";
|
|
6
|
+
import "../../label/index.less";
|
|
7
|
+
import "../../divider/index.less";
|
|
8
|
+
import "../../blue-mark/index.less";
|
|
9
|
+
import "../../swipe/index.less";
|
|
10
|
+
import "../../swipe-item/index.less";
|
|
11
|
+
import "../index.less";
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { type ExtractPropTypes, type PropType } from 'vue';
|
|
2
|
+
import { type LabelMedia, type LabelType } from '../label';
|
|
3
|
+
export declare type MaterialDisplayBarField = {
|
|
4
|
+
label: string;
|
|
5
|
+
showLabel?: boolean;
|
|
6
|
+
showContent?: boolean;
|
|
7
|
+
content?: string;
|
|
8
|
+
type?: LabelType;
|
|
9
|
+
vertical?: boolean;
|
|
10
|
+
href?: string;
|
|
11
|
+
tags?: string[];
|
|
12
|
+
media?: LabelMedia[];
|
|
13
|
+
visible?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const materialDisplayBarProps: {
|
|
16
|
+
name: {
|
|
17
|
+
type: PropType<string>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
quantity: (NumberConstructor | StringConstructor)[];
|
|
21
|
+
quantityLabel: {
|
|
22
|
+
type: PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
unit: {
|
|
26
|
+
type: PropType<string>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
showArrow: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
default: true;
|
|
32
|
+
};
|
|
33
|
+
rounded: BooleanConstructor;
|
|
34
|
+
stockInsufficient: BooleanConstructor;
|
|
35
|
+
stockInsufficientText: {
|
|
36
|
+
type: PropType<string>;
|
|
37
|
+
default: string;
|
|
38
|
+
};
|
|
39
|
+
swipeDelete: BooleanConstructor;
|
|
40
|
+
deleteText: {
|
|
41
|
+
type: PropType<string>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
fields: {
|
|
45
|
+
type: PropType<MaterialDisplayBarField[]>;
|
|
46
|
+
default: () => never[];
|
|
47
|
+
};
|
|
48
|
+
divider: {
|
|
49
|
+
type: BooleanConstructor;
|
|
50
|
+
default: true;
|
|
51
|
+
};
|
|
52
|
+
} & {
|
|
53
|
+
to: PropType<import("vue-router").RouteLocationRaw>;
|
|
54
|
+
url: StringConstructor;
|
|
55
|
+
replace: BooleanConstructor;
|
|
56
|
+
};
|
|
57
|
+
export declare type MaterialDisplayBarProps = ExtractPropTypes<typeof materialDisplayBarProps>;
|
|
58
|
+
declare const _default: import("vue").DefineComponent<{
|
|
59
|
+
name: {
|
|
60
|
+
type: PropType<string>;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
quantity: (NumberConstructor | StringConstructor)[];
|
|
64
|
+
quantityLabel: {
|
|
65
|
+
type: PropType<string>;
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
unit: {
|
|
69
|
+
type: PropType<string>;
|
|
70
|
+
default: string;
|
|
71
|
+
};
|
|
72
|
+
showArrow: {
|
|
73
|
+
type: BooleanConstructor;
|
|
74
|
+
default: true;
|
|
75
|
+
};
|
|
76
|
+
rounded: BooleanConstructor;
|
|
77
|
+
stockInsufficient: BooleanConstructor;
|
|
78
|
+
stockInsufficientText: {
|
|
79
|
+
type: PropType<string>;
|
|
80
|
+
default: string;
|
|
81
|
+
};
|
|
82
|
+
swipeDelete: BooleanConstructor;
|
|
83
|
+
deleteText: {
|
|
84
|
+
type: PropType<string>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
87
|
+
fields: {
|
|
88
|
+
type: PropType<MaterialDisplayBarField[]>;
|
|
89
|
+
default: () => never[];
|
|
90
|
+
};
|
|
91
|
+
divider: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: true;
|
|
94
|
+
};
|
|
95
|
+
} & {
|
|
96
|
+
to: PropType<import("vue-router").RouteLocationRaw>;
|
|
97
|
+
url: StringConstructor;
|
|
98
|
+
replace: BooleanConstructor;
|
|
99
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "click-title" | "click-media" | "click-field")[], "delete" | "click-title" | "click-media" | "click-field", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
100
|
+
name: {
|
|
101
|
+
type: PropType<string>;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
quantity: (NumberConstructor | StringConstructor)[];
|
|
105
|
+
quantityLabel: {
|
|
106
|
+
type: PropType<string>;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
unit: {
|
|
110
|
+
type: PropType<string>;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
showArrow: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: true;
|
|
116
|
+
};
|
|
117
|
+
rounded: BooleanConstructor;
|
|
118
|
+
stockInsufficient: BooleanConstructor;
|
|
119
|
+
stockInsufficientText: {
|
|
120
|
+
type: PropType<string>;
|
|
121
|
+
default: string;
|
|
122
|
+
};
|
|
123
|
+
swipeDelete: BooleanConstructor;
|
|
124
|
+
deleteText: {
|
|
125
|
+
type: PropType<string>;
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
fields: {
|
|
129
|
+
type: PropType<MaterialDisplayBarField[]>;
|
|
130
|
+
default: () => never[];
|
|
131
|
+
};
|
|
132
|
+
divider: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: true;
|
|
135
|
+
};
|
|
136
|
+
} & {
|
|
137
|
+
to: PropType<import("vue-router").RouteLocationRaw>;
|
|
138
|
+
url: StringConstructor;
|
|
139
|
+
replace: BooleanConstructor;
|
|
140
|
+
}>> & {
|
|
141
|
+
onDelete?: ((...args: any[]) => any) | undefined;
|
|
142
|
+
"onClick-title"?: ((...args: any[]) => any) | undefined;
|
|
143
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
144
|
+
"onClick-field"?: ((...args: any[]) => any) | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
replace: boolean;
|
|
147
|
+
name: string;
|
|
148
|
+
fields: MaterialDisplayBarField[];
|
|
149
|
+
divider: boolean;
|
|
150
|
+
showArrow: boolean;
|
|
151
|
+
unit: string;
|
|
152
|
+
quantityLabel: string;
|
|
153
|
+
rounded: boolean;
|
|
154
|
+
stockInsufficient: boolean;
|
|
155
|
+
stockInsufficientText: string;
|
|
156
|
+
swipeDelete: boolean;
|
|
157
|
+
deleteText: string;
|
|
158
|
+
}>;
|
|
159
|
+
export default _default;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { defineComponent, createVNode as _createVNode, Fragment as _Fragment } from "vue";
|
|
2
|
+
import { Icon } from "../icon/index.mjs";
|
|
3
|
+
import { Divider } from "../divider/index.mjs";
|
|
4
|
+
import { Button } from "../button/index.mjs";
|
|
5
|
+
import { SwipeCell } from "../swipe-cell/index.mjs";
|
|
6
|
+
import { Label } from "../label/index.mjs";
|
|
7
|
+
import { useRoute, routeProps } from "../composables/use-route.mjs";
|
|
8
|
+
import { createNamespace, extend, makeStringProp, numericProp, truthProp } from "../utils/index.mjs";
|
|
9
|
+
const [name, bem] = createNamespace("material-display-bar");
|
|
10
|
+
const materialDisplayBarProps = extend({}, {
|
|
11
|
+
name: makeStringProp(""),
|
|
12
|
+
quantity: numericProp,
|
|
13
|
+
quantityLabel: makeStringProp(""),
|
|
14
|
+
unit: makeStringProp(""),
|
|
15
|
+
showArrow: truthProp,
|
|
16
|
+
rounded: Boolean,
|
|
17
|
+
stockInsufficient: Boolean,
|
|
18
|
+
stockInsufficientText: makeStringProp("\u5E93\u5B58\u4E0D\u8DB3\u8BF7\u5DE6\u6ED1\u79FB\u9664"),
|
|
19
|
+
swipeDelete: Boolean,
|
|
20
|
+
deleteText: makeStringProp("\u5220\u9664"),
|
|
21
|
+
fields: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: () => []
|
|
24
|
+
},
|
|
25
|
+
divider: truthProp
|
|
26
|
+
}, routeProps);
|
|
27
|
+
var stdin_default = defineComponent({
|
|
28
|
+
name,
|
|
29
|
+
props: materialDisplayBarProps,
|
|
30
|
+
emits: ["click-title", "click-field", "click-media", "delete"],
|
|
31
|
+
setup(props, {
|
|
32
|
+
slots,
|
|
33
|
+
emit
|
|
34
|
+
}) {
|
|
35
|
+
const route = useRoute();
|
|
36
|
+
const renderField = (field, index) => {
|
|
37
|
+
if (field.visible === false)
|
|
38
|
+
return;
|
|
39
|
+
return _createVNode(Label, {
|
|
40
|
+
"key": `${field.label}-${index}`,
|
|
41
|
+
"size": "mini",
|
|
42
|
+
"label": field.label,
|
|
43
|
+
"showLabel": field.showLabel,
|
|
44
|
+
"showContent": field.showContent,
|
|
45
|
+
"content": field.content,
|
|
46
|
+
"type": field.type,
|
|
47
|
+
"vertical": field.vertical,
|
|
48
|
+
"href": field.href,
|
|
49
|
+
"tags": field.tags,
|
|
50
|
+
"media": field.media,
|
|
51
|
+
"onClick": (event) => emit("click-field", field, index, event),
|
|
52
|
+
"onClick-media": (item, mediaIndex, event) => emit("click-media", item, mediaIndex, field, index, event)
|
|
53
|
+
}, null);
|
|
54
|
+
};
|
|
55
|
+
const onTitleClick = (event) => {
|
|
56
|
+
emit("click-title", event);
|
|
57
|
+
route();
|
|
58
|
+
};
|
|
59
|
+
const renderBar = () => {
|
|
60
|
+
var _a, _b, _c;
|
|
61
|
+
return _createVNode("section", {
|
|
62
|
+
"class": bem({
|
|
63
|
+
rounded: props.rounded
|
|
64
|
+
})
|
|
65
|
+
}, [_createVNode("div", {
|
|
66
|
+
"class": bem("body")
|
|
67
|
+
}, [_createVNode("div", {
|
|
68
|
+
"class": bem("header")
|
|
69
|
+
}, [_createVNode("button", {
|
|
70
|
+
"type": "button",
|
|
71
|
+
"class": bem("title"),
|
|
72
|
+
"onClick": onTitleClick
|
|
73
|
+
}, [((_a = slots.title) == null ? void 0 : _a.call(slots)) || _createVNode("span", null, [props.name]), props.showArrow && _createVNode(Icon, {
|
|
74
|
+
"name": "arrow",
|
|
75
|
+
"class": bem("title-arrow")
|
|
76
|
+
}, null)]), props.stockInsufficient ? _createVNode("span", {
|
|
77
|
+
"class": bem("stock-insufficient")
|
|
78
|
+
}, [props.stockInsufficientText]) : (slots.quantity || props.quantity !== void 0) && _createVNode("div", {
|
|
79
|
+
"class": bem("quantity")
|
|
80
|
+
}, [((_b = slots.quantity) == null ? void 0 : _b.call(slots)) || _createVNode(_Fragment, null, [props.quantityLabel && _createVNode("span", {
|
|
81
|
+
"class": bem("quantity-label")
|
|
82
|
+
}, [props.quantityLabel]), _createVNode("strong", null, [props.quantity]), props.unit && _createVNode("span", null, [props.unit])])])]), props.fields.filter((field) => field.visible !== false).length > 0 && _createVNode("div", {
|
|
83
|
+
"class": bem("fields")
|
|
84
|
+
}, [props.fields.map(renderField)])]), props.divider && _createVNode(Divider, {
|
|
85
|
+
"hairline": true,
|
|
86
|
+
"class": bem("divider")
|
|
87
|
+
}, null), ((_c = slots.default) == null ? void 0 : _c.call(slots)) && _createVNode("div", {
|
|
88
|
+
"class": bem("bottom")
|
|
89
|
+
}, [slots.default()])]);
|
|
90
|
+
};
|
|
91
|
+
return () => props.swipeDelete ? _createVNode(SwipeCell, {
|
|
92
|
+
"rightWidth": 76,
|
|
93
|
+
"class": bem("swipe-cell", {
|
|
94
|
+
rounded: props.rounded
|
|
95
|
+
})
|
|
96
|
+
}, {
|
|
97
|
+
default: renderBar,
|
|
98
|
+
right: () => _createVNode(Button, {
|
|
99
|
+
"type": "danger",
|
|
100
|
+
"text": props.deleteText,
|
|
101
|
+
"class": bem("delete"),
|
|
102
|
+
"onClick": (event) => emit("delete", event)
|
|
103
|
+
}, null)
|
|
104
|
+
}) : renderBar();
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
export {
|
|
108
|
+
stdin_default as default
|
|
109
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--van-material-display-bar-padding: 10px var(--van-padding-md);--van-material-display-bar-radius: var(--van-border-radius-lg);--van-material-display-bar-gap: 4px;--van-material-display-bar-fields-gap: 0;--van-material-display-bar-title-color: var(--van-gray-8);--van-material-display-bar-title-font-size: var(--van-font-size-md);--van-material-display-bar-title-line-height: var(--van-line-height-lg);--van-material-display-bar-title-gap: 2px;--van-material-display-bar-title-icon-size: 12px;--van-material-display-bar-quantity-color: var(--van-orange-700);--van-material-display-bar-quantity-gap: 2px;--van-material-display-bar-quantity-label-gap: 4px}.van-material-display-bar{overflow:hidden;background:var(--van-white)}.van-material-display-bar--rounded{border-radius:var(--van-material-display-bar-radius)}.van-material-display-bar__body{display:flex;flex-direction:column;gap:var(--van-material-display-bar-gap);padding:var(--van-material-display-bar-padding)}.van-material-display-bar__header,.van-material-display-bar__quantity,.van-material-display-bar__title{display:flex;align-items:center}.van-material-display-bar__header{justify-content:space-between;gap:var(--van-padding-sm);min-width:0}.van-material-display-bar__title{min-width:0;gap:var(--van-material-display-bar-title-gap);padding:0;color:var(--van-material-display-bar-title-color);font:inherit;font-size:var(--van-material-display-bar-title-font-size);font-weight:400;line-height:var(--van-material-display-bar-title-line-height);text-align:left;background:transparent;border:0;cursor:pointer}.van-material-display-bar__title:active{opacity:var(--van-active-opacity)}.van-material-display-bar__title-arrow{flex:none;color:var(--van-material-display-bar-title-color);font-size:var(--van-material-display-bar-title-icon-size)}.van-material-display-bar__quantity{flex:none;gap:var(--van-material-display-bar-quantity-gap);color:var(--van-material-display-bar-title-color);font-size:var(--van-material-display-bar-title-font-size);line-height:var(--van-material-display-bar-title-line-height);white-space:nowrap}.van-material-display-bar__quantity strong{color:var(--van-material-display-bar-quantity-color);font-weight:var(--van-font-weight-bold)}.van-material-display-bar__quantity-label{margin-right:var(--van-material-display-bar-quantity-label-gap)}.van-material-display-bar__stock-insufficient{flex:none;color:var(--van-red-500);font-size:var(--van-font-size-sm);line-height:var(--van-line-height-md);white-space:nowrap}.van-material-display-bar__fields{display:flex;flex-direction:column;gap:var(--van-material-display-bar-fields-gap);width:100%}.van-material-display-bar__divider.van-divider{margin:0 var(--van-padding-md)}.van-material-display-bar__bottom{display:flex;flex-direction:column;gap:var(--van-material-display-bar-gap)}.van-material-display-bar__swipe-cell{overflow:hidden;background:var(--van-gray-2)}.van-material-display-bar__swipe-cell--rounded{border-radius:var(--van-material-display-bar-radius)}.van-material-display-bar__delete{width:calc(100% - 8px);height:100%;margin:0 4px;border:0;border-radius:8px}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export declare const MaterialDisplayBar: import("../utils").WithInstall<import("vue").DefineComponent<{
|
|
2
|
+
name: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
quantity: (NumberConstructor | StringConstructor)[];
|
|
7
|
+
quantityLabel: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
unit: {
|
|
12
|
+
type: import("vue").PropType<string>;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
showArrow: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: true;
|
|
18
|
+
};
|
|
19
|
+
rounded: BooleanConstructor;
|
|
20
|
+
stockInsufficient: BooleanConstructor;
|
|
21
|
+
stockInsufficientText: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
swipeDelete: BooleanConstructor;
|
|
26
|
+
deleteText: {
|
|
27
|
+
type: import("vue").PropType<string>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
fields: {
|
|
31
|
+
type: import("vue").PropType<import("./MaterialDisplayBar").MaterialDisplayBarField[]>;
|
|
32
|
+
default: () => never[];
|
|
33
|
+
};
|
|
34
|
+
divider: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: true;
|
|
37
|
+
};
|
|
38
|
+
} & {
|
|
39
|
+
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
|
|
40
|
+
url: StringConstructor;
|
|
41
|
+
replace: BooleanConstructor;
|
|
42
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("delete" | "click-title" | "click-media" | "click-field")[], "delete" | "click-title" | "click-media" | "click-field", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
name: {
|
|
44
|
+
type: import("vue").PropType<string>;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
quantity: (NumberConstructor | StringConstructor)[];
|
|
48
|
+
quantityLabel: {
|
|
49
|
+
type: import("vue").PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
unit: {
|
|
53
|
+
type: import("vue").PropType<string>;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
showArrow: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: true;
|
|
59
|
+
};
|
|
60
|
+
rounded: BooleanConstructor;
|
|
61
|
+
stockInsufficient: BooleanConstructor;
|
|
62
|
+
stockInsufficientText: {
|
|
63
|
+
type: import("vue").PropType<string>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
swipeDelete: BooleanConstructor;
|
|
67
|
+
deleteText: {
|
|
68
|
+
type: import("vue").PropType<string>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
fields: {
|
|
72
|
+
type: import("vue").PropType<import("./MaterialDisplayBar").MaterialDisplayBarField[]>;
|
|
73
|
+
default: () => never[];
|
|
74
|
+
};
|
|
75
|
+
divider: {
|
|
76
|
+
type: BooleanConstructor;
|
|
77
|
+
default: true;
|
|
78
|
+
};
|
|
79
|
+
} & {
|
|
80
|
+
to: import("vue").PropType<import("vue-router").RouteLocationRaw>;
|
|
81
|
+
url: StringConstructor;
|
|
82
|
+
replace: BooleanConstructor;
|
|
83
|
+
}>> & {
|
|
84
|
+
onDelete?: ((...args: any[]) => any) | undefined;
|
|
85
|
+
"onClick-title"?: ((...args: any[]) => any) | undefined;
|
|
86
|
+
"onClick-media"?: ((...args: any[]) => any) | undefined;
|
|
87
|
+
"onClick-field"?: ((...args: any[]) => any) | undefined;
|
|
88
|
+
}, {
|
|
89
|
+
replace: boolean;
|
|
90
|
+
name: string;
|
|
91
|
+
fields: import("./MaterialDisplayBar").MaterialDisplayBarField[];
|
|
92
|
+
divider: boolean;
|
|
93
|
+
showArrow: boolean;
|
|
94
|
+
unit: string;
|
|
95
|
+
quantityLabel: string;
|
|
96
|
+
rounded: boolean;
|
|
97
|
+
stockInsufficient: boolean;
|
|
98
|
+
stockInsufficientText: string;
|
|
99
|
+
swipeDelete: boolean;
|
|
100
|
+
deleteText: string;
|
|
101
|
+
}>>;
|
|
102
|
+
export default MaterialDisplayBar;
|
|
103
|
+
export type { MaterialDisplayBarField, MaterialDisplayBarProps } from './MaterialDisplayBar';
|