persagy-vant 0.0.41 → 0.0.43

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.
Files changed (121) hide show
  1. package/es/action-sheet/ActionSheet.d.ts +4 -0
  2. package/es/action-sheet/ActionSheet.mjs +4 -1
  3. package/es/action-sheet/index.css +1 -1
  4. package/es/action-sheet/index.d.ts +3 -0
  5. package/es/action-sheet/index.less +4 -0
  6. package/es/blue-mark/BlueMarkHeader.d.ts +13 -0
  7. package/es/blue-mark/BlueMarkHeader.mjs +3 -1
  8. package/es/blue-mark/CollapseToggle.d.ts +13 -0
  9. package/es/blue-mark/CollapseToggle.mjs +5 -1
  10. package/es/blue-mark/index.d.ts +18 -0
  11. package/es/checkbox-panel/CheckboxPanel.d.ts +41 -1
  12. package/es/checkbox-panel/CheckboxPanel.mjs +87 -25
  13. package/es/checkbox-panel/index.css +1 -1
  14. package/es/checkbox-panel/index.d.ts +29 -1
  15. package/es/checkbox-panel/index.less +82 -1
  16. package/es/index.d.ts +2 -1
  17. package/es/index.mjs +4 -1
  18. package/es/locale/lang/en-US.d.ts +9 -0
  19. package/es/locale/lang/en-US.mjs +9 -0
  20. package/es/locale/lang/zh-CN.d.ts +9 -0
  21. package/es/locale/lang/zh-CN.mjs +9 -0
  22. package/es/material-action-bar/MaterialActionBar.mjs +3 -1
  23. package/es/material-action-bar/index.css +1 -1
  24. package/es/material-action-bar/index.less +1 -1
  25. package/es/material-add/index.css +1 -1
  26. package/es/notice-bar/index.css +1 -1
  27. package/es/notice-bar/index.less +13 -0
  28. package/es/tabs/Tabs.mjs +3 -2
  29. package/es/tabs/index.css +1 -1
  30. package/es/tabs/index.less +15 -5
  31. package/es/tabs/var.less +1 -0
  32. package/es/title-bar/TitleBar.d.ts +15 -1
  33. package/es/title-bar/TitleBar.mjs +2 -0
  34. package/es/title-bar/index.css +1 -1
  35. package/es/title-bar/index.d.ts +10 -1
  36. package/es/title-bar/index.less +6 -1
  37. package/es/title-bar/var.less +2 -1
  38. package/es/tree-select/TreeSelect.d.ts +3 -0
  39. package/es/tree-select/TreeSelect.mjs +18 -2
  40. package/es/tree-select/index.d.ts +2 -0
  41. package/es/tree-select-panel/TreeSelectPanel.d.ts +181 -0
  42. package/es/tree-select-panel/TreeSelectPanel.mjs +213 -0
  43. package/es/tree-select-panel/index.css +1 -0
  44. package/es/tree-select-panel/index.d.ts +134 -0
  45. package/es/tree-select-panel/index.less +107 -0
  46. package/es/tree-select-panel/index.mjs +8 -0
  47. package/es/tree-select-panel/style/index.mjs +23 -0
  48. package/es/tree-select-panel/style/less.mjs +23 -0
  49. package/es/uploader/Uploader.d.ts +6 -1
  50. package/es/uploader/Uploader.mjs +80 -19
  51. package/es/uploader/index.css +1 -1
  52. package/es/uploader/index.d.ts +6 -2
  53. package/es/uploader/index.less +4 -0
  54. package/es/uploader/style/index.mjs +3 -0
  55. package/es/uploader/style/less.mjs +3 -0
  56. package/es/uploader/types.d.ts +2 -1
  57. package/lib/action-sheet/ActionSheet.d.ts +4 -0
  58. package/lib/action-sheet/ActionSheet.js +4 -1
  59. package/lib/action-sheet/index.css +1 -1
  60. package/lib/action-sheet/index.d.ts +3 -0
  61. package/lib/action-sheet/index.less +4 -0
  62. package/lib/blue-mark/BlueMarkHeader.d.ts +13 -0
  63. package/lib/blue-mark/BlueMarkHeader.js +2 -0
  64. package/lib/blue-mark/CollapseToggle.d.ts +13 -0
  65. package/lib/blue-mark/CollapseToggle.js +5 -1
  66. package/lib/blue-mark/index.d.ts +18 -0
  67. package/lib/checkbox-panel/CheckboxPanel.d.ts +41 -1
  68. package/lib/checkbox-panel/CheckboxPanel.js +86 -24
  69. package/lib/checkbox-panel/index.css +1 -1
  70. package/lib/checkbox-panel/index.d.ts +29 -1
  71. package/lib/checkbox-panel/index.less +82 -1
  72. package/lib/index.css +1 -1
  73. package/lib/index.d.ts +2 -1
  74. package/lib/index.js +4 -1
  75. package/lib/index.less +1 -0
  76. package/lib/locale/lang/en-US.d.ts +9 -0
  77. package/lib/locale/lang/en-US.js +9 -0
  78. package/lib/locale/lang/zh-CN.d.ts +9 -0
  79. package/lib/locale/lang/zh-CN.js +9 -0
  80. package/lib/material-action-bar/MaterialActionBar.js +3 -1
  81. package/lib/material-action-bar/index.css +1 -1
  82. package/lib/material-action-bar/index.less +1 -1
  83. package/lib/material-add/index.css +1 -1
  84. package/lib/notice-bar/index.css +1 -1
  85. package/lib/notice-bar/index.less +13 -0
  86. package/lib/tabs/Tabs.js +3 -2
  87. package/lib/tabs/index.css +1 -1
  88. package/lib/tabs/index.less +15 -5
  89. package/lib/tabs/var.less +1 -0
  90. package/lib/title-bar/TitleBar.d.ts +15 -1
  91. package/lib/title-bar/TitleBar.js +2 -0
  92. package/lib/title-bar/index.css +1 -1
  93. package/lib/title-bar/index.d.ts +10 -1
  94. package/lib/title-bar/index.less +6 -1
  95. package/lib/title-bar/var.less +2 -1
  96. package/lib/tree-select/TreeSelect.d.ts +3 -0
  97. package/lib/tree-select/TreeSelect.js +18 -2
  98. package/lib/tree-select/index.d.ts +2 -0
  99. package/lib/tree-select-panel/TreeSelectPanel.d.ts +181 -0
  100. package/lib/tree-select-panel/TreeSelectPanel.js +232 -0
  101. package/lib/tree-select-panel/index.css +1 -0
  102. package/lib/tree-select-panel/index.d.ts +134 -0
  103. package/lib/tree-select-panel/index.js +37 -0
  104. package/lib/tree-select-panel/index.less +107 -0
  105. package/lib/tree-select-panel/style/index.js +23 -0
  106. package/lib/tree-select-panel/style/less.js +23 -0
  107. package/lib/uploader/Uploader.d.ts +6 -1
  108. package/lib/uploader/Uploader.js +79 -18
  109. package/lib/uploader/index.css +1 -1
  110. package/lib/uploader/index.d.ts +6 -2
  111. package/lib/uploader/index.less +4 -0
  112. package/lib/uploader/style/index.js +3 -0
  113. package/lib/uploader/style/less.js +3 -0
  114. package/lib/uploader/types.d.ts +2 -1
  115. package/lib/vant.cjs.js +1663 -1300
  116. package/lib/vant.es.js +1663 -1300
  117. package/lib/vant.js +1663 -1300
  118. package/lib/vant.min.js +1 -1
  119. package/lib/web-types.json +1 -1
  120. package/package.json +1 -1
  121. package/skills/use-persagy-vant/references/component-catalog.md +1 -1
