persagy-vant 0.0.40 → 0.0.42
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/BlueMarkHeader.d.ts +13 -0
- package/es/blue-mark/BlueMarkHeader.mjs +3 -1
- package/es/blue-mark/CollapseToggle.d.ts +13 -0
- package/es/blue-mark/CollapseToggle.mjs +5 -1
- package/es/blue-mark/index.d.ts +18 -0
- package/es/checkbox-panel/CheckboxPanel.d.ts +86 -1
- package/es/checkbox-panel/CheckboxPanel.mjs +184 -36
- package/es/checkbox-panel/index.css +1 -1
- package/es/checkbox-panel/index.d.ts +63 -1
- package/es/checkbox-panel/index.less +89 -2
- package/es/checkbox-panel/style/index.mjs +5 -0
- package/es/checkbox-panel/style/less.mjs +5 -0
- package/es/index.d.ts +2 -1
- package/es/index.mjs +4 -1
- package/es/label/Label.d.ts +13 -0
- package/es/label/Label.mjs +11 -4
- package/es/label/index.css +1 -1
- package/es/label/index.d.ts +9 -0
- package/es/label/index.less +5 -0
- package/es/locale/lang/en-US.d.ts +3 -0
- package/es/locale/lang/en-US.mjs +3 -0
- package/es/locale/lang/zh-CN.d.ts +3 -0
- package/es/locale/lang/zh-CN.mjs +3 -0
- package/es/location-select/style/index.mjs +1 -1
- package/es/location-select/style/less.mjs +1 -1
- package/es/material-action-bar/MaterialActionBar.d.ts +19 -0
- package/es/material-action-bar/MaterialActionBar.mjs +12 -6
- package/es/material-action-bar/index.css +1 -1
- package/es/material-action-bar/index.d.ts +36 -0
- package/es/material-action-bar/index.less +5 -3
- package/es/material-add/index.css +1 -1
- package/es/material-add/style/index.mjs +1 -1
- package/es/material-add/style/less.mjs +1 -1
- package/es/material-display-bar/MaterialDisplayBar.mjs +0 -1
- package/es/material-display-bar/index.css +1 -1
- package/es/material-display-bar/index.less +2 -1
- package/es/material-display-bar/var.less +3 -2
- package/es/notice-bar/index.css +1 -1
- package/es/notice-bar/index.less +13 -0
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.less +19 -0
- package/es/tabs/Tabs.mjs +3 -2
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +15 -5
- package/es/tabs/var.less +1 -0
- package/es/title-bar/TitleBar.d.ts +44 -0
- package/es/title-bar/TitleBar.mjs +9 -1
- package/es/title-bar/index.css +1 -1
- package/es/title-bar/index.d.ts +30 -0
- package/es/title-bar/index.less +10 -3
- package/es/title-bar/var.less +2 -1
- package/es/tree-select/TreeSelect.d.ts +3 -0
- package/es/tree-select/TreeSelect.mjs +18 -2
- package/es/tree-select/index.d.ts +2 -0
- package/es/tree-select-panel/TreeSelectPanel.d.ts +181 -0
- package/es/tree-select-panel/TreeSelectPanel.mjs +213 -0
- package/es/tree-select-panel/index.css +1 -0
- package/es/tree-select-panel/index.d.ts +134 -0
- package/es/tree-select-panel/index.less +107 -0
- package/es/tree-select-panel/index.mjs +8 -0
- package/es/tree-select-panel/style/index.mjs +23 -0
- package/es/tree-select-panel/style/less.mjs +23 -0
- package/lib/blue-mark/BlueMarkHeader.d.ts +13 -0
- package/lib/blue-mark/BlueMarkHeader.js +2 -0
- package/lib/blue-mark/CollapseToggle.d.ts +13 -0
- package/lib/blue-mark/CollapseToggle.js +5 -1
- package/lib/blue-mark/index.d.ts +18 -0
- package/lib/checkbox-panel/CheckboxPanel.d.ts +86 -1
- package/lib/checkbox-panel/CheckboxPanel.js +183 -35
- package/lib/checkbox-panel/index.css +1 -1
- package/lib/checkbox-panel/index.d.ts +63 -1
- package/lib/checkbox-panel/index.less +89 -2
- package/lib/checkbox-panel/style/index.js +5 -0
- package/lib/checkbox-panel/style/less.js +5 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -1
- package/lib/index.less +6 -5
- package/lib/label/Label.d.ts +13 -0
- package/lib/label/Label.js +11 -4
- package/lib/label/index.css +1 -1
- package/lib/label/index.d.ts +9 -0
- package/lib/label/index.less +5 -0
- package/lib/locale/lang/en-US.d.ts +3 -0
- package/lib/locale/lang/en-US.js +3 -0
- package/lib/locale/lang/zh-CN.d.ts +3 -0
- package/lib/locale/lang/zh-CN.js +3 -0
- package/lib/location-select/style/index.js +1 -1
- package/lib/location-select/style/less.js +1 -1
- package/lib/material-action-bar/MaterialActionBar.d.ts +19 -0
- package/lib/material-action-bar/MaterialActionBar.js +11 -5
- package/lib/material-action-bar/index.css +1 -1
- package/lib/material-action-bar/index.d.ts +36 -0
- package/lib/material-action-bar/index.less +5 -3
- package/lib/material-add/index.css +1 -1
- package/lib/material-add/style/index.js +1 -1
- package/lib/material-add/style/less.js +1 -1
- package/lib/material-display-bar/MaterialDisplayBar.js +0 -1
- package/lib/material-display-bar/index.css +1 -1
- package/lib/material-display-bar/index.less +2 -1
- package/lib/material-display-bar/var.less +3 -2
- package/lib/notice-bar/index.css +1 -1
- package/lib/notice-bar/index.less +13 -0
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.less +19 -0
- package/lib/tabs/Tabs.js +3 -2
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +15 -5
- package/lib/tabs/var.less +1 -0
- package/lib/title-bar/TitleBar.d.ts +44 -0
- package/lib/title-bar/TitleBar.js +9 -1
- package/lib/title-bar/index.css +1 -1
- package/lib/title-bar/index.d.ts +30 -0
- package/lib/title-bar/index.less +10 -3
- package/lib/title-bar/var.less +2 -1
- package/lib/tree-select/TreeSelect.d.ts +3 -0
- package/lib/tree-select/TreeSelect.js +18 -2
- package/lib/tree-select/index.d.ts +2 -0
- package/lib/tree-select-panel/TreeSelectPanel.d.ts +181 -0
- package/lib/tree-select-panel/TreeSelectPanel.js +232 -0
- package/lib/tree-select-panel/index.css +1 -0
- package/lib/tree-select-panel/index.d.ts +134 -0
- package/lib/tree-select-panel/index.js +37 -0
- package/lib/tree-select-panel/index.less +107 -0
- package/lib/tree-select-panel/style/index.js +23 -0
- package/lib/tree-select-panel/style/less.js +23 -0
- package/lib/vant.cjs.js +1997 -1605
- package/lib/vant.es.js +1998 -1606
- package/lib/vant.js +1997 -1605
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/references/component-catalog.md +1 -1
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +1 -0
- package/skills/use-persagy-vant/references/element-component-matching.md +1 -0
- package/skills/use-persagy-vant/references/page-recipes.md +1 -0
- package/skills/use-persagy-vant/references/public-style-system.md +6 -0
|
@@ -25,44 +25,145 @@ var import_utils = require("../utils");
|
|
|
25
25
|
var import_action_sheet = require("../action-sheet");
|
|
26
26
|
var import_nav_bar = require("../nav-bar");
|
|
27
27
|
var import_icon = require("../icon");
|
|
28
|
+
var import_badge = require("../badge");
|
|
28
29
|
var import_cell = require("../cell");
|
|
30
|
+
var import_empty = require("../empty");
|
|
31
|
+
var import_list = require("../list");
|
|
29
32
|
var import_checkbox = require("../checkbox");
|
|
30
33
|
var import_checkbox_group = require("../checkbox-group");
|
|
31
|
-
var
|
|
34
|
+
var import_bottom_action_bar = require("../bottom-action-bar");
|
|
35
|
+
var import_search = require("../search");
|
|
32
36
|
const [name, bem] = (0, import_utils.createNamespace)("checkbox-panel");
|
|
37
|
+
const escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
33
38
|
const checkboxPanelProps = {
|
|
34
39
|
show: Boolean,
|
|
35
40
|
title: String,
|
|
36
41
|
options: (0, import_utils.makeArrayProp)(),
|
|
37
42
|
modelValue: Array,
|
|
43
|
+
searchable: Boolean,
|
|
44
|
+
searchPlaceholder: String,
|
|
45
|
+
filterable: Boolean,
|
|
46
|
+
filterActive: Boolean,
|
|
47
|
+
loading: Boolean,
|
|
48
|
+
finished: Boolean,
|
|
49
|
+
error: Boolean,
|
|
50
|
+
lazy: Boolean,
|
|
51
|
+
loadingText: String,
|
|
52
|
+
finishedText: String,
|
|
53
|
+
errorText: String,
|
|
38
54
|
confirmText: (0, import_utils.makeStringProp)("\u786E\u5B9A"),
|
|
39
55
|
selectAllText: (0, import_utils.makeStringProp)("\u5168\u9009"),
|
|
40
|
-
cancelSelectAllText: (0, import_utils.makeStringProp)("\u53D6\u6D88\u5168\u9009")
|
|
56
|
+
cancelSelectAllText: (0, import_utils.makeStringProp)("\u53D6\u6D88\u5168\u9009"),
|
|
57
|
+
selectedText: (0, import_utils.makeStringProp)("\u5C55\u5F00\u5DF2\u9009"),
|
|
58
|
+
collapseSelectedText: (0, import_utils.makeStringProp)("\u6536\u8D77\u5DF2\u9009"),
|
|
59
|
+
clearSelectedText: (0, import_utils.makeStringProp)("\u6E05\u7A7A\u5DF2\u9009")
|
|
41
60
|
};
|
|
42
61
|
var stdin_default = (0, import_vue.defineComponent)({
|
|
43
62
|
name,
|
|
44
63
|
props: checkboxPanelProps,
|
|
45
|
-
emits: ["update:show", "update:modelValue", "confirm"],
|
|
64
|
+
emits: ["update:show", "update:modelValue", "update:loading", "update:error", "confirm", "search", "filter", "load", "show-selected"],
|
|
46
65
|
setup(props, {
|
|
47
|
-
emit
|
|
66
|
+
emit,
|
|
67
|
+
slots
|
|
48
68
|
}) {
|
|
69
|
+
const keyword = (0, import_vue.ref)("");
|
|
70
|
+
const expandedSelected = (0, import_vue.ref)(false);
|
|
49
71
|
const selectedValues = (0, import_vue.computed)(() => props.modelValue || []);
|
|
50
|
-
const
|
|
72
|
+
const selectedOptions = (0, import_vue.computed)(() => props.options.filter((option) => selectedValues.value.includes(option.value)));
|
|
73
|
+
const filteredOptions = (0, import_vue.computed)(() => {
|
|
74
|
+
const query = keyword.value.trim().toLocaleLowerCase();
|
|
75
|
+
if (!query)
|
|
76
|
+
return props.options;
|
|
77
|
+
return props.options.filter((option) => option.label.toLocaleLowerCase().includes(query));
|
|
78
|
+
});
|
|
79
|
+
const selectableOptions = (0, import_vue.computed)(() => filteredOptions.value.filter((option) => !option.disabled));
|
|
51
80
|
const isAllSelected = (0, import_vue.computed)(() => selectableOptions.value.length > 0 && selectableOptions.value.every((option) => selectedValues.value.includes(option.value)));
|
|
52
81
|
const close = () => emit("update:show", false);
|
|
82
|
+
const updateSelectedValues = (values) => {
|
|
83
|
+
if (!values.length)
|
|
84
|
+
expandedSelected.value = false;
|
|
85
|
+
emit("update:modelValue", values);
|
|
86
|
+
};
|
|
53
87
|
const toggleOption = (option) => {
|
|
54
88
|
if (option.disabled)
|
|
55
89
|
return;
|
|
56
90
|
const values = [...selectedValues.value];
|
|
57
91
|
const index = values.indexOf(option.value);
|
|
58
92
|
index === -1 ? values.push(option.value) : values.splice(index, 1);
|
|
59
|
-
|
|
93
|
+
updateSelectedValues(values);
|
|
94
|
+
};
|
|
95
|
+
const toggleAll = () => {
|
|
96
|
+
const selectableValues = selectableOptions.value.map((option) => option.value);
|
|
97
|
+
const values = isAllSelected.value ? selectedValues.value.filter((value) => !selectableValues.includes(value)) : [.../* @__PURE__ */ new Set([...selectedValues.value, ...selectableValues])];
|
|
98
|
+
updateSelectedValues(values);
|
|
99
|
+
};
|
|
100
|
+
const removeSelected = (option) => {
|
|
101
|
+
updateSelectedValues(selectedValues.value.filter((value) => value !== option.value));
|
|
60
102
|
};
|
|
61
|
-
const
|
|
103
|
+
const clearSelected = () => updateSelectedValues([]);
|
|
62
104
|
const confirm = () => {
|
|
63
105
|
emit("confirm", selectedValues.value);
|
|
64
106
|
close();
|
|
65
107
|
};
|
|
108
|
+
const renderFilterAction = () => {
|
|
109
|
+
if (slots.filter)
|
|
110
|
+
return slots.filter();
|
|
111
|
+
if (!props.filterable)
|
|
112
|
+
return;
|
|
113
|
+
return (0, import_vue.createVNode)("button", {
|
|
114
|
+
"type": "button",
|
|
115
|
+
"class": bem("filter"),
|
|
116
|
+
"aria-label": "\u7B5B\u9009",
|
|
117
|
+
"onClick": () => emit("filter")
|
|
118
|
+
}, [(0, import_vue.createVNode)(import_badge.Badge, {
|
|
119
|
+
"dot": props.filterActive
|
|
120
|
+
}, {
|
|
121
|
+
default: () => [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
122
|
+
"name": "filter-o",
|
|
123
|
+
"size": "22"
|
|
124
|
+
}, null)]
|
|
125
|
+
})]);
|
|
126
|
+
};
|
|
127
|
+
const renderOptionLabel = (label) => {
|
|
128
|
+
const query = keyword.value.trim();
|
|
129
|
+
if (!query)
|
|
130
|
+
return label;
|
|
131
|
+
const normalizedQuery = query.toLocaleLowerCase();
|
|
132
|
+
return label.split(new RegExp(`(${escapeRegExp(query)})`, "ig")).map((part) => part.toLocaleLowerCase() === normalizedQuery ? (0, import_vue.createVNode)("span", {
|
|
133
|
+
"class": bem("match")
|
|
134
|
+
}, [part]) : part);
|
|
135
|
+
};
|
|
136
|
+
const renderOptions = () => {
|
|
137
|
+
if (!filteredOptions.value.length) {
|
|
138
|
+
return (0, import_vue.createVNode)(import_empty.Empty, {
|
|
139
|
+
"imageSize": 60,
|
|
140
|
+
"description": "\u6682\u65E0\u5339\u914D\u9009\u9879"
|
|
141
|
+
}, null);
|
|
142
|
+
}
|
|
143
|
+
return (0, import_vue.createVNode)(import_checkbox_group.CheckboxGroup, {
|
|
144
|
+
"modelValue": selectedValues.value,
|
|
145
|
+
"class": bem("card"),
|
|
146
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value)
|
|
147
|
+
}, {
|
|
148
|
+
default: () => [filteredOptions.value.map((option) => (0, import_vue.createVNode)(import_cell.Cell, {
|
|
149
|
+
"key": option.value,
|
|
150
|
+
"clickable": !option.disabled,
|
|
151
|
+
"title": option.label,
|
|
152
|
+
"onClick": () => toggleOption(option)
|
|
153
|
+
}, {
|
|
154
|
+
title: () => renderOptionLabel(option.label),
|
|
155
|
+
"right-icon": () => (0, import_vue.createVNode)(import_checkbox.Checkbox, {
|
|
156
|
+
"name": option.value,
|
|
157
|
+
"disabled": option.disabled,
|
|
158
|
+
"onClick": (event) => event.stopPropagation()
|
|
159
|
+
}, null)
|
|
160
|
+
}))]
|
|
161
|
+
});
|
|
162
|
+
};
|
|
163
|
+
(0, import_vue.watch)(selectedValues, (values) => {
|
|
164
|
+
if (!values.length)
|
|
165
|
+
expandedSelected.value = false;
|
|
166
|
+
});
|
|
66
167
|
return () => (0, import_vue.createVNode)(import_action_sheet.ActionSheet, {
|
|
67
168
|
"show": props.show,
|
|
68
169
|
"class": bem(),
|
|
@@ -82,38 +183,85 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
82
183
|
"size": "22",
|
|
83
184
|
"onClick": close
|
|
84
185
|
}, null),
|
|
85
|
-
right:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
186
|
+
right: renderFilterAction
|
|
187
|
+
})]), props.searchable && (0, import_vue.createVNode)(import_search.Search, {
|
|
188
|
+
"modelValue": keyword.value,
|
|
189
|
+
"class": bem("search"),
|
|
190
|
+
"shape": "round",
|
|
191
|
+
"inputAlign": "left",
|
|
192
|
+
"placeholder": props.searchPlaceholder || "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD",
|
|
193
|
+
"maxlength": 200,
|
|
194
|
+
"onUpdate:modelValue": (value) => {
|
|
195
|
+
keyword.value = value;
|
|
196
|
+
emit("search", value);
|
|
197
|
+
},
|
|
198
|
+
"onSearch": (value) => emit("search", value)
|
|
199
|
+
}, null), (0, import_vue.createVNode)("div", {
|
|
90
200
|
"class": bem("body")
|
|
91
|
-
}, [(0, import_vue.createVNode)(
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
201
|
+
}, [props.lazy ? (0, import_vue.createVNode)(import_list.List, {
|
|
202
|
+
"loading": props.loading,
|
|
203
|
+
"finished": props.finished,
|
|
204
|
+
"error": props.error,
|
|
205
|
+
"loadingText": props.loadingText,
|
|
206
|
+
"finishedText": props.finishedText,
|
|
207
|
+
"errorText": props.errorText,
|
|
208
|
+
"onUpdate:loading": (value) => emit("update:loading", value),
|
|
209
|
+
"onUpdate:error": (value) => emit("update:error", value),
|
|
210
|
+
"onLoad": () => emit("load")
|
|
95
211
|
}, {
|
|
96
|
-
default: () => [
|
|
97
|
-
|
|
98
|
-
"clickable": !option.disabled,
|
|
99
|
-
"title": option.label,
|
|
100
|
-
"onClick": () => toggleOption(option)
|
|
101
|
-
}, {
|
|
102
|
-
"right-icon": () => (0, import_vue.createVNode)(import_checkbox.Checkbox, {
|
|
103
|
-
"name": option.value,
|
|
104
|
-
"disabled": option.disabled,
|
|
105
|
-
"onClick": (event) => event.stopPropagation()
|
|
106
|
-
}, null)
|
|
107
|
-
}))]
|
|
108
|
-
})]), (0, import_vue.createVNode)("div", {
|
|
212
|
+
default: () => [renderOptions()]
|
|
213
|
+
}) : renderOptions()]), (0, import_vue.createVNode)("div", {
|
|
109
214
|
"class": bem("footer")
|
|
110
|
-
}, [(0, import_vue.createVNode)(
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
215
|
+
}, [(0, import_vue.createVNode)(import_bottom_action_bar.BottomActionBar, {
|
|
216
|
+
"fixed": false,
|
|
217
|
+
"moreIcon": "passed",
|
|
218
|
+
"moreText": expandedSelected.value ? props.collapseSelectedText : props.selectedText,
|
|
219
|
+
"moreBadge": selectedValues.value.length,
|
|
220
|
+
"moreBadgeMax": 99,
|
|
221
|
+
"secondaryText": isAllSelected.value ? props.cancelSelectAllText : props.selectAllText,
|
|
222
|
+
"secondaryDisabled": !selectableOptions.value.length,
|
|
223
|
+
"confirmText": props.confirmText,
|
|
224
|
+
"moreDisabled": !selectedValues.value.length,
|
|
225
|
+
"confirmDisabled": !selectedValues.value.length,
|
|
226
|
+
"onSecondary": toggleAll,
|
|
227
|
+
"onMore": () => {
|
|
228
|
+
expandedSelected.value = !expandedSelected.value;
|
|
229
|
+
emit("show-selected", selectedValues.value);
|
|
230
|
+
},
|
|
231
|
+
"onConfirm": confirm
|
|
232
|
+
}, null), expandedSelected.value && (0, import_vue.createVNode)("div", {
|
|
233
|
+
"class": bem("selected-panel")
|
|
234
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
235
|
+
"class": bem("selected-header")
|
|
236
|
+
}, [(0, import_vue.createVNode)("button", {
|
|
237
|
+
"type": "button",
|
|
238
|
+
"class": bem("clear"),
|
|
239
|
+
"onClick": clearSelected
|
|
240
|
+
}, [props.clearSelectedText]), (0, import_vue.createVNode)("button", {
|
|
241
|
+
"type": "button",
|
|
242
|
+
"class": bem("collapse"),
|
|
243
|
+
"onClick": () => {
|
|
244
|
+
expandedSelected.value = false;
|
|
245
|
+
}
|
|
246
|
+
}, [props.collapseSelectedText, (0, import_vue.createVNode)(import_icon.Icon, {
|
|
247
|
+
"name": "arrow-down"
|
|
248
|
+
}, null)])]), (0, import_vue.createVNode)("div", {
|
|
249
|
+
"class": bem("selected-list")
|
|
250
|
+
}, [selectedOptions.value.map((option) => (0, import_vue.createVNode)(import_cell.Cell, {
|
|
251
|
+
"key": option.value,
|
|
252
|
+
"title": option.label,
|
|
253
|
+
"class": bem("selected-item"),
|
|
254
|
+
"border": false
|
|
114
255
|
}, {
|
|
115
|
-
|
|
116
|
-
|
|
256
|
+
"right-icon": () => (0, import_vue.createVNode)("button", {
|
|
257
|
+
"type": "button",
|
|
258
|
+
"class": bem("remove"),
|
|
259
|
+
"aria-label": `\u79FB\u9664${option.label}`,
|
|
260
|
+
"onClick": () => removeSelected(option)
|
|
261
|
+
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
262
|
+
"name": "cross"
|
|
263
|
+
}, null)])
|
|
264
|
+
}))])])])])]
|
|
117
265
|
});
|
|
118
266
|
}
|
|
119
267
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.van-checkbox-panel{box-sizing:border-box;display:flex;height:calc(100% - 96px);max-height:calc(100% - 96px);overflow:hidden;background:var(--van-gray-1)}.van-checkbox-panel .van-action-sheet__content{display:flex;flex:1;min-height:0;gap:0;padding:0;overflow:hidden}.van-checkbox-panel__content{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;background:var(--van-gray-1)}.van-checkbox-panel__nav-wrapper{flex:none;width:100%;min-width:0;max-width:100%;overflow:hidden}.van-checkbox-panel__nav{box-sizing:border-box;width:100%;min-width:0;max-width:100%;overflow:hidden;--van-nav-bar-background-color: var(--van-gray-1)}.van-checkbox-panel__nav .van-nav-bar__content{box-sizing:border-box;width:100%;overflow:hidden}.van-checkbox-panel__nav .van-nav-bar__left--slot,.van-checkbox-panel__nav .van-nav-bar__right--slot{padding:0}.van-checkbox-panel__nav .van-nav-bar__left--slot{left:var(--van-padding-md)}.van-checkbox-panel__nav .van-nav-bar__right--slot{right:var(--van-padding-md)}.van-checkbox-panel__body{flex:1;min-height:0;padding:0 var(--van-padding-md);overflow-y:auto}.van-checkbox-panel__card{overflow:hidden;background:var(--van-white);border-radius:var(--van-border-radius-lg)}.van-checkbox-panel__footer{flex:none;padding:var(--van-padding-
|
|
1
|
+
.van-checkbox-panel{box-sizing:border-box;display:flex;height:calc(100% - 96px);max-height:calc(100% - 96px);overflow:hidden;background:var(--van-gray-1)}.van-checkbox-panel .van-action-sheet__content{display:flex;flex:1;min-height:0;gap:0;padding:0;overflow:hidden}.van-checkbox-panel__content{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden;background:var(--van-gray-1)}.van-checkbox-panel__nav-wrapper{flex:none;width:100%;min-width:0;max-width:100%;overflow:hidden}.van-checkbox-panel__nav{box-sizing:border-box;width:100%;min-width:0;max-width:100%;overflow:hidden;--van-nav-bar-background-color: var(--van-gray-1)}.van-checkbox-panel__nav .van-nav-bar__content{box-sizing:border-box;width:100%;overflow:hidden}.van-checkbox-panel__nav .van-nav-bar__left--slot,.van-checkbox-panel__nav .van-nav-bar__right--slot{padding:0}.van-checkbox-panel__nav .van-nav-bar__left--slot{left:var(--van-padding-md)}.van-checkbox-panel__nav .van-nav-bar__right--slot{right:var(--van-padding-md)}.van-checkbox-panel__filter{display:flex;align-items:center;justify-content:center;width:34px;height:46px;padding:0;color:inherit;background:transparent;border:0}.van-checkbox-panel__search{--van-search-padding: 8px var(--van-padding-md);--van-search-background-color: var(--van-gray-1);--van-search-content-background-color: var(--van-white)}.van-checkbox-panel__match{color:var(--van-primary-color)}.van-checkbox-panel__body{flex:1;min-height:0;padding:0 var(--van-padding-md);overflow-y:auto}.van-checkbox-panel__card{overflow:hidden;background:var(--van-white);border-radius:var(--van-border-radius-lg)}.van-checkbox-panel__footer{position:relative;flex:none;background:var(--van-white);box-shadow:0 -2px 5px rgba(27,33,41,.1)}.van-checkbox-panel__footer .van-bottom-action-bar{box-shadow:none}.van-checkbox-panel__footer .van-bottom-action-bar__secondary{flex:0 0 auto;width:auto;padding:0 var(--van-padding-md)}.van-checkbox-panel__selected-panel{position:absolute;right:0;bottom:60px;left:0;display:flex;flex-direction:column;max-height:min(340px,calc(100vh - 156px));overflow:hidden;background:var(--van-white);box-shadow:0 -2px 5px rgba(27,33,41,.1)}.van-checkbox-panel__selected-header{display:flex;flex:none;align-items:center;justify-content:space-between;padding:12px var(--van-padding-md) 4px}.van-checkbox-panel__clear,.van-checkbox-panel__collapse{display:inline-flex;align-items:center;padding:0;font:inherit;font-size:var(--van-font-size-md);line-height:var(--van-line-height-lg);background:transparent;border:0}.van-checkbox-panel__clear{color:var(--van-primary-color)}.van-checkbox-panel__collapse,.van-checkbox-panel__remove,.van-checkbox-panel__collapse .van-icon,.van-checkbox-panel__remove .van-icon{color:var(--van-gray-6)}.van-checkbox-panel__collapse{gap:2px}.van-checkbox-panel__selected-list{display:flex;flex:0 1 auto;flex-direction:column;gap:6px;min-height:0;padding:var(--van-padding-xs) var(--van-padding-md);overflow-y:auto;overscroll-behavior:contain}.van-checkbox-panel__selected-item{flex:none;min-height:44px;padding:11px var(--van-padding-md);background:var(--van-gray-1);border-radius:8px}.van-checkbox-panel__remove{display:inline-flex;align-self:flex-start;align-items:center;justify-content:center;width:22px;height:22px;padding:0;background:transparent;border:0}.van-checkbox-panel .van-cell{min-height:44px}.van-checkbox-panel .van-checkbox{margin:0}
|
|
@@ -6,6 +6,17 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
6
6
|
default: () => never[];
|
|
7
7
|
};
|
|
8
8
|
modelValue: import("vue").PropType<string[]>;
|
|
9
|
+
searchable: BooleanConstructor;
|
|
10
|
+
searchPlaceholder: StringConstructor;
|
|
11
|
+
filterable: BooleanConstructor;
|
|
12
|
+
filterActive: BooleanConstructor;
|
|
13
|
+
loading: BooleanConstructor;
|
|
14
|
+
finished: BooleanConstructor;
|
|
15
|
+
error: BooleanConstructor;
|
|
16
|
+
lazy: BooleanConstructor;
|
|
17
|
+
loadingText: StringConstructor;
|
|
18
|
+
finishedText: StringConstructor;
|
|
19
|
+
errorText: StringConstructor;
|
|
9
20
|
confirmText: {
|
|
10
21
|
type: import("vue").PropType<string>;
|
|
11
22
|
default: string;
|
|
@@ -18,7 +29,19 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
18
29
|
type: import("vue").PropType<string>;
|
|
19
30
|
default: string;
|
|
20
31
|
};
|
|
21
|
-
|
|
32
|
+
selectedText: {
|
|
33
|
+
type: import("vue").PropType<string>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
collapseSelectedText: {
|
|
37
|
+
type: import("vue").PropType<string>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
clearSelectedText: {
|
|
41
|
+
type: import("vue").PropType<string>;
|
|
42
|
+
default: string;
|
|
43
|
+
};
|
|
44
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:modelValue" | "load" | "update:show" | "confirm" | "filter" | "update:error" | "update:loading" | "show-selected")[], "search" | "filter" | "update:modelValue" | "load" | "update:show" | "confirm" | "update:error" | "update:loading" | "show-selected", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
45
|
show: BooleanConstructor;
|
|
23
46
|
title: StringConstructor;
|
|
24
47
|
options: {
|
|
@@ -26,6 +49,17 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
26
49
|
default: () => never[];
|
|
27
50
|
};
|
|
28
51
|
modelValue: import("vue").PropType<string[]>;
|
|
52
|
+
searchable: BooleanConstructor;
|
|
53
|
+
searchPlaceholder: StringConstructor;
|
|
54
|
+
filterable: BooleanConstructor;
|
|
55
|
+
filterActive: BooleanConstructor;
|
|
56
|
+
loading: BooleanConstructor;
|
|
57
|
+
finished: BooleanConstructor;
|
|
58
|
+
error: BooleanConstructor;
|
|
59
|
+
lazy: BooleanConstructor;
|
|
60
|
+
loadingText: StringConstructor;
|
|
61
|
+
finishedText: StringConstructor;
|
|
62
|
+
errorText: StringConstructor;
|
|
29
63
|
confirmText: {
|
|
30
64
|
type: import("vue").PropType<string>;
|
|
31
65
|
default: string;
|
|
@@ -38,16 +72,44 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
38
72
|
type: import("vue").PropType<string>;
|
|
39
73
|
default: string;
|
|
40
74
|
};
|
|
75
|
+
selectedText: {
|
|
76
|
+
type: import("vue").PropType<string>;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
collapseSelectedText: {
|
|
80
|
+
type: import("vue").PropType<string>;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
clearSelectedText: {
|
|
84
|
+
type: import("vue").PropType<string>;
|
|
85
|
+
default: string;
|
|
86
|
+
};
|
|
41
87
|
}>> & {
|
|
88
|
+
onLoad?: ((...args: any[]) => any) | undefined;
|
|
42
89
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
43
90
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
44
91
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
92
|
+
"onUpdate:error"?: ((...args: any[]) => any) | undefined;
|
|
93
|
+
"onUpdate:loading"?: ((...args: any[]) => any) | undefined;
|
|
94
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
95
|
+
onFilter?: ((...args: any[]) => any) | undefined;
|
|
96
|
+
"onShow-selected"?: ((...args: any[]) => any) | undefined;
|
|
45
97
|
}, {
|
|
46
98
|
show: boolean;
|
|
99
|
+
error: boolean;
|
|
100
|
+
loading: boolean;
|
|
47
101
|
options: import("./CheckboxPanel").CheckboxPanelOption[];
|
|
48
102
|
confirmText: string;
|
|
103
|
+
finished: boolean;
|
|
104
|
+
searchable: boolean;
|
|
105
|
+
filterable: boolean;
|
|
106
|
+
filterActive: boolean;
|
|
107
|
+
lazy: boolean;
|
|
49
108
|
selectAllText: string;
|
|
50
109
|
cancelSelectAllText: string;
|
|
110
|
+
selectedText: string;
|
|
111
|
+
collapseSelectedText: string;
|
|
112
|
+
clearSelectedText: string;
|
|
51
113
|
}>>;
|
|
52
114
|
export default CheckboxPanel;
|
|
53
115
|
export type { CheckboxPanelProps, CheckboxPanelOption } from './CheckboxPanel';
|
|
@@ -17,10 +17,97 @@
|
|
|
17
17
|
.van-nav-bar__left--slot { left: var(--van-padding-md); }
|
|
18
18
|
.van-nav-bar__right--slot { right: var(--van-padding-md); }
|
|
19
19
|
}
|
|
20
|
+
&__filter { display: flex; align-items: center; justify-content: center; width: 34px; height: 46px; padding: 0; color: inherit; background: transparent; border: 0; }
|
|
21
|
+
&__search {
|
|
22
|
+
--van-search-padding: 8px var(--van-padding-md);
|
|
23
|
+
--van-search-background-color: var(--van-gray-1);
|
|
24
|
+
--van-search-content-background-color: var(--van-white);
|
|
25
|
+
}
|
|
26
|
+
&__match { color: var(--van-primary-color); }
|
|
20
27
|
&__body { flex: 1; min-height: 0; padding: 0 var(--van-padding-md); overflow-y: auto; }
|
|
21
28
|
&__card { overflow: hidden; background: var(--van-white); border-radius: var(--van-border-radius-lg); }
|
|
22
|
-
&__footer {
|
|
23
|
-
|
|
29
|
+
&__footer {
|
|
30
|
+
position: relative;
|
|
31
|
+
flex: none;
|
|
32
|
+
background: var(--van-white);
|
|
33
|
+
box-shadow: 0 -2px 5px rgb(27 33 41 / 10%);
|
|
34
|
+
|
|
35
|
+
.van-bottom-action-bar {
|
|
36
|
+
box-shadow: none;
|
|
37
|
+
|
|
38
|
+
&__secondary {
|
|
39
|
+
flex: 0 0 auto;
|
|
40
|
+
width: auto;
|
|
41
|
+
padding: 0 var(--van-padding-md);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&__selected-panel {
|
|
46
|
+
position: absolute;
|
|
47
|
+
right: 0;
|
|
48
|
+
bottom: 60px;
|
|
49
|
+
left: 0;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
max-height: min(340px, calc(100vh - 156px));
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
background: var(--van-white);
|
|
55
|
+
box-shadow: 0 -2px 5px rgb(27 33 41 / 10%);
|
|
56
|
+
}
|
|
57
|
+
&__selected-header {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex: none;
|
|
60
|
+
align-items: center;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
padding: 12px var(--van-padding-md) 4px;
|
|
63
|
+
}
|
|
64
|
+
&__clear,
|
|
65
|
+
&__collapse {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
padding: 0;
|
|
69
|
+
font: inherit;
|
|
70
|
+
font-size: var(--van-font-size-md);
|
|
71
|
+
line-height: var(--van-line-height-lg);
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: 0;
|
|
74
|
+
}
|
|
75
|
+
&__clear { color: var(--van-primary-color); }
|
|
76
|
+
&__collapse,
|
|
77
|
+
&__remove {
|
|
78
|
+
color: var(--van-gray-6);
|
|
79
|
+
|
|
80
|
+
.van-icon { color: var(--van-gray-6); }
|
|
81
|
+
}
|
|
82
|
+
&__collapse { gap: 2px; }
|
|
83
|
+
&__selected-list {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex: 0 1 auto;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
gap: 6px;
|
|
88
|
+
min-height: 0;
|
|
89
|
+
padding: var(--van-padding-xs) var(--van-padding-md);
|
|
90
|
+
overflow-y: auto;
|
|
91
|
+
overscroll-behavior: contain;
|
|
92
|
+
}
|
|
93
|
+
&__selected-item {
|
|
94
|
+
flex: none;
|
|
95
|
+
min-height: 44px;
|
|
96
|
+
padding: 11px var(--van-padding-md);
|
|
97
|
+
background: var(--van-gray-1);
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
}
|
|
100
|
+
&__remove {
|
|
101
|
+
display: inline-flex;
|
|
102
|
+
align-self: flex-start;
|
|
103
|
+
align-items: center;
|
|
104
|
+
justify-content: center;
|
|
105
|
+
width: 22px;
|
|
106
|
+
height: 22px;
|
|
107
|
+
padding: 0;
|
|
108
|
+
background: transparent;
|
|
109
|
+
border: 0;
|
|
110
|
+
}
|
|
24
111
|
.van-cell { min-height: 44px; }
|
|
25
112
|
.van-checkbox { margin: 0; }
|
|
26
113
|
}
|
|
@@ -3,6 +3,7 @@ require("../../badge/index.css");
|
|
|
3
3
|
require("../../icon/index.css");
|
|
4
4
|
require("../../tag/index.css");
|
|
5
5
|
require("../../loading/index.css");
|
|
6
|
+
require("../../list/index.css");
|
|
6
7
|
require("../../button/index.css");
|
|
7
8
|
require("../../overlay/index.css");
|
|
8
9
|
require("../../popup/index.css");
|
|
@@ -11,7 +12,11 @@ require("../../nav-bar/index.css");
|
|
|
11
12
|
require("../../action-sheet/index.css");
|
|
12
13
|
require("../../checkbox-group/index.css");
|
|
13
14
|
require("../../checkbox/index.css");
|
|
15
|
+
require("../../bottom-action-bar/index.css");
|
|
14
16
|
require("../../radio-group/index.css");
|
|
15
17
|
require("../../radio/index.css");
|
|
16
18
|
require("../../cell/index.css");
|
|
19
|
+
require("../../field/index.css");
|
|
20
|
+
require("../../search/index.css");
|
|
21
|
+
require("../../empty/index.css");
|
|
17
22
|
require("../index.css");
|
|
@@ -3,6 +3,7 @@ require("../../badge/index.less");
|
|
|
3
3
|
require("../../icon/index.less");
|
|
4
4
|
require("../../tag/index.less");
|
|
5
5
|
require("../../loading/index.less");
|
|
6
|
+
require("../../list/index.less");
|
|
6
7
|
require("../../button/index.less");
|
|
7
8
|
require("../../overlay/index.less");
|
|
8
9
|
require("../../popup/index.less");
|
|
@@ -11,7 +12,11 @@ require("../../nav-bar/index.less");
|
|
|
11
12
|
require("../../action-sheet/index.less");
|
|
12
13
|
require("../../checkbox-group/index.less");
|
|
13
14
|
require("../../checkbox/index.less");
|
|
15
|
+
require("../../bottom-action-bar/index.less");
|
|
14
16
|
require("../../radio-group/index.less");
|
|
15
17
|
require("../../radio/index.less");
|
|
16
18
|
require("../../cell/index.less");
|
|
19
|
+
require("../../field/index.less");
|
|
20
|
+
require("../../search/index.less");
|
|
21
|
+
require("../../empty/index.less");
|
|
17
22
|
require("../index.less");
|