persagy-vant 0.0.39 → 0.0.40
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/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/material-display-bar/MaterialDisplayBar.d.ts +1 -1
- package/es/material-display-bar/index.d.ts +3 -3
- 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/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/material-display-bar/MaterialDisplayBar.d.ts +1 -1
- package/lib/material-display-bar/index.d.ts +3 -3
- 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 +45 -15
- package/lib/vant.es.js +45 -15
- package/lib/vant.js +45 -15
- 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 +3 -3
- package/skills/use-persagy-vant/references/component-variant-selection.md +39 -0
- package/skills/use-persagy-vant/references/element-component-matching.md +88 -0
package/es/cell/Cell.mjs
CHANGED
|
@@ -263,12 +263,14 @@ var stdin_default = defineComponent({
|
|
|
263
263
|
emit("update:multiLineNotesCollapsed", multiLineNotesCollapsed.value);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
}, [props.showTitleCollapseIcon && _createVNode(
|
|
266
|
+
}, [props.showTitleCollapseIcon && _createVNode("div", {
|
|
267
|
+
"class": bem("title-collapse-action")
|
|
268
|
+
}, [_createVNode(Icon, {
|
|
267
269
|
"name": "trangle-down",
|
|
268
270
|
"class": bem("title-collapse-icon", {
|
|
269
271
|
collapsed: multiLineNotesCollapsed.value
|
|
270
272
|
})
|
|
271
|
-
}, null), slots.title ? slots.title() : _createVNode("span", null, [props.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
273
|
+
}, null)]), slots.title ? slots.title() : _createVNode("span", null, [props.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
272
274
|
}
|
|
273
275
|
};
|
|
274
276
|
const renderValue = () => {
|
|
@@ -508,24 +510,30 @@ var stdin_default = defineComponent({
|
|
|
508
510
|
return;
|
|
509
511
|
}
|
|
510
512
|
if (slots["right-icon"]) {
|
|
511
|
-
return
|
|
513
|
+
return _createVNode("div", {
|
|
514
|
+
"class": bem("right-icon-action")
|
|
515
|
+
}, [slots["right-icon"]()]);
|
|
512
516
|
}
|
|
513
517
|
if (props.rightIcon) {
|
|
514
|
-
return _createVNode(
|
|
518
|
+
return _createVNode("div", {
|
|
519
|
+
"class": bem("right-icon-action")
|
|
520
|
+
}, [_createVNode(Icon, {
|
|
515
521
|
"name": props.rightIcon,
|
|
516
522
|
"class": bem("right-icon")
|
|
517
|
-
}, null);
|
|
523
|
+
}, null)]);
|
|
518
524
|
}
|
|
519
525
|
if (props.isLink) {
|
|
520
526
|
const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
|
|
521
|
-
return _createVNode(
|
|
527
|
+
return _createVNode("div", {
|
|
528
|
+
"class": bem("right-icon-action")
|
|
529
|
+
}, [_createVNode(Icon, {
|
|
522
530
|
"name": name2,
|
|
523
531
|
"class": bem("right-icon")
|
|
524
|
-
}, null);
|
|
532
|
+
}, null)]);
|
|
525
533
|
}
|
|
526
534
|
};
|
|
527
535
|
return () => {
|
|
528
|
-
var _a2, _b2, _c;
|
|
536
|
+
var _a2, _b2, _c, _d;
|
|
529
537
|
const {
|
|
530
538
|
size,
|
|
531
539
|
center,
|
|
@@ -538,14 +546,16 @@ var stdin_default = defineComponent({
|
|
|
538
546
|
} = props;
|
|
539
547
|
const clickable = (_a2 = props.clickable) != null ? _a2 : isLink || rightIcon === "arrow" || hasSelect("left") || hasSelect("right");
|
|
540
548
|
const hasBadge = isVisible(props.showBadge, !!slots.badge || isDef(props.badge));
|
|
541
|
-
const
|
|
549
|
+
const hasMultiLineNotes = isVisible(props.showMultiLineNotes, !!slots["multi-line-notes"] || !!((_b2 = props.multiLineNotes) == null ? void 0 : _b2.length));
|
|
550
|
+
const cellSize = (_c = size != null ? size : config == null ? void 0 : config.cellSize) != null ? _c : "normal";
|
|
542
551
|
const classes = {
|
|
543
552
|
center: center || hasBadge,
|
|
544
553
|
required,
|
|
545
554
|
"title-bold": titleBold,
|
|
546
555
|
clickable,
|
|
547
556
|
borderless: !border,
|
|
548
|
-
"three-line": threeLine
|
|
557
|
+
"three-line": threeLine,
|
|
558
|
+
"multi-line-notes": hasMultiLineNotes
|
|
549
559
|
};
|
|
550
560
|
if (cellSize) {
|
|
551
561
|
classes[cellSize] = !!cellSize;
|
|
@@ -564,7 +574,7 @@ var stdin_default = defineComponent({
|
|
|
564
574
|
"role": clickable ? "button" : void 0,
|
|
565
575
|
"tabindex": clickable ? 0 : void 0,
|
|
566
576
|
"onClick": onClick
|
|
567
|
-
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (
|
|
577
|
+
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (_d = slots.extra) == null ? void 0 : _d.call(slots)]);
|
|
568
578
|
};
|
|
569
579
|
}
|
|
570
580
|
});
|
package/es/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/es/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;
|
package/es/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/es/field/Field.mjs
CHANGED
|
@@ -49,6 +49,11 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
49
49
|
labelClass: unknownProp,
|
|
50
50
|
labelAlign: String,
|
|
51
51
|
labelPosition: String,
|
|
52
|
+
unit: numericProp,
|
|
53
|
+
showUnit: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: void 0
|
|
56
|
+
},
|
|
52
57
|
showWordLimit: Boolean,
|
|
53
58
|
errorMessageAlign: String,
|
|
54
59
|
colon: {
|
|
@@ -63,7 +68,7 @@ const fieldProps = extend({}, cellSharedProps, fieldSharedProps, {
|
|
|
63
68
|
var stdin_default = defineComponent({
|
|
64
69
|
name,
|
|
65
70
|
props: fieldProps,
|
|
66
|
-
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "update:modelValue"],
|
|
71
|
+
emits: ["blur", "focus", "clear", "keypress", "click-input", "end-validate", "start-validate", "click-left-icon", "click-right-icon", "click-title-icon", "update:modelValue"],
|
|
67
72
|
setup(props, {
|
|
68
73
|
emit,
|
|
69
74
|
slots
|
|
@@ -396,6 +401,16 @@ var stdin_default = defineComponent({
|
|
|
396
401
|
}, null)]);
|
|
397
402
|
}
|
|
398
403
|
};
|
|
404
|
+
const renderUnit = () => {
|
|
405
|
+
var _a;
|
|
406
|
+
const showUnit = (_a = props.showUnit) != null ? _a : isDef(props.unit);
|
|
407
|
+
if (!showUnit || !isDef(props.unit)) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
return _createVNode("span", {
|
|
411
|
+
"class": bem("unit")
|
|
412
|
+
}, [props.unit]);
|
|
413
|
+
};
|
|
399
414
|
const renderWordLimit = () => {
|
|
400
415
|
if (props.showWordLimit && props.maxlength) {
|
|
401
416
|
const count = getStringLength(getModelValue());
|
|
@@ -435,7 +450,7 @@ var stdin_default = defineComponent({
|
|
|
435
450
|
};
|
|
436
451
|
const renderFieldBody = () => [_createVNode("div", {
|
|
437
452
|
"class": bem("body")
|
|
438
|
-
}, [renderInput(), showClear.value && _createVNode(Icon, {
|
|
453
|
+
}, [renderInput(), renderUnit(), showClear.value && _createVNode(Icon, {
|
|
439
454
|
"ref": clearIconRef,
|
|
440
455
|
"name": props.clearIcon,
|
|
441
456
|
"class": bem("clear")
|
|
@@ -490,6 +505,10 @@ var stdin_default = defineComponent({
|
|
|
490
505
|
"errorBorder": props.errorBorder,
|
|
491
506
|
"isLink": props.isLink,
|
|
492
507
|
"clickable": props.clickable,
|
|
508
|
+
"titleIcon": props.titleIcon,
|
|
509
|
+
"titleIconClickable": props.titleIconClickable,
|
|
510
|
+
"showTitleIcon": props.showTitleIcon,
|
|
511
|
+
"onClick-title-icon": (event) => emit("click-title-icon", event),
|
|
493
512
|
"titleStyle": labelStyle.value,
|
|
494
513
|
"valueClass": bem("value"),
|
|
495
514
|
"titleClass": [bem("label", [labelAlign, {
|
package/es/field/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-gray-8);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-font-size: var(--van-font-size-lg);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 16px;--van-field-clear-icon-size: 16px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--required{position:relative}.van-field__label--required:before{color:var(--van-field-required-mark-color);content:"*";position:absolute;left:-8px;font-size:14px}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field--label-top{flex-direction:column;align-items:stretch}.van-field--label-top .van-cell__title,.van-field--label-top .van-cell__value{flex:none;width:100%}.van-field--label-top .van-field__label{width:auto;margin-right:0;margin-bottom:var(--van-padding-xs)}.van-field.van-cell--normal{--van-field-input-font-size: var(--van-font-size-md)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);font-size:var(--van-field-input-font-size);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.van-field__control::-moz-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control:-moz-read-only{cursor:default}.van-field__control:read-only{cursor:default}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-moz-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
|
|
1
|
+
:root{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-gray-8);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-font-size: var(--van-font-size-lg);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 16px;--van-field-clear-icon-size: 16px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--required{position:relative}.van-field__label--required:before{color:var(--van-field-required-mark-color);content:"*";position:absolute;left:-8px;font-size:14px}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field--label-top{flex-direction:column;align-items:stretch}.van-field--label-top .van-cell__title,.van-field--label-top .van-cell__value{flex:none;width:100%}.van-field--label-top .van-cell__value{margin-left:0}.van-field--label-top .van-field__label{width:auto;margin-right:0;margin-bottom:var(--van-padding-xs)}.van-field.van-cell--normal{--van-field-input-font-size: var(--van-font-size-md)}.van-field__value{flex:1;min-width:0;overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);font-size:var(--van-field-input-font-size);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.van-field__control::-moz-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control:-moz-read-only{cursor:default}.van-field__control:read-only{cursor:default}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-moz-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__unit,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__unit{margin-left:var(--van-padding-base);color:var(--van-field-input-text-color);font-size:var(--van-field-input-font-size);line-height:inherit;white-space:nowrap}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}
|
package/es/field/index.d.ts
CHANGED
|
@@ -180,6 +180,11 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
180
180
|
labelClass: import("vue").PropType<unknown>;
|
|
181
181
|
labelAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
182
182
|
labelPosition: import("vue").PropType<import("./types").FieldLabelPosition>;
|
|
183
|
+
unit: (NumberConstructor | StringConstructor)[];
|
|
184
|
+
showUnit: {
|
|
185
|
+
type: import("vue").PropType<boolean | undefined>;
|
|
186
|
+
default: undefined;
|
|
187
|
+
};
|
|
183
188
|
showWordLimit: BooleanConstructor;
|
|
184
189
|
errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
185
190
|
colon: {
|
|
@@ -190,7 +195,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
190
195
|
type: BooleanConstructor;
|
|
191
196
|
default: boolean;
|
|
192
197
|
};
|
|
193
|
-
}, () => 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<import("vue").ExtractPropTypes<{
|
|
198
|
+
}, () => 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<import("vue").ExtractPropTypes<{
|
|
194
199
|
icon: StringConstructor;
|
|
195
200
|
size: import("vue").PropType<import("..").CellSize>;
|
|
196
201
|
background: StringConstructor;
|
|
@@ -371,6 +376,11 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
371
376
|
labelClass: import("vue").PropType<unknown>;
|
|
372
377
|
labelAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
373
378
|
labelPosition: import("vue").PropType<import("./types").FieldLabelPosition>;
|
|
379
|
+
unit: (NumberConstructor | StringConstructor)[];
|
|
380
|
+
showUnit: {
|
|
381
|
+
type: import("vue").PropType<boolean | undefined>;
|
|
382
|
+
default: undefined;
|
|
383
|
+
};
|
|
374
384
|
showWordLimit: BooleanConstructor;
|
|
375
385
|
errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
|
|
376
386
|
colon: {
|
|
@@ -385,6 +395,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
385
395
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
386
396
|
onBlur?: ((...args: any[]) => any) | undefined;
|
|
387
397
|
onKeypress?: ((...args: any[]) => any) | undefined;
|
|
398
|
+
"onClick-title-icon"?: ((...args: any[]) => any) | undefined;
|
|
388
399
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
389
400
|
onClear?: ((...args: any[]) => any) | undefined;
|
|
390
401
|
"onClick-input"?: ((...args: any[]) => any) | undefined;
|
|
@@ -439,6 +450,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
|
|
|
439
450
|
formatTrigger: import("./types").FieldFormatTrigger;
|
|
440
451
|
error: boolean;
|
|
441
452
|
readonly: boolean;
|
|
453
|
+
showUnit: boolean | undefined;
|
|
442
454
|
showWordLimit: boolean;
|
|
443
455
|
colon: boolean;
|
|
444
456
|
}>>;
|
package/es/field/index.less
CHANGED
|
@@ -71,6 +71,10 @@
|
|
|
71
71
|
width: 100%;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
.van-cell__value {
|
|
75
|
+
margin-left: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
.van-field__label {
|
|
75
79
|
width: auto;
|
|
76
80
|
margin-right: 0;
|
|
@@ -83,6 +87,8 @@
|
|
|
83
87
|
}
|
|
84
88
|
|
|
85
89
|
&__value {
|
|
90
|
+
flex: 1;
|
|
91
|
+
min-width: 0;
|
|
86
92
|
overflow: visible;
|
|
87
93
|
}
|
|
88
94
|
|
|
@@ -166,6 +172,7 @@
|
|
|
166
172
|
&__clear,
|
|
167
173
|
&__icon,
|
|
168
174
|
&__button,
|
|
175
|
+
&__unit,
|
|
169
176
|
&__right-icon {
|
|
170
177
|
flex-shrink: 0;
|
|
171
178
|
}
|
|
@@ -202,6 +209,14 @@
|
|
|
202
209
|
padding-left: var(--van-padding-xs);
|
|
203
210
|
}
|
|
204
211
|
|
|
212
|
+
&__unit {
|
|
213
|
+
margin-left: var(--van-padding-base);
|
|
214
|
+
color: var(--van-field-input-text-color);
|
|
215
|
+
font-size: var(--van-field-input-font-size);
|
|
216
|
+
line-height: inherit;
|
|
217
|
+
white-space: nowrap;
|
|
218
|
+
}
|
|
219
|
+
|
|
205
220
|
&__error-message {
|
|
206
221
|
color: var(--van-field-error-message-color);
|
|
207
222
|
font-size: var(--van-field-error-message-font-size);
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -109,7 +109,7 @@ import { Uploader } from "./uploader/index.mjs";
|
|
|
109
109
|
import { VideoPreview } from "./video-preview/index.mjs";
|
|
110
110
|
import { WorkOrderCard } from "./work-order-card/index.mjs";
|
|
111
111
|
import { WorkOrderFilter } from "./work-order-filter/index.mjs";
|
|
112
|
-
const version = "0.0.
|
|
112
|
+
const version = "0.0.40";
|
|
113
113
|
function install(app) {
|
|
114
114
|
const components = [
|
|
115
115
|
ActionBar,
|
|
@@ -146,11 +146,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
146
146
|
}, {
|
|
147
147
|
replace: boolean;
|
|
148
148
|
name: string;
|
|
149
|
+
unit: string;
|
|
149
150
|
showArrow: boolean;
|
|
150
151
|
fields: MaterialDisplayBarField[];
|
|
151
152
|
divider: boolean;
|
|
152
153
|
quantityLabel: string;
|
|
153
|
-
unit: string;
|
|
154
154
|
rounded: boolean;
|
|
155
155
|
stockInsufficient: boolean;
|
|
156
156
|
stockInsufficientText: string;
|
|
@@ -88,11 +88,11 @@ export declare const MaterialPreviewList: import("../utils").WithInstall<import(
|
|
|
88
88
|
}, {
|
|
89
89
|
replace: boolean;
|
|
90
90
|
name: string;
|
|
91
|
+
unit: string;
|
|
91
92
|
showArrow: boolean;
|
|
92
93
|
fields: import("./MaterialDisplayBar").MaterialDisplayBarField[];
|
|
93
94
|
divider: boolean;
|
|
94
95
|
quantityLabel: string;
|
|
95
|
-
unit: string;
|
|
96
96
|
rounded: boolean;
|
|
97
97
|
stockInsufficient: boolean;
|
|
98
98
|
stockInsufficientText: string;
|
|
@@ -189,11 +189,11 @@ export declare const MaterialPreview: import("../utils").WithInstall<import("vue
|
|
|
189
189
|
}, {
|
|
190
190
|
replace: boolean;
|
|
191
191
|
name: string;
|
|
192
|
+
unit: string;
|
|
192
193
|
showArrow: boolean;
|
|
193
194
|
fields: import("./MaterialDisplayBar").MaterialDisplayBarField[];
|
|
194
195
|
divider: boolean;
|
|
195
196
|
quantityLabel: string;
|
|
196
|
-
unit: string;
|
|
197
197
|
rounded: boolean;
|
|
198
198
|
stockInsufficient: boolean;
|
|
199
199
|
stockInsufficientText: string;
|
|
@@ -290,11 +290,11 @@ export declare const MaterialDisplayBar: import("../utils").WithInstall<import("
|
|
|
290
290
|
}, {
|
|
291
291
|
replace: boolean;
|
|
292
292
|
name: string;
|
|
293
|
+
unit: string;
|
|
293
294
|
showArrow: boolean;
|
|
294
295
|
fields: import("./MaterialDisplayBar").MaterialDisplayBarField[];
|
|
295
296
|
divider: boolean;
|
|
296
297
|
quantityLabel: string;
|
|
297
|
-
unit: string;
|
|
298
298
|
rounded: boolean;
|
|
299
299
|
stockInsufficient: boolean;
|
|
300
300
|
stockInsufficientText: string;
|
|
@@ -45,6 +45,7 @@ declare const uploaderProps: {
|
|
|
45
45
|
type: BooleanConstructor;
|
|
46
46
|
default: true;
|
|
47
47
|
};
|
|
48
|
+
uploadFirst: BooleanConstructor;
|
|
48
49
|
modelValue: {
|
|
49
50
|
type: PropType<UploaderFileListItem[]>;
|
|
50
51
|
default: () => never[];
|
|
@@ -109,6 +110,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
109
110
|
type: BooleanConstructor;
|
|
110
111
|
default: true;
|
|
111
112
|
};
|
|
113
|
+
uploadFirst: BooleanConstructor;
|
|
112
114
|
modelValue: {
|
|
113
115
|
type: PropType<UploaderFileListItem[]>;
|
|
114
116
|
default: () => never[];
|
|
@@ -171,6 +173,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
171
173
|
type: BooleanConstructor;
|
|
172
174
|
default: true;
|
|
173
175
|
};
|
|
176
|
+
uploadFirst: BooleanConstructor;
|
|
174
177
|
modelValue: {
|
|
175
178
|
type: PropType<UploaderFileListItem[]>;
|
|
176
179
|
default: () => never[];
|
|
@@ -213,6 +216,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
213
216
|
uploadIcon: string;
|
|
214
217
|
deletable: boolean;
|
|
215
218
|
showUpload: boolean;
|
|
219
|
+
uploadFirst: boolean;
|
|
216
220
|
previewImage: boolean;
|
|
217
221
|
previewFullImage: boolean;
|
|
218
222
|
maxSize: UploaderMaxSize;
|
package/es/uploader/Uploader.mjs
CHANGED
|
@@ -18,7 +18,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
18
18
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
|
-
import { ref, reactive, defineComponent, onBeforeUnmount, mergeProps as _mergeProps, createVNode as _createVNode, createTextVNode as _createTextVNode } from "vue";
|
|
21
|
+
import { ref, reactive, defineComponent, onBeforeUnmount, mergeProps as _mergeProps, createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment } from "vue";
|
|
22
22
|
import { pick, extend, toArray, isPromise, truthProp, getSizeStyle, makeArrayProp, makeStringProp, makeNumericProp } from "../utils/index.mjs";
|
|
23
23
|
import { bem, name, isOversize, filterFiles, isImageFile, isVideoFile, readFileContent, createVideoThumbnail } from "./utils.mjs";
|
|
24
24
|
import { useCustomFieldValue } from "@vant/use";
|
|
@@ -44,6 +44,7 @@ const uploaderProps = {
|
|
|
44
44
|
deletable: truthProp,
|
|
45
45
|
afterRead: Function,
|
|
46
46
|
showUpload: truthProp,
|
|
47
|
+
uploadFirst: Boolean,
|
|
47
48
|
modelValue: makeArrayProp(),
|
|
48
49
|
beforeRead: Function,
|
|
49
50
|
beforeDelete: Function,
|
|
@@ -264,7 +265,7 @@ var stdin_default = defineComponent({
|
|
|
264
265
|
"class": bem("wrapper", {
|
|
265
266
|
disabled: props.disabled
|
|
266
267
|
})
|
|
267
|
-
}, [renderPreviewList(), renderUpload()])]);
|
|
268
|
+
}, [props.uploadFirst ? _createVNode(_Fragment, null, [renderUpload(), renderPreviewList()]) : _createVNode(_Fragment, null, [renderPreviewList(), renderUpload()])])]);
|
|
268
269
|
}
|
|
269
270
|
});
|
|
270
271
|
export {
|
package/es/uploader/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
|
41
41
|
type: BooleanConstructor;
|
|
42
42
|
default: true;
|
|
43
43
|
};
|
|
44
|
+
uploadFirst: BooleanConstructor;
|
|
44
45
|
modelValue: {
|
|
45
46
|
type: import("vue").PropType<import("./types").UploaderFileListItem[]>;
|
|
46
47
|
default: () => never[];
|
|
@@ -103,6 +104,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
|
103
104
|
type: BooleanConstructor;
|
|
104
105
|
default: true;
|
|
105
106
|
};
|
|
107
|
+
uploadFirst: BooleanConstructor;
|
|
106
108
|
modelValue: {
|
|
107
109
|
type: import("vue").PropType<import("./types").UploaderFileListItem[]>;
|
|
108
110
|
default: () => never[];
|
|
@@ -145,6 +147,7 @@ export declare const Uploader: import("../utils").WithInstall<import("vue").Defi
|
|
|
145
147
|
uploadIcon: string;
|
|
146
148
|
deletable: boolean;
|
|
147
149
|
showUpload: boolean;
|
|
150
|
+
uploadFirst: boolean;
|
|
148
151
|
previewImage: boolean;
|
|
149
152
|
previewFullImage: boolean;
|
|
150
153
|
maxSize: import("./types").UploaderMaxSize;
|
package/lib/cell/Cell.js
CHANGED
|
@@ -286,12 +286,14 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
286
286
|
emit("update:multiLineNotesCollapsed", multiLineNotesCollapsed.value);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
}, [props.showTitleCollapseIcon && (0, import_vue.createVNode)(
|
|
289
|
+
}, [props.showTitleCollapseIcon && (0, import_vue.createVNode)("div", {
|
|
290
|
+
"class": bem("title-collapse-action")
|
|
291
|
+
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
290
292
|
"name": "trangle-down",
|
|
291
293
|
"class": bem("title-collapse-icon", {
|
|
292
294
|
collapsed: multiLineNotesCollapsed.value
|
|
293
295
|
})
|
|
294
|
-
}, null), slots.title ? slots.title() : (0, import_vue.createVNode)("span", null, [props.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
296
|
+
}, null)]), slots.title ? slots.title() : (0, import_vue.createVNode)("span", null, [props.title]), renderTitleTag(), renderTags(), renderTitleIcon()]), renderWrapTags(), renderLabel(), props.threeLine && renderDescription(), !multiLineNotesCollapsed.value && renderMultiLineNotes()]);
|
|
295
297
|
}
|
|
296
298
|
};
|
|
297
299
|
const renderValue = () => {
|
|
@@ -531,24 +533,30 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
531
533
|
return;
|
|
532
534
|
}
|
|
533
535
|
if (slots["right-icon"]) {
|
|
534
|
-
return
|
|
536
|
+
return (0, import_vue.createVNode)("div", {
|
|
537
|
+
"class": bem("right-icon-action")
|
|
538
|
+
}, [slots["right-icon"]()]);
|
|
535
539
|
}
|
|
536
540
|
if (props.rightIcon) {
|
|
537
|
-
return (0, import_vue.createVNode)(
|
|
541
|
+
return (0, import_vue.createVNode)("div", {
|
|
542
|
+
"class": bem("right-icon-action")
|
|
543
|
+
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
538
544
|
"name": props.rightIcon,
|
|
539
545
|
"class": bem("right-icon")
|
|
540
|
-
}, null);
|
|
546
|
+
}, null)]);
|
|
541
547
|
}
|
|
542
548
|
if (props.isLink) {
|
|
543
549
|
const name2 = props.arrowDirection && props.arrowDirection !== "right" ? `arrow-${props.arrowDirection}` : "arrow";
|
|
544
|
-
return (0, import_vue.createVNode)(
|
|
550
|
+
return (0, import_vue.createVNode)("div", {
|
|
551
|
+
"class": bem("right-icon-action")
|
|
552
|
+
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
545
553
|
"name": name2,
|
|
546
554
|
"class": bem("right-icon")
|
|
547
|
-
}, null);
|
|
555
|
+
}, null)]);
|
|
548
556
|
}
|
|
549
557
|
};
|
|
550
558
|
return () => {
|
|
551
|
-
var _a2, _b2, _c;
|
|
559
|
+
var _a2, _b2, _c, _d;
|
|
552
560
|
const {
|
|
553
561
|
size,
|
|
554
562
|
center,
|
|
@@ -561,14 +569,16 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
561
569
|
} = props;
|
|
562
570
|
const clickable = (_a2 = props.clickable) != null ? _a2 : isLink || rightIcon === "arrow" || hasSelect("left") || hasSelect("right");
|
|
563
571
|
const hasBadge = isVisible(props.showBadge, !!slots.badge || (0, import_utils.isDef)(props.badge));
|
|
564
|
-
const
|
|
572
|
+
const hasMultiLineNotes = isVisible(props.showMultiLineNotes, !!slots["multi-line-notes"] || !!((_b2 = props.multiLineNotes) == null ? void 0 : _b2.length));
|
|
573
|
+
const cellSize = (_c = size != null ? size : config == null ? void 0 : config.cellSize) != null ? _c : "normal";
|
|
565
574
|
const classes = {
|
|
566
575
|
center: center || hasBadge,
|
|
567
576
|
required,
|
|
568
577
|
"title-bold": titleBold,
|
|
569
578
|
clickable,
|
|
570
579
|
borderless: !border,
|
|
571
|
-
"three-line": threeLine
|
|
580
|
+
"three-line": threeLine,
|
|
581
|
+
"multi-line-notes": hasMultiLineNotes
|
|
572
582
|
};
|
|
573
583
|
if (cellSize) {
|
|
574
584
|
classes[cellSize] = !!cellSize;
|
|
@@ -587,7 +597,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
587
597
|
"role": clickable ? "button" : void 0,
|
|
588
598
|
"tabindex": clickable ? 0 : void 0,
|
|
589
599
|
"onClick": onClick
|
|
590
|
-
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (
|
|
600
|
+
}, [renderSelect("left"), renderAvatar("left"), renderLeftIcon(), renderBlueMark(), renderTitle(), renderValue(), renderNote(), renderAvatar("right"), renderBadge(), renderSelect("right"), renderRightIcon(), (_d = slots.extra) == null ? void 0 : _d.call(slots)]);
|
|
591
601
|
};
|
|
592
602
|
}
|
|
593
603
|
});
|