@@ -44,6 +44,7 @@ const blueMarkHeaderProps = {
44
44
  required: Boolean,
45
45
  actionText: String,
46
46
  expandable: Boolean,
47
+ showExpandIcon: import_utils.truthProp,
47
48
  modelValue: Boolean,
48
49
  expandText: String,
49
50
  collapseText: String
@@ -105,6 +106,7 @@ var stdin_default = (0, import_vue.defineComponent)({
105
106
  "modelValue": props.modelValue,
106
107
  "expandText": props.expandText,
107
108
  "collapseText": props.collapseText,
109
+ "showIcon": props.showExpandIcon,
108
110
  "onUpdate:modelValue": onChange
109
111
  }, null)]);
110
112
  };
@@ -2,6 +2,10 @@ import { type ExtractPropTypes } from 'vue';
2
2
  declare const collapseToggleProps: {
3
3
  modelValue: BooleanConstructor;
4
4
  divider: BooleanConstructor;
5
+ showIcon: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
5
9
  expandText: {
6
10
  type: import("vue").PropType<string>;
7
11
  default: string;
@@ -15,6 +19,10 @@ export declare type CollapseToggleProps = ExtractPropTypes<typeof collapseToggle
15
19
  declare const _default: import("vue").DefineComponent<{
16
20
  modelValue: BooleanConstructor;
17
21
  divider: BooleanConstructor;
22
+ showIcon: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
18
26
  expandText: {
19
27
  type: import("vue").PropType<string>;
20
28
  default: string;
@@ -26,6 +34,10 @@ declare const _default: import("vue").DefineComponent<{
26
34
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
27
35
  modelValue: BooleanConstructor;
28
36
  divider: BooleanConstructor;
37
+ showIcon: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
29
41
  expandText: {
30
42
  type: import("vue").PropType<string>;
31
43
  default: string;
@@ -38,6 +50,7 @@ declare const _default: import("vue").DefineComponent<{
38
50
  onChange?: ((...args: any[]) => any) | undefined;
39
51
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
40
52
  }, {
53
+ showIcon: boolean;
41
54
  modelValue: boolean;
42
55
  divider: boolean;
43
56
  expandText: string;
@@ -28,6 +28,10 @@ const [name, bem] = (0, import_utils.createNamespace)("collapse-toggle");
28
28
  const collapseToggleProps = {
29
29
  modelValue: Boolean,
30
30
  divider: Boolean,
31
+ showIcon: {
32
+ type: Boolean,
33
+ default: true
34
+ },
31
35
  expandText: (0, import_utils.makeStringProp)("\u5C55\u5F00"),
32
36
  collapseText: (0, import_utils.makeStringProp)("\u6536\u8D77")
33
37
  };
@@ -59,7 +63,7 @@ var stdin_default = (0, import_vue.defineComponent)({
59
63
  }, [(0, import_vue.createVNode)("span", null, [((_a = slots.default) == null ? void 0 : _a.call(slots, {
60
64
  expanded,
61
65
  text
62
- })) || text]), (0, import_vue.createVNode)(import_icon.Icon, {
66
+ })) || text]), props.showIcon && (0, import_vue.createVNode)(import_icon.Icon, {
63
67
  "name": "arrow-down",
64
68
  "class": bem("icon")
65
69
  }, null)]);
@@ -37,6 +37,10 @@ export declare const BlueMarkHeader: import("../utils").WithInstall<import("vue"
37
37
  required: BooleanConstructor;
38
38
  actionText: StringConstructor;
39
39
  expandable: BooleanConstructor;
40
+ showExpandIcon: {
41
+ type: BooleanConstructor;
42
+ default: true;
43
+ };
40
44
  modelValue: BooleanConstructor;
41
45
  expandText: StringConstructor;
42
46
  collapseText: StringConstructor;
@@ -49,6 +53,10 @@ export declare const BlueMarkHeader: import("../utils").WithInstall<import("vue"
49
53
  required: BooleanConstructor;
50
54
  actionText: StringConstructor;
51
55
  expandable: BooleanConstructor;
56
+ showExpandIcon: {
57
+ type: BooleanConstructor;
58
+ default: true;
59
+ };
52
60
  modelValue: BooleanConstructor;
53
61
  expandText: StringConstructor;
54
62
  collapseText: StringConstructor;
@@ -61,10 +69,15 @@ export declare const BlueMarkHeader: import("../utils").WithInstall<import("vue"
61
69
  size: import("./BlueMark").BlueMarkSize;
62
70
  modelValue: boolean;
63
71
  expandable: boolean;
72
+ showExpandIcon: boolean;
64
73
  }>>;
65
74
  export declare const CollapseToggle: import("../utils").WithInstall<import("vue").DefineComponent<{
66
75
  modelValue: BooleanConstructor;
67
76
  divider: BooleanConstructor;
77
+ showIcon: {
78
+ type: BooleanConstructor;
79
+ default: boolean;
80
+ };
68
81
  expandText: {
69
82
  type: import("vue").PropType<string>;
70
83
  default: string;
@@ -76,6 +89,10 @@ export declare const CollapseToggle: import("../utils").WithInstall<import("vue"
76
89
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
77
90
  modelValue: BooleanConstructor;
78
91
  divider: BooleanConstructor;
92
+ showIcon: {
93
+ type: BooleanConstructor;
94
+ default: boolean;
95
+ };
79
96
  expandText: {
80
97
  type: import("vue").PropType<string>;
81
98
  default: string;
@@ -88,6 +105,7 @@ export declare const CollapseToggle: import("../utils").WithInstall<import("vue"
88
105
  onChange?: ((...args: any[]) => any) | undefined;
89
106
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
90
107
  }, {
108
+ showIcon: boolean;
91
109
  modelValue: boolean;
92
110
  divider: boolean;
93
111
  expandText: string;
@@ -35,6 +35,18 @@ declare const checkboxPanelProps: {
35
35
  type: PropType<string>;
36
36
  default: string;
37
37
  };
38
+ selectedText: {
39
+ type: PropType<string>;
40
+ default: string;
41
+ };
42
+ collapseSelectedText: {
43
+ type: PropType<string>;
44
+ default: string;
45
+ };
46
+ clearSelectedText: {
47
+ type: PropType<string>;
48
+ default: string;
49
+ };
38
50
  };
39
51
  export declare type CheckboxPanelProps = ExtractPropTypes<typeof checkboxPanelProps>;
40
52
  declare const _default: import("vue").DefineComponent<{
@@ -68,7 +80,19 @@ declare const _default: import("vue").DefineComponent<{
68
80
  type: PropType<string>;
69
81
  default: string;
70
82
  };
71
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:modelValue" | "load" | "update:show" | "confirm" | "filter" | "update:error" | "update:loading")[], "search" | "filter" | "update:modelValue" | "load" | "update:show" | "confirm" | "update:error" | "update:loading", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
83
+ selectedText: {
84
+ type: PropType<string>;
85
+ default: string;
86
+ };
87
+ collapseSelectedText: {
88
+ type: PropType<string>;
89
+ default: string;
90
+ };
91
+ clearSelectedText: {
92
+ type: PropType<string>;
93
+ default: string;
94
+ };
95
+ }, () => 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<ExtractPropTypes<{
72
96
  show: BooleanConstructor;
73
97
  title: StringConstructor;
74
98
  options: {
@@ -99,6 +123,18 @@ declare const _default: import("vue").DefineComponent<{
99
123
  type: PropType<string>;
100
124
  default: string;
101
125
  };
126
+ selectedText: {
127
+ type: PropType<string>;
128
+ default: string;
129
+ };
130
+ collapseSelectedText: {
131
+ type: PropType<string>;
132
+ default: string;
133
+ };
134
+ clearSelectedText: {
135
+ type: PropType<string>;
136
+ default: string;
137
+ };
102
138
  }>> & {
103
139
  onLoad?: ((...args: any[]) => any) | undefined;
104
140
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -108,6 +144,7 @@ declare const _default: import("vue").DefineComponent<{
108
144
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
109
145
  onSearch?: ((...args: any[]) => any) | undefined;
110
146
  onFilter?: ((...args: any[]) => any) | undefined;
147
+ "onShow-selected"?: ((...args: any[]) => any) | undefined;
111
148
  }, {
112
149
  show: boolean;
113
150
  error: boolean;
@@ -121,5 +158,8 @@ declare const _default: import("vue").DefineComponent<{
121
158
  lazy: boolean;
122
159
  selectAllText: string;
123
160
  cancelSelectAllText: string;
161
+ selectedText: string;
162
+ collapseSelectedText: string;
163
+ clearSelectedText: string;
124
164
  }>;
125
165
  export default _default;
@@ -53,18 +53,23 @@ const checkboxPanelProps = {
53
53
  errorText: String,
54
54
  confirmText: (0, import_utils.makeStringProp)("\u786E\u5B9A"),
55
55
  selectAllText: (0, import_utils.makeStringProp)("\u5168\u9009"),
56
- 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")
57
60
  };
58
61
  var stdin_default = (0, import_vue.defineComponent)({
59
62
  name,
60
63
  props: checkboxPanelProps,
61
- emits: ["update:show", "update:modelValue", "update:loading", "update:error", "confirm", "search", "filter", "load"],
64
+ emits: ["update:show", "update:modelValue", "update:loading", "update:error", "confirm", "search", "filter", "load", "show-selected"],
62
65
  setup(props, {
63
66
  emit,
64
67
  slots
65
68
  }) {
66
69
  const keyword = (0, import_vue.ref)("");
70
+ const expandedSelected = (0, import_vue.ref)(false);
67
71
  const selectedValues = (0, import_vue.computed)(() => props.modelValue || []);
72
+ const selectedOptions = (0, import_vue.computed)(() => props.options.filter((option) => selectedValues.value.includes(option.value)));
68
73
  const filteredOptions = (0, import_vue.computed)(() => {
69
74
  const query = keyword.value.trim().toLocaleLowerCase();
70
75
  if (!query)
@@ -74,23 +79,51 @@ var stdin_default = (0, import_vue.defineComponent)({
74
79
  const selectableOptions = (0, import_vue.computed)(() => filteredOptions.value.filter((option) => !option.disabled));
75
80
  const isAllSelected = (0, import_vue.computed)(() => selectableOptions.value.length > 0 && selectableOptions.value.every((option) => selectedValues.value.includes(option.value)));
76
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
+ };
77
87
  const toggleOption = (option) => {
78
88
  if (option.disabled)
79
89
  return;
80
90
  const values = [...selectedValues.value];
81
91
  const index = values.indexOf(option.value);
82
92
  index === -1 ? values.push(option.value) : values.splice(index, 1);
83
- emit("update:modelValue", values);
93
+ updateSelectedValues(values);
84
94
  };
85
95
  const toggleAll = () => {
86
96
  const selectableValues = selectableOptions.value.map((option) => option.value);
87
97
  const values = isAllSelected.value ? selectedValues.value.filter((value) => !selectableValues.includes(value)) : [.../* @__PURE__ */ new Set([...selectedValues.value, ...selectableValues])];
88
- emit("update:modelValue", values);
98
+ updateSelectedValues(values);
89
99
  };
100
+ const removeSelected = (option) => {
101
+ updateSelectedValues(selectedValues.value.filter((value) => value !== option.value));
102
+ };
103
+ const clearSelected = () => updateSelectedValues([]);
90
104
  const confirm = () => {
91
105
  emit("confirm", selectedValues.value);
92
106
  close();
93
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
+ };
94
127
  const renderOptionLabel = (label) => {
95
128
  const query = keyword.value.trim();
96
129
  if (!query)
@@ -127,6 +160,10 @@ var stdin_default = (0, import_vue.defineComponent)({
127
160
  }))]
128
161
  });
129
162
  };
163
+ (0, import_vue.watch)(selectedValues, (values) => {
164
+ if (!values.length)
165
+ expandedSelected.value = false;
166
+ });
130
167
  return () => (0, import_vue.createVNode)(import_action_sheet.ActionSheet, {
131
168
  "show": props.show,
132
169
  "class": bem(),
@@ -146,25 +183,7 @@ var stdin_default = (0, import_vue.defineComponent)({
146
183
  "size": "22",
147
184
  "onClick": close
148
185
  }, null),
149
- right: () => {
150
- if (slots.filter)
151
- return slots.filter();
152
- if (!props.filterable)
153
- return;
154
- return (0, import_vue.createVNode)("button", {
155
- "type": "button",
156
- "class": bem("filter"),
157
- "aria-label": "\u7B5B\u9009",
158
- "onClick": () => emit("filter")
159
- }, [(0, import_vue.createVNode)(import_badge.Badge, {
160
- "dot": props.filterActive
161
- }, {
162
- default: () => [(0, import_vue.createVNode)(import_icon.Icon, {
163
- "name": "filter-o",
164
- "size": "22"
165
- }, null)]
166
- })]);
167
- }
186
+ right: renderFilterAction
168
187
  })]), props.searchable && (0, import_vue.createVNode)(import_search.Search, {
169
188
  "modelValue": keyword.value,
170
189
  "class": bem("search"),
@@ -195,11 +214,54 @@ var stdin_default = (0, import_vue.defineComponent)({
195
214
  "class": bem("footer")
196
215
  }, [(0, import_vue.createVNode)(import_bottom_action_bar.BottomActionBar, {
197
216
  "fixed": false,
217
+ "moreIcon": "passed",
218
+ "moreText": expandedSelected.value ? props.collapseSelectedText : props.selectedText,
219
+ "moreBadge": selectedValues.value.length,
220
+ "moreBadgeMax": 99,
198
221
  "secondaryText": isAllSelected.value ? props.cancelSelectAllText : props.selectAllText,
222
+ "secondaryDisabled": !selectableOptions.value.length,
199
223
  "confirmText": props.confirmText,
224
+ "moreDisabled": !selectedValues.value.length,
225
+ "confirmDisabled": !selectedValues.value.length,
200
226
  "onSecondary": toggleAll,
227
+ "onMore": () => {
228
+ expandedSelected.value = !expandedSelected.value;
229
+ emit("show-selected", selectedValues.value);
230
+ },
201
231
  "onConfirm": confirm
202
- }, null)])])]
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
255
+ }, {
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
+ }))])])])])]
203
265
  });
