persagy-vant 0.0.39 → 0.0.41
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/cell/Cell.mjs +21 -11
- package/es/cell/index.css +1 -1
- package/es/cell/index.less +26 -2
- package/es/checkbox-panel/CheckboxPanel.d.ts +46 -1
- package/es/checkbox-panel/CheckboxPanel.mjs +121 -35
- package/es/checkbox-panel/index.css +1 -1
- package/es/checkbox-panel/index.d.ts +35 -1
- package/es/checkbox-panel/index.less +8 -2
- package/es/checkbox-panel/style/index.mjs +5 -0
- package/es/checkbox-panel/style/less.mjs +5 -0
- package/es/field/Field.d.ts +18 -1
- package/es/field/Field.mjs +21 -2
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +13 -1
- package/es/field/index.less +15 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -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/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 +9 -5
- 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 +4 -2
- 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.d.ts +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.d.ts +3 -3
- package/es/material-display-bar/index.less +2 -1
- package/es/material-display-bar/var.less +3 -2
- package/es/stepper/Stepper.d.ts +1 -1
- package/es/stepper/index.css +1 -1
- package/es/stepper/index.less +19 -0
- package/es/title-bar/TitleBar.d.ts +30 -0
- package/es/title-bar/TitleBar.mjs +7 -1
- package/es/title-bar/index.css +1 -1
- package/es/title-bar/index.d.ts +21 -0
- package/es/title-bar/index.less +4 -2
- package/es/uploader/Uploader.d.ts +4 -0
- package/es/uploader/Uploader.mjs +3 -2
- package/es/uploader/index.d.ts +3 -0
- package/lib/cell/Cell.js +21 -11
- package/lib/cell/index.css +1 -1
- package/lib/cell/index.less +26 -2
- package/lib/checkbox-panel/CheckboxPanel.d.ts +46 -1
- package/lib/checkbox-panel/CheckboxPanel.js +120 -34
- package/lib/checkbox-panel/index.css +1 -1
- package/lib/checkbox-panel/index.d.ts +35 -1
- package/lib/checkbox-panel/index.less +8 -2
- package/lib/checkbox-panel/style/index.js +5 -0
- package/lib/checkbox-panel/style/less.js +5 -0
- package/lib/field/Field.d.ts +18 -1
- package/lib/field/Field.js +21 -2
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +13 -1
- package/lib/field/index.less +15 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.less +5 -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/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 +8 -4
- 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 +4 -2
- 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.d.ts +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.d.ts +3 -3
- package/lib/material-display-bar/index.less +2 -1
- package/lib/material-display-bar/var.less +3 -2
- package/lib/stepper/Stepper.d.ts +1 -1
- package/lib/stepper/index.css +1 -1
- package/lib/stepper/index.less +19 -0
- package/lib/title-bar/TitleBar.d.ts +30 -0
- package/lib/title-bar/TitleBar.js +7 -1
- package/lib/title-bar/index.css +1 -1
- package/lib/title-bar/index.d.ts +21 -0
- package/lib/title-bar/index.less +4 -2
- package/lib/uploader/Uploader.d.ts +4 -0
- package/lib/uploader/Uploader.js +2 -1
- package/lib/uploader/index.d.ts +3 -0
- package/lib/vant.cjs.js +924 -796
- package/lib/vant.es.js +925 -797
- package/lib/vant.js +924 -796
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/skills/use-persagy-vant/SKILL.md +7 -6
- package/skills/use-persagy-vant/references/component-catalog.md +4 -4
- package/skills/use-persagy-vant/references/component-variant-selection.md +39 -0
- package/skills/use-persagy-vant/references/design-interaction-baseline.md +1 -0
- package/skills/use-persagy-vant/references/element-component-matching.md +89 -0
- package/skills/use-persagy-vant/references/page-recipes.md +1 -0
- package/skills/use-persagy-vant/references/public-style-system.md +6 -0
package/lib/cell/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background-color: var(--van-background-color-light);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: 2px;--van-cell-title-value-gap: var(--van-padding-xs);--van-cell-description-color: var(--van-text-color-2);--van-cell-description-font-size: var(--van-font-size-sm);--van-cell-description-line-height: var(--van-line-height-sm);--van-cell-description-margin-top: 2px;--van-cell-value-color: var(--van-text-color-2);--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-description-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: 16px;--van-cell-blue-mark-width: 2px}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background-color)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell-error-border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-field-input-error-text-color);transform:scaleY(.5)}.van-cell-error-border:last-child:after{display:inline-block}.van-cell__label{display:flex;align-items:center;margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__label--clickable{color:var(--van-primary-color);font-weight:var(--van-font-weight-bold);cursor:pointer}.van-cell__label-icon{flex:none;width:12px;height:12px;margin-right:2px;color:inherit;font-size:12px;line-height:12px}.van-cell__description{margin-top:var(--van-cell-description-margin-top);color:var(--van-cell-description-color);font-size:var(--van-cell-description-font-size);line-height:var(--van-cell-description-line-height)}.van-cell__description--clickable{color:var(--van-primary-color);cursor:pointer}.van-cell__multi-line-notes{margin-top:var(--van-padding-base);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__multi-line-note+.van-cell__multi-line-note{margin-top:2px}.van-cell__title{flex:1;min-width:0}.van-cell__title-row{display:flex;align-items:center;min-width:0}.van-cell__title-row--collapsible{cursor:pointer}.van-cell__title-collapse-icon{flex:none;
|
|
1
|
+
:root{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background-color: var(--van-background-color-light);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: 2px;--van-cell-title-value-gap: var(--van-padding-xs);--van-cell-description-color: var(--van-text-color-2);--van-cell-description-font-size: var(--van-font-size-sm);--van-cell-description-line-height: var(--van-line-height-sm);--van-cell-description-margin-top: 2px;--van-cell-value-color: var(--van-text-color-2);--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-description-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: 16px;--van-cell-blue-mark-width: 2px}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background-color)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell-error-border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-field-input-error-text-color);transform:scaleY(.5)}.van-cell-error-border:last-child:after{display:inline-block}.van-cell__label{display:flex;align-items:center;margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__label--clickable{color:var(--van-primary-color);font-weight:var(--van-font-weight-bold);cursor:pointer}.van-cell__label-icon{flex:none;width:12px;height:12px;margin-right:2px;color:inherit;font-size:12px;line-height:12px}.van-cell__description{margin-top:var(--van-cell-description-margin-top);color:var(--van-cell-description-color);font-size:var(--van-cell-description-font-size);line-height:var(--van-cell-description-line-height)}.van-cell__description--clickable{color:var(--van-primary-color);cursor:pointer}.van-cell__multi-line-notes{margin-top:var(--van-padding-base);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__multi-line-note+.van-cell__multi-line-note{margin-top:2px}.van-cell__title{flex:1;min-width:0}.van-cell__title-row{display:flex;align-items:center;min-width:0}.van-cell__title-row--collapsible{cursor:pointer}.van-cell__title-collapse-action,.van-cell__right-icon-action{align-self:flex-start;display:flex;flex:none;height:var(--van-cell-line-height);align-items:center}.van-cell__title-collapse-action{width:var(--van-cell-icon-size);margin-right:var(--van-padding-base);color:var(--van-text-color-2)}.van-cell__title-collapse-icon{width:var(--van-cell-icon-size);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height);transition:transform var(--van-animation-duration-fast)}.van-cell__title-collapse-icon--collapsed{transform:rotate(-90deg)}.van-cell__value{flex:none;min-width:0;margin-left:var(--van-cell-title-value-gap);position:relative;overflow:hidden;color:var(--van-cell-value-color);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__value--alone{margin-left:0;color:var(--van-text-color);text-align:left}.van-cell__left-icon,.van-cell__right-icon,.van-cell__left-select,.van-cell__right-select,.van-cell__title-icon{flex:none;height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height);display:flex!important;align-items:center;justify-content:center}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{color:var(--van-cell-right-icon-color)}.van-cell__right-icon-action{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--multi-line-notes{align-items:flex-start}.van-cell--multi-line-notes .van-cell__left-select,.van-cell--multi-line-notes .van-cell__right-select{align-self:flex-start}.van-cell__left-select{display:flex;flex:none;align-items:center;align-self:center;margin-right:var(--van-padding-base)}.van-cell__right-select{display:flex;flex:none;align-items:center;align-self:center;margin-left:var(--van-padding-base)}.van-cell__left-avatar,.van-cell__right-avatar{flex:none;width:var(--van-cell-line-height);height:var(--van-cell-line-height);-o-object-fit:cover;object-fit:cover;border:var(--van-border-width-base) solid var(--van-gray-1);border-radius:var(--van-border-radius-md)}.van-cell__left-avatar{margin-right:var(--van-padding-base)}.van-cell__right-avatar{margin-left:var(--van-padding-base)}.van-cell__blue-mark{flex:none;align-self:center;width:var(--van-cell-blue-mark-width);height:var(--van-font-size-sm);margin-right:var(--van-padding-base);background:var(--van-primary-color)}.van-cell__tags{display:flex;flex:none;gap:var(--van-padding-base);margin-left:var(--van-padding-base)}.van-cell__tag{padding:0 var(--van-padding-base);color:var(--van-text-color);font-size:var(--van-font-size-sm);line-height:var(--van-line-height-sm);background:var(--van-gray-2);border-radius:var(--van-border-radius-sm)}.van-cell__wrap-tags{display:flex;flex-wrap:wrap;gap:var(--van-padding-base);margin-top:var(--van-padding-base)}.van-cell__title-icon{margin-left:var(--van-padding-base);color:var(--van-text-color-2)}.van-cell__title-icon--clickable{display:inline-flex;align-items:center;padding:0;color:inherit;line-height:inherit;background:transparent;border:0;cursor:pointer}.van-cell__title-tag{display:flex;flex:none;margin-left:var(--van-padding-base)}.van-cell__note{align-self:flex-start;flex:none;margin-left:var(--van-padding-base);color:var(--van-text-color-2);font-size:var(--van-font-size-md);line-height:var(--van-cell-line-height);white-space:nowrap}.van-cell__note--bold{font-weight:var(--van-font-weight-bold)}.van-cell__note--clickable{padding:0;color:var(--van-primary-color);font-family:inherit;font-size:inherit;line-height:inherit;background:transparent;border:0;cursor:pointer}.van-cell__badge{display:flex;flex:none;align-items:center;align-self:center;margin-left:var(--van-padding-base)}.van-cell__badge>.van-badge{position:static;transform:none}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size);margin-top:var(--van-padding-base)}.van-cell--large .van-cell__description{font-size:var(--van-cell-large-description-font-size);margin-top:var(--van-padding-base)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}.van-cell--title-bold .van-cell__title{font-weight:var(--van-font-weight-bold)}
|
package/lib/cell/index.less
CHANGED
|
@@ -121,12 +121,23 @@
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
&__title-collapse-
|
|
124
|
+
&__title-collapse-action,
|
|
125
|
+
&__right-icon-action {
|
|
126
|
+
align-self: flex-start;
|
|
127
|
+
display: flex;
|
|
125
128
|
flex: none;
|
|
126
|
-
width: var(--van-cell-icon-size);
|
|
127
129
|
height: var(--van-cell-line-height);
|
|
130
|
+
align-items: center;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&__title-collapse-action {
|
|
134
|
+
width: var(--van-cell-icon-size);
|
|
128
135
|
margin-right: var(--van-padding-base);
|
|
129
136
|
color: var(--van-text-color-2);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&__title-collapse-icon {
|
|
140
|
+
width: var(--van-cell-icon-size);
|
|
130
141
|
font-size: var(--van-cell-icon-size);
|
|
131
142
|
line-height: var(--van-cell-line-height);
|
|
132
143
|
transition: transform var(--van-animation-duration-fast);
|
|
@@ -173,10 +184,23 @@
|
|
|
173
184
|
}
|
|
174
185
|
|
|
175
186
|
&__right-icon {
|
|
187
|
+
color: var(--van-cell-right-icon-color);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&__right-icon-action {
|
|
176
191
|
margin-left: var(--van-padding-base);
|
|
177
192
|
color: var(--van-cell-right-icon-color);
|
|
178
193
|
}
|
|
179
194
|
|
|
195
|
+
&--multi-line-notes {
|
|
196
|
+
align-items: flex-start;
|
|
197
|
+
|
|
198
|
+
.van-cell__left-select,
|
|
199
|
+
.van-cell__right-select {
|
|
200
|
+
align-self: flex-start;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
180
204
|
&__left-select {
|
|
181
205
|
display: flex;
|
|
182
206
|
flex: none;
|
|
@@ -12,6 +12,17 @@ declare const checkboxPanelProps: {
|
|
|
12
12
|
default: () => never[];
|
|
13
13
|
};
|
|
14
14
|
modelValue: PropType<string[]>;
|
|
15
|
+
searchable: BooleanConstructor;
|
|
16
|
+
searchPlaceholder: StringConstructor;
|
|
17
|
+
filterable: BooleanConstructor;
|
|
18
|
+
filterActive: BooleanConstructor;
|
|
19
|
+
loading: BooleanConstructor;
|
|
20
|
+
finished: BooleanConstructor;
|
|
21
|
+
error: BooleanConstructor;
|
|
22
|
+
lazy: BooleanConstructor;
|
|
23
|
+
loadingText: StringConstructor;
|
|
24
|
+
finishedText: StringConstructor;
|
|
25
|
+
errorText: StringConstructor;
|
|
15
26
|
confirmText: {
|
|
16
27
|
type: PropType<string>;
|
|
17
28
|
default: string;
|
|
@@ -34,6 +45,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
45
|
default: () => never[];
|
|
35
46
|
};
|
|
36
47
|
modelValue: PropType<string[]>;
|
|
48
|
+
searchable: BooleanConstructor;
|
|
49
|
+
searchPlaceholder: StringConstructor;
|
|
50
|
+
filterable: BooleanConstructor;
|
|
51
|
+
filterActive: BooleanConstructor;
|
|
52
|
+
loading: BooleanConstructor;
|
|
53
|
+
finished: BooleanConstructor;
|
|
54
|
+
error: BooleanConstructor;
|
|
55
|
+
lazy: BooleanConstructor;
|
|
56
|
+
loadingText: StringConstructor;
|
|
57
|
+
finishedText: StringConstructor;
|
|
58
|
+
errorText: StringConstructor;
|
|
37
59
|
confirmText: {
|
|
38
60
|
type: PropType<string>;
|
|
39
61
|
default: string;
|
|
@@ -46,7 +68,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
68
|
type: PropType<string>;
|
|
47
69
|
default: string;
|
|
48
70
|
};
|
|
49
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:show" | "confirm")[], "update:modelValue" | "update:show" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
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<{
|
|
50
72
|
show: BooleanConstructor;
|
|
51
73
|
title: StringConstructor;
|
|
52
74
|
options: {
|
|
@@ -54,6 +76,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
76
|
default: () => never[];
|
|
55
77
|
};
|
|
56
78
|
modelValue: PropType<string[]>;
|
|
79
|
+
searchable: BooleanConstructor;
|
|
80
|
+
searchPlaceholder: StringConstructor;
|
|
81
|
+
filterable: BooleanConstructor;
|
|
82
|
+
filterActive: BooleanConstructor;
|
|
83
|
+
loading: BooleanConstructor;
|
|
84
|
+
finished: BooleanConstructor;
|
|
85
|
+
error: BooleanConstructor;
|
|
86
|
+
lazy: BooleanConstructor;
|
|
87
|
+
loadingText: StringConstructor;
|
|
88
|
+
finishedText: StringConstructor;
|
|
89
|
+
errorText: StringConstructor;
|
|
57
90
|
confirmText: {
|
|
58
91
|
type: PropType<string>;
|
|
59
92
|
default: string;
|
|
@@ -67,13 +100,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
100
|
default: string;
|
|
68
101
|
};
|
|
69
102
|
}>> & {
|
|
103
|
+
onLoad?: ((...args: any[]) => any) | undefined;
|
|
70
104
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
71
105
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
72
106
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
107
|
+
"onUpdate:error"?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
"onUpdate:loading"?: ((...args: any[]) => any) | undefined;
|
|
109
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
onFilter?: ((...args: any[]) => any) | undefined;
|
|
73
111
|
}, {
|
|
74
112
|
show: boolean;
|
|
113
|
+
error: boolean;
|
|
114
|
+
loading: boolean;
|
|
75
115
|
options: CheckboxPanelOption[];
|
|
76
116
|
confirmText: string;
|
|
117
|
+
finished: boolean;
|
|
118
|
+
searchable: boolean;
|
|
119
|
+
filterable: boolean;
|
|
120
|
+
filterActive: boolean;
|
|
121
|
+
lazy: boolean;
|
|
77
122
|
selectAllText: string;
|
|
78
123
|
cancelSelectAllText: string;
|
|
79
124
|
}>;
|
|
@@ -25,16 +25,32 @@ 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
56
|
cancelSelectAllText: (0, import_utils.makeStringProp)("\u53D6\u6D88\u5168\u9009")
|
|
@@ -42,12 +58,20 @@ const checkboxPanelProps = {
|
|
|
42
58
|
var stdin_default = (0, import_vue.defineComponent)({
|
|
43
59
|
name,
|
|
44
60
|
props: checkboxPanelProps,
|
|
45
|
-
emits: ["update:show", "update:modelValue", "confirm"],
|
|
61
|
+
emits: ["update:show", "update:modelValue", "update:loading", "update:error", "confirm", "search", "filter", "load"],
|
|
46
62
|
setup(props, {
|
|
47
|
-
emit
|
|
63
|
+
emit,
|
|
64
|
+
slots
|
|
48
65
|
}) {
|
|
66
|
+
const keyword = (0, import_vue.ref)("");
|
|
49
67
|
const selectedValues = (0, import_vue.computed)(() => props.modelValue || []);
|
|
50
|
-
const
|
|
68
|
+
const filteredOptions = (0, import_vue.computed)(() => {
|
|
69
|
+
const query = keyword.value.trim().toLocaleLowerCase();
|
|
70
|
+
if (!query)
|
|
71
|
+
return props.options;
|
|
72
|
+
return props.options.filter((option) => option.label.toLocaleLowerCase().includes(query));
|
|
73
|
+
});
|
|
74
|
+
const selectableOptions = (0, import_vue.computed)(() => filteredOptions.value.filter((option) => !option.disabled));
|
|
51
75
|
const isAllSelected = (0, import_vue.computed)(() => selectableOptions.value.length > 0 && selectableOptions.value.every((option) => selectedValues.value.includes(option.value)));
|
|
52
76
|
const close = () => emit("update:show", false);
|
|
53
77
|
const toggleOption = (option) => {
|
|
@@ -58,11 +82,51 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
58
82
|
index === -1 ? values.push(option.value) : values.splice(index, 1);
|
|
59
83
|
emit("update:modelValue", values);
|
|
60
84
|
};
|
|
61
|
-
const toggleAll = () =>
|
|
85
|
+
const toggleAll = () => {
|
|
86
|
+
const selectableValues = selectableOptions.value.map((option) => option.value);
|
|
87
|
+
const values = isAllSelected.value ? selectedValues.value.filter((value) => !selectableValues.includes(value)) : [.../* @__PURE__ */ new Set([...selectedValues.value, ...selectableValues])];
|
|
88
|
+
emit("update:modelValue", values);
|
|
89
|
+
};
|
|
62
90
|
const confirm = () => {
|
|
63
91
|
emit("confirm", selectedValues.value);
|
|
64
92
|
close();
|
|
65
93
|
};
|
|
94
|
+
const renderOptionLabel = (label) => {
|
|
95
|
+
const query = keyword.value.trim();
|
|
96
|
+
if (!query)
|
|
97
|
+
return label;
|
|
98
|
+
const normalizedQuery = query.toLocaleLowerCase();
|
|
99
|
+
return label.split(new RegExp(`(${escapeRegExp(query)})`, "ig")).map((part) => part.toLocaleLowerCase() === normalizedQuery ? (0, import_vue.createVNode)("span", {
|
|
100
|
+
"class": bem("match")
|
|
101
|
+
}, [part]) : part);
|
|
102
|
+
};
|
|
103
|
+
const renderOptions = () => {
|
|
104
|
+
if (!filteredOptions.value.length) {
|
|
105
|
+
return (0, import_vue.createVNode)(import_empty.Empty, {
|
|
106
|
+
"imageSize": 60,
|
|
107
|
+
"description": "\u6682\u65E0\u5339\u914D\u9009\u9879"
|
|
108
|
+
}, null);
|
|
109
|
+
}
|
|
110
|
+
return (0, import_vue.createVNode)(import_checkbox_group.CheckboxGroup, {
|
|
111
|
+
"modelValue": selectedValues.value,
|
|
112
|
+
"class": bem("card"),
|
|
113
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value)
|
|
114
|
+
}, {
|
|
115
|
+
default: () => [filteredOptions.value.map((option) => (0, import_vue.createVNode)(import_cell.Cell, {
|
|
116
|
+
"key": option.value,
|
|
117
|
+
"clickable": !option.disabled,
|
|
118
|
+
"title": option.label,
|
|
119
|
+
"onClick": () => toggleOption(option)
|
|
120
|
+
}, {
|
|
121
|
+
title: () => renderOptionLabel(option.label),
|
|
122
|
+
"right-icon": () => (0, import_vue.createVNode)(import_checkbox.Checkbox, {
|
|
123
|
+
"name": option.value,
|
|
124
|
+
"disabled": option.disabled,
|
|
125
|
+
"onClick": (event) => event.stopPropagation()
|
|
126
|
+
}, null)
|
|
127
|
+
}))]
|
|
128
|
+
});
|
|
129
|
+
};
|
|
66
130
|
return () => (0, import_vue.createVNode)(import_action_sheet.ActionSheet, {
|
|
67
131
|
"show": props.show,
|
|
68
132
|
"class": bem(),
|
|
@@ -82,38 +146,60 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
82
146
|
"size": "22",
|
|
83
147
|
"onClick": close
|
|
84
148
|
}, null),
|
|
85
|
-
right: () =>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
+
}
|
|
168
|
+
})]), props.searchable && (0, import_vue.createVNode)(import_search.Search, {
|
|
169
|
+
"modelValue": keyword.value,
|
|
170
|
+
"class": bem("search"),
|
|
171
|
+
"shape": "round",
|
|
172
|
+
"inputAlign": "left",
|
|
173
|
+
"placeholder": props.searchPlaceholder || "\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u8BCD",
|
|
174
|
+
"maxlength": 200,
|
|
175
|
+
"onUpdate:modelValue": (value) => {
|
|
176
|
+
keyword.value = value;
|
|
177
|
+
emit("search", value);
|
|
178
|
+
},
|
|
179
|
+
"onSearch": (value) => emit("search", value)
|
|
180
|
+
}, null), (0, import_vue.createVNode)("div", {
|
|
90
181
|
"class": bem("body")
|
|
91
|
-
}, [(0, import_vue.createVNode)(
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
182
|
+
}, [props.lazy ? (0, import_vue.createVNode)(import_list.List, {
|
|
183
|
+
"loading": props.loading,
|
|
184
|
+
"finished": props.finished,
|
|
185
|
+
"error": props.error,
|
|
186
|
+
"loadingText": props.loadingText,
|
|
187
|
+
"finishedText": props.finishedText,
|
|
188
|
+
"errorText": props.errorText,
|
|
189
|
+
"onUpdate:loading": (value) => emit("update:loading", value),
|
|
190
|
+
"onUpdate:error": (value) => emit("update:error", value),
|
|
191
|
+
"onLoad": () => emit("load")
|
|
95
192
|
}, {
|
|
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", {
|
|
193
|
+
default: () => [renderOptions()]
|
|
194
|
+
}) : renderOptions()]), (0, import_vue.createVNode)("div", {
|
|
109
195
|
"class": bem("footer")
|
|
110
|
-
}, [(0, import_vue.createVNode)(
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
})])])]
|
|
196
|
+
}, [(0, import_vue.createVNode)(import_bottom_action_bar.BottomActionBar, {
|
|
197
|
+
"fixed": false,
|
|
198
|
+
"secondaryText": isAllSelected.value ? props.cancelSelectAllText : props.selectAllText,
|
|
199
|
+
"confirmText": props.confirmText,
|
|
200
|
+
"onSecondary": toggleAll,
|
|
201
|
+
"onConfirm": confirm
|
|
202
|
+
}, null)])])]
|
|
117
203
|
});
|
|
118
204
|
}
|
|
119
205
|
});
|
|
@@ -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-
|
|
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}
|
|
@@ -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,7 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
18
29
|
type: import("vue").PropType<string>;
|
|
19
30
|
default: string;
|
|
20
31
|
};
|
|
21
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:show" | "confirm")[], "update:modelValue" | "update:show" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
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<{
|
|
22
33
|
show: BooleanConstructor;
|
|
23
34
|
title: StringConstructor;
|
|
24
35
|
options: {
|
|
@@ -26,6 +37,17 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
26
37
|
default: () => never[];
|
|
27
38
|
};
|
|
28
39
|
modelValue: import("vue").PropType<string[]>;
|
|
40
|
+
searchable: BooleanConstructor;
|
|
41
|
+
searchPlaceholder: StringConstructor;
|
|
42
|
+
filterable: BooleanConstructor;
|
|
43
|
+
filterActive: BooleanConstructor;
|
|
44
|
+
loading: BooleanConstructor;
|
|
45
|
+
finished: BooleanConstructor;
|
|
46
|
+
error: BooleanConstructor;
|
|
47
|
+
lazy: BooleanConstructor;
|
|
48
|
+
loadingText: StringConstructor;
|
|
49
|
+
finishedText: StringConstructor;
|
|
50
|
+
errorText: StringConstructor;
|
|
29
51
|
confirmText: {
|
|
30
52
|
type: import("vue").PropType<string>;
|
|
31
53
|
default: string;
|
|
@@ -39,13 +61,25 @@ export declare const CheckboxPanel: import("../utils").WithInstall<import("vue")
|
|
|
39
61
|
default: string;
|
|
40
62
|
};
|
|
41
63
|
}>> & {
|
|
64
|
+
onLoad?: ((...args: any[]) => any) | undefined;
|
|
42
65
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
43
66
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
44
67
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
"onUpdate:error"?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
"onUpdate:loading"?: ((...args: any[]) => any) | undefined;
|
|
70
|
+
onSearch?: ((...args: any[]) => any) | undefined;
|
|
71
|
+
onFilter?: ((...args: any[]) => any) | undefined;
|
|
45
72
|
}, {
|
|
46
73
|
show: boolean;
|
|
74
|
+
error: boolean;
|
|
75
|
+
loading: boolean;
|
|
47
76
|
options: import("./CheckboxPanel").CheckboxPanelOption[];
|
|
48
77
|
confirmText: string;
|
|
78
|
+
finished: boolean;
|
|
79
|
+
searchable: boolean;
|
|
80
|
+
filterable: boolean;
|
|
81
|
+
filterActive: boolean;
|
|
82
|
+
lazy: boolean;
|
|
49
83
|
selectAllText: string;
|
|
50
84
|
cancelSelectAllText: string;
|
|
51
85
|
}>>;
|
|
@@ -17,10 +17,16 @@
|
|
|
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 { flex: none;
|
|
23
|
-
&__select-all { color: var(--van-primary-color); font-weight: var(--van-font-weight-bold); font-size: var(--van-font-size-md); }
|
|
29
|
+
&__footer { flex: none; }
|
|
24
30
|
.van-cell { min-height: 44px; }
|
|
25
31
|
.van-checkbox { margin: 0; }
|
|
26
32
|
}
|
|
@@ -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");
|
package/lib/field/Field.d.ts
CHANGED
|
@@ -225,6 +225,11 @@ declare const fieldProps: {
|
|
|
225
225
|
labelClass: PropType<unknown>;
|
|
226
226
|
labelAlign: PropType<FieldTextAlign>;
|
|
227
227
|
labelPosition: PropType<FieldLabelPosition>;
|
|
228
|
+
unit: (NumberConstructor | StringConstructor)[];
|
|
229
|
+
showUnit: {
|
|
230
|
+
type: PropType<boolean | undefined>;
|
|
231
|
+
default: undefined;
|
|
232
|
+
};
|
|
228
233
|
showWordLimit: BooleanConstructor;
|
|
229
234
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
230
235
|
colon: {
|
|
@@ -418,6 +423,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
418
423
|
labelClass: PropType<unknown>;
|
|
419
424
|
labelAlign: PropType<FieldTextAlign>;
|
|
420
425
|
labelPosition: PropType<FieldLabelPosition>;
|
|
426
|
+
unit: (NumberConstructor | StringConstructor)[];
|
|
427
|
+
showUnit: {
|
|
428
|
+
type: PropType<boolean | undefined>;
|
|
429
|
+
default: undefined;
|
|
430
|
+
};
|
|
421
431
|
showWordLimit: BooleanConstructor;
|
|
422
432
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
423
433
|
colon: {
|
|
@@ -428,7 +438,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
428
438
|
type: BooleanConstructor;
|
|
429
439
|
default: boolean;
|
|
430
440
|
};
|
|
431
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "clear" | "focus" | "blur" | "keypress" | "click-input" | "end-validate" | "start-validate" | "click-left-icon" | "click-right-icon")[], "update:modelValue" | "clear" | "focus" | "blur" | "keypress" | "click-input" | "end-validate" | "start-validate" | "click-left-icon" | "click-right-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
441
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click-title-icon" | "update:modelValue" | "clear" | "focus" | "blur" | "keypress" | "click-input" | "end-validate" | "start-validate" | "click-left-icon" | "click-right-icon")[], "click-title-icon" | "update:modelValue" | "clear" | "focus" | "blur" | "keypress" | "click-input" | "end-validate" | "start-validate" | "click-left-icon" | "click-right-icon", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
432
442
|
icon: StringConstructor;
|
|
433
443
|
size: PropType<CellSize>;
|
|
434
444
|
background: StringConstructor;
|
|
@@ -609,6 +619,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
609
619
|
labelClass: PropType<unknown>;
|
|
610
620
|
labelAlign: PropType<FieldTextAlign>;
|
|
611
621
|
labelPosition: PropType<FieldLabelPosition>;
|
|
622
|
+
unit: (NumberConstructor | StringConstructor)[];
|
|
623
|
+
showUnit: {
|
|
624
|
+
type: PropType<boolean | undefined>;
|
|
625
|
+
default: undefined;
|
|
626
|
+
};
|
|
612
627
|
showWordLimit: BooleanConstructor;
|
|
613
628
|
errorMessageAlign: PropType<FieldTextAlign>;
|
|
614
629
|
colon: {
|
|
@@ -623,6 +638,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
623
638
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
624
639
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
625
640
|
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
641
|
+
"onClick-title-icon"?: ((...args: any[]) => any) | undefined;
|
|
626
642
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
627
643
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
628
644
|
"onClick-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -677,6 +693,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
677
693
|
formatTrigger: FieldFormatTrigger;
|
|
678
694
|
error: boolean;
|
|
679
695
|
readonly: boolean;
|
|
696
|
+
showUnit: boolean | undefined;
|
|
680
697
|
showWordLimit: boolean;
|
|
681
698
|
colon: boolean;
|
|
682
699
|
}>;
|
package/lib/field/Field.js
CHANGED
|
@@ -72,6 +72,11 @@ const fieldProps = (0, import_utils.extend)({}, import_Cell.cellSharedProps, fie
|
|
|
72
72
|
labelClass: import_utils.unknownProp,
|
|
73
73
|
labelAlign: String,
|
|
74
74
|
labelPosition: String,
|
|
75
|
+
unit: import_utils.numericProp,
|
|
76
|
+
showUnit: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: void 0
|
|
79
|
+
},
|
|
75
80
|
showWordLimit: Boolean,
|
|
76
81
|
errorMessageAlign: String,
|
|
77
82
|
colon: {
|
|
@@ -86,7 +91,7 @@ const fieldProps = (0, import_utils.extend)({}, import_Cell.cellSharedProps, fie
|
|
|
86
91
|
var stdin_default = (0, import_vue.defineComponent)({
|
|
87
92
|
name,
|
|
88
93
|
props: fieldProps,
|
|
89
|
-
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
|
|
94
|
+
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "click-title-icon", "update:modelValue"],
|
|
90
95
|
setup(props, {
|
|
91
96
|
emit,
|
|
92
97
|
slots
|
|
@@ -419,6 +424,16 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
419
424
|
}, null)]);
|
|
420
425
|
}
|
|
421
426
|
};
|
|
427
|
+
const renderUnit = () => {
|
|
428
|
+
var _a;
|
|
429
|
+
const showUnit = (_a = props.showUnit) != null ? _a : (0, import_utils.isDef)(props.unit);
|
|
430
|
+
if (!showUnit || !(0, import_utils.isDef)(props.unit)) {
|
|
431
|
+
return;
|
|
432
|
+
}
|
|
433
|
+
return (0, import_vue.createVNode)("span", {
|
|
434
|
+
"class": bem("unit")
|
|
435
|
+
}, [props.unit]);
|
|
436
|
+
};
|
|
422
437
|
const renderWordLimit = () => {
|
|
423
438
|
if (props.showWordLimit && props.maxlength) {
|
|
424
439
|
const count = (0, import_utils2.getStringLength)(getModelValue());
|
|
@@ -458,7 +473,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
458
473
|
};
|
|
459
474
|
const renderFieldBody = () => [(0, import_vue.createVNode)("div", {
|
|
460
475
|
"class": bem("body")
|
|
461
|
-
}, [renderInput(), showClear.value && (0, import_vue.createVNode)(import_icon.Icon, {
|
|
476
|
+
}, [renderInput(), renderUnit(), showClear.value && (0, import_vue.createVNode)(import_icon.Icon, {
|
|
462
477
|
"ref": clearIconRef,
|
|
463
478
|
"name": props.clearIcon,
|
|
464
479
|
"class": bem("clear")
|
|
@@ -513,6 +528,10 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
513
528
|
"errorBorder": props.errorBorder,
|
|
514
529
|
"isLink": props.isLink,
|
|
515
530
|
"clickable": props.clickable,
|
|
531
|
+
"titleIcon": props.titleIcon,
|
|
532
|
+
"titleIconClickable": props.titleIconClickable,
|
|
533
|
+
"showTitleIcon": props.showTitleIcon,
|
|
534
|
+
"onClick-title-icon": (event) => emit("click-title-icon", event),
|
|
516
535
|
"titleStyle": labelStyle.value,
|
|
517
536
|
"valueClass": bem("value"),
|
|
518
537
|
"titleClass": [bem("label", [labelAlign, {
|