204
266
  }
205
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__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{flex:none}.van-checkbox-panel .van-cell{min-height:44px}.van-checkbox-panel .van-checkbox{margin:0}
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}
@@ -29,7 +29,19 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
29
29
  type: import("vue").PropType<string>;
30
30
  default: string;
31
31
  };
32
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("search" | "update:modelValue" | "load" | "update:show" | "confirm" | "filter" | "update:error" | "update:loading")[], "search" | "filter" | "update:modelValue" | "load" | "update:show" | "confirm" | "update:error" | "update:loading", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
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<{
33
45
  show: BooleanConstructor;
34
46
  title: StringConstructor;
35
47
  options: {
@@ -60,6 +72,18 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
60
72
  type: import("vue").PropType<string>;
61
73
  default: string;
62
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
+ };
63
87
  }>> & {
64
88
  onLoad?: ((...args: any[]) => any) | undefined;
65
89
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -69,6 +93,7 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
69
93
  "onUpdate:loading"?: ((...args: any[]) => any) | undefined;
70
94
  onSearch?: ((...args: any[]) => any) | undefined;
71
95
  onFilter?: ((...args: any[]) => any) | undefined;
96
+ "onShow-selected"?: ((...args: any[]) => any) | undefined;
72
97
  }, {
73
98
  show: boolean;
74
99
  error: boolean;
@@ -82,6 +107,9 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
82
107
  lazy: boolean;
83
108
  selectAllText: string;
84
109
  cancelSelectAllText: string;
110
+ selectedText: string;
111
+ collapseSelectedText: string;
112
+ clearSelectedText: string;
85
113
  }>>;
86
114
  export default CheckboxPanel;
87
115
  export type { CheckboxPanelProps, CheckboxPanelOption } from './CheckboxPanel';
@@ -26,7 +26,88 @@
26
26
  &__match { color: var(--van-primary-color); }
27
27
  &__body { flex: 1; min-height: 0; padding: 0 var(--van-padding-md); overflow-y: auto; }
28
28
  &__card { overflow: hidden; background: var(--van-white); border-radius: var(--van-border-radius-lg); }
29
- &__footer { flex: none; }
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
+ }
30
111
  .van-cell { min-height: 44px; }
31
112
  .van-checkbox { margin: 0; }
32
113
  }