persagy-vant 0.0.49 → 0.0.51
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/field/Field.mjs +21 -6
- package/es/field/index.css +1 -1
- package/es/field/index.less +11 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/lib/field/Field.js +21 -6
- package/lib/field/index.css +1 -1
- package/lib/field/index.less +11 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/vant.cjs.js +22 -7
- package/lib/vant.es.js +22 -7
- package/lib/vant.js +22 -7
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -248,7 +248,7 @@ __reExport(stdin_exports, require("./uploader"), module.exports);
|
|
|
248
248
|
__reExport(stdin_exports, require("./video-preview"), module.exports);
|
|
249
249
|
__reExport(stdin_exports, require("./work-order-card"), module.exports);
|
|
250
250
|
__reExport(stdin_exports, require("./work-order-filter"), module.exports);
|
|
251
|
-
const version = "0.0.
|
|
251
|
+
const version = "0.0.51";
|
|
252
252
|
function install(app) {
|
|
253
253
|
const components = [
|
|
254
254
|
import_action_bar.ActionBar,
|
package/lib/vant.cjs.js
CHANGED
|
@@ -4411,9 +4411,16 @@ var stdin_default$1K = vue.defineComponent({
|
|
|
4411
4411
|
"class": bem$1x("unit")
|
|
4412
4412
|
}, [props2.unit]);
|
|
4413
4413
|
};
|
|
4414
|
+
const getWordLimitValue = () => {
|
|
4415
|
+
const value = getModelValue();
|
|
4416
|
+
if (props2.type !== "textarea") {
|
|
4417
|
+
return value;
|
|
4418
|
+
}
|
|
4419
|
+
return value.split(/\r\n|\r|\n/).map((paragraph) => paragraph.trim()).join("\n").trim();
|
|
4420
|
+
};
|
|
4414
4421
|
const renderWordLimit = () => {
|
|
4415
4422
|
if (props2.showWordLimit && props2.maxlength) {
|
|
4416
|
-
const count = getStringLength(
|
|
4423
|
+
const count = getStringLength(getWordLimitValue());
|
|
4417
4424
|
return vue.createVNode("div", {
|
|
4418
4425
|
"class": bem$1x("word-limit")
|
|
4419
4426
|
}, [vue.createVNode("span", {
|
|
@@ -4421,11 +4428,14 @@ var stdin_default$1K = vue.defineComponent({
|
|
|
4421
4428
|
}, [count]), vue.createTextVNode("/"), props2.maxlength]);
|
|
4422
4429
|
}
|
|
4423
4430
|
};
|
|
4424
|
-
const
|
|
4431
|
+
const getErrorMessage = () => {
|
|
4425
4432
|
if (form && form.props.showErrorMessage === false) {
|
|
4426
|
-
return;
|
|
4433
|
+
return "";
|
|
4427
4434
|
}
|
|
4428
|
-
|
|
4435
|
+
return props2.errorMessage || state.validateMessage;
|
|
4436
|
+
};
|
|
4437
|
+
const renderMessage = () => {
|
|
4438
|
+
const message = getErrorMessage();
|
|
4429
4439
|
if (message) {
|
|
4430
4440
|
const slot = slots["error-message"];
|
|
4431
4441
|
const errorMessageAlign = getProp("errorMessageAlign");
|
|
@@ -4456,7 +4466,7 @@ var stdin_default$1K = vue.defineComponent({
|
|
|
4456
4466
|
"class": bem$1x("clear")
|
|
4457
4467
|
}, null), renderRightIcon(), slots.button && vue.createVNode("div", {
|
|
4458
4468
|
"class": bem$1x("button")
|
|
4459
|
-
}, [slots.button()])]), renderWordLimit()
|
|
4469
|
+
}, [slots.button()])]), renderWordLimit()];
|
|
4460
4470
|
useExpose({
|
|
4461
4471
|
blur,
|
|
4462
4472
|
focus,
|
|
@@ -4491,12 +4501,14 @@ var stdin_default$1K = vue.defineComponent({
|
|
|
4491
4501
|
const labelAlign = getProp("labelAlign");
|
|
4492
4502
|
const Label2 = renderLabel();
|
|
4493
4503
|
const LeftIcon = renderLeftIcon();
|
|
4504
|
+
const hasErrorMessage = !!getErrorMessage();
|
|
4494
4505
|
return vue.createVNode(Cell, {
|
|
4495
4506
|
"size": props2.size,
|
|
4496
4507
|
"icon": props2.leftIcon,
|
|
4497
4508
|
"class": bem$1x({
|
|
4498
4509
|
error: showError.value,
|
|
4499
4510
|
disabled,
|
|
4511
|
+
"has-error-message": hasErrorMessage,
|
|
4500
4512
|
[`label-${labelAlign}`]: labelAlign,
|
|
4501
4513
|
[`label-${props2.labelPosition}`]: props2.labelPosition
|
|
4502
4514
|
}),
|
|
@@ -4519,7 +4531,10 @@ var stdin_default$1K = vue.defineComponent({
|
|
|
4519
4531
|
icon: LeftIcon ? () => LeftIcon : null,
|
|
4520
4532
|
title: Label2 ? () => Label2 : null,
|
|
4521
4533
|
value: renderFieldBody,
|
|
4522
|
-
extra: slots.extra
|
|
4534
|
+
extra: slots.extra || hasErrorMessage ? () => {
|
|
4535
|
+
var _a;
|
|
4536
|
+
return [(_a = slots.extra) == null ? void 0 : _a.call(slots), renderMessage()];
|
|
4537
|
+
} : null
|
|
4523
4538
|
});
|
|
4524
4539
|
};
|
|
4525
4540
|
}
|
|
@@ -21843,7 +21858,7 @@ const Lazyload = {
|
|
|
21843
21858
|
});
|
|
21844
21859
|
}
|
|
21845
21860
|
};
|
|
21846
|
-
const version = "0.0.
|
|
21861
|
+
const version = "0.0.51";
|
|
21847
21862
|
function install(app) {
|
|
21848
21863
|
const components = [
|
|
21849
21864
|
ActionBar,
|
package/lib/vant.es.js
CHANGED
|
@@ -4409,9 +4409,16 @@ var stdin_default$1K = defineComponent({
|
|
|
4409
4409
|
"class": bem$1x("unit")
|
|
4410
4410
|
}, [props2.unit]);
|
|
4411
4411
|
};
|
|
4412
|
+
const getWordLimitValue = () => {
|
|
4413
|
+
const value = getModelValue();
|
|
4414
|
+
if (props2.type !== "textarea") {
|
|
4415
|
+
return value;
|
|
4416
|
+
}
|
|
4417
|
+
return value.split(/\r\n|\r|\n/).map((paragraph) => paragraph.trim()).join("\n").trim();
|
|
4418
|
+
};
|
|
4412
4419
|
const renderWordLimit = () => {
|
|
4413
4420
|
if (props2.showWordLimit && props2.maxlength) {
|
|
4414
|
-
const count = getStringLength(
|
|
4421
|
+
const count = getStringLength(getWordLimitValue());
|
|
4415
4422
|
return createVNode("div", {
|
|
4416
4423
|
"class": bem$1x("word-limit")
|
|
4417
4424
|
}, [createVNode("span", {
|
|
@@ -4419,11 +4426,14 @@ var stdin_default$1K = defineComponent({
|
|
|
4419
4426
|
}, [count]), createTextVNode("/"), props2.maxlength]);
|
|
4420
4427
|
}
|
|
4421
4428
|
};
|
|
4422
|
-
const
|
|
4429
|
+
const getErrorMessage = () => {
|
|
4423
4430
|
if (form && form.props.showErrorMessage === false) {
|
|
4424
|
-
return;
|
|
4431
|
+
return "";
|
|
4425
4432
|
}
|
|
4426
|
-
|
|
4433
|
+
return props2.errorMessage || state.validateMessage;
|
|
4434
|
+
};
|
|
4435
|
+
const renderMessage = () => {
|
|
4436
|
+
const message = getErrorMessage();
|
|
4427
4437
|
if (message) {
|
|
4428
4438
|
const slot = slots["error-message"];
|
|
4429
4439
|
const errorMessageAlign = getProp("errorMessageAlign");
|
|
@@ -4454,7 +4464,7 @@ var stdin_default$1K = defineComponent({
|
|
|
4454
4464
|
"class": bem$1x("clear")
|
|
4455
4465
|
}, null), renderRightIcon(), slots.button && createVNode("div", {
|
|
4456
4466
|
"class": bem$1x("button")
|
|
4457
|
-
}, [slots.button()])]), renderWordLimit()
|
|
4467
|
+
}, [slots.button()])]), renderWordLimit()];
|
|
4458
4468
|
useExpose({
|
|
4459
4469
|
blur,
|
|
4460
4470
|
focus,
|
|
@@ -4489,12 +4499,14 @@ var stdin_default$1K = defineComponent({
|
|
|
4489
4499
|
const labelAlign = getProp("labelAlign");
|
|
4490
4500
|
const Label2 = renderLabel();
|
|
4491
4501
|
const LeftIcon = renderLeftIcon();
|
|
4502
|
+
const hasErrorMessage = !!getErrorMessage();
|
|
4492
4503
|
return createVNode(Cell, {
|
|
4493
4504
|
"size": props2.size,
|
|
4494
4505
|
"icon": props2.leftIcon,
|
|
4495
4506
|
"class": bem$1x({
|
|
4496
4507
|
error: showError.value,
|
|
4497
4508
|
disabled,
|
|
4509
|
+
"has-error-message": hasErrorMessage,
|
|
4498
4510
|
[`label-${labelAlign}`]: labelAlign,
|
|
4499
4511
|
[`label-${props2.labelPosition}`]: props2.labelPosition
|
|
4500
4512
|
}),
|
|
@@ -4517,7 +4529,10 @@ var stdin_default$1K = defineComponent({
|
|
|
4517
4529
|
icon: LeftIcon ? () => LeftIcon : null,
|
|
4518
4530
|
title: Label2 ? () => Label2 : null,
|
|
4519
4531
|
value: renderFieldBody,
|
|
4520
|
-
extra: slots.extra
|
|
4532
|
+
extra: slots.extra || hasErrorMessage ? () => {
|
|
4533
|
+
var _a;
|
|
4534
|
+
return [(_a = slots.extra) == null ? void 0 : _a.call(slots), renderMessage()];
|
|
4535
|
+
} : null
|
|
4521
4536
|
});
|
|
4522
4537
|
};
|
|
4523
4538
|
}
|
|
@@ -21841,7 +21856,7 @@ const Lazyload = {
|
|
|
21841
21856
|
});
|
|
21842
21857
|
}
|
|
21843
21858
|
};
|
|
21844
|
-
const version = "0.0.
|
|
21859
|
+
const version = "0.0.51";
|
|
21845
21860
|
function install(app) {
|
|
21846
21861
|
const components = [
|
|
21847
21862
|
ActionBar,
|
package/lib/vant.js
CHANGED
|
@@ -5649,9 +5649,16 @@
|
|
|
5649
5649
|
"class": bem$1x("unit")
|
|
5650
5650
|
}, [props2.unit]);
|
|
5651
5651
|
};
|
|
5652
|
+
const getWordLimitValue = () => {
|
|
5653
|
+
const value = getModelValue();
|
|
5654
|
+
if (props2.type !== "textarea") {
|
|
5655
|
+
return value;
|
|
5656
|
+
}
|
|
5657
|
+
return value.split(/\r\n|\r|\n/).map((paragraph) => paragraph.trim()).join("\n").trim();
|
|
5658
|
+
};
|
|
5652
5659
|
const renderWordLimit = () => {
|
|
5653
5660
|
if (props2.showWordLimit && props2.maxlength) {
|
|
5654
|
-
const count = getStringLength(
|
|
5661
|
+
const count = getStringLength(getWordLimitValue());
|
|
5655
5662
|
return vue.createVNode("div", {
|
|
5656
5663
|
"class": bem$1x("word-limit")
|
|
5657
5664
|
}, [vue.createVNode("span", {
|
|
@@ -5659,11 +5666,14 @@
|
|
|
5659
5666
|
}, [count]), vue.createTextVNode("/"), props2.maxlength]);
|
|
5660
5667
|
}
|
|
5661
5668
|
};
|
|
5662
|
-
const
|
|
5669
|
+
const getErrorMessage = () => {
|
|
5663
5670
|
if (form && form.props.showErrorMessage === false) {
|
|
5664
|
-
return;
|
|
5671
|
+
return "";
|
|
5665
5672
|
}
|
|
5666
|
-
|
|
5673
|
+
return props2.errorMessage || state.validateMessage;
|
|
5674
|
+
};
|
|
5675
|
+
const renderMessage = () => {
|
|
5676
|
+
const message = getErrorMessage();
|
|
5667
5677
|
if (message) {
|
|
5668
5678
|
const slot = slots["error-message"];
|
|
5669
5679
|
const errorMessageAlign = getProp("errorMessageAlign");
|
|
@@ -5694,7 +5704,7 @@
|
|
|
5694
5704
|
"class": bem$1x("clear")
|
|
5695
5705
|
}, null), renderRightIcon(), slots.button && vue.createVNode("div", {
|
|
5696
5706
|
"class": bem$1x("button")
|
|
5697
|
-
}, [slots.button()])]), renderWordLimit()
|
|
5707
|
+
}, [slots.button()])]), renderWordLimit()];
|
|
5698
5708
|
useExpose({
|
|
5699
5709
|
blur,
|
|
5700
5710
|
focus,
|
|
@@ -5729,12 +5739,14 @@
|
|
|
5729
5739
|
const labelAlign = getProp("labelAlign");
|
|
5730
5740
|
const Label2 = renderLabel();
|
|
5731
5741
|
const LeftIcon = renderLeftIcon();
|
|
5742
|
+
const hasErrorMessage = !!getErrorMessage();
|
|
5732
5743
|
return vue.createVNode(Cell, {
|
|
5733
5744
|
"size": props2.size,
|
|
5734
5745
|
"icon": props2.leftIcon,
|
|
5735
5746
|
"class": bem$1x({
|
|
5736
5747
|
error: showError.value,
|
|
5737
5748
|
disabled,
|
|
5749
|
+
"has-error-message": hasErrorMessage,
|
|
5738
5750
|
[`label-${labelAlign}`]: labelAlign,
|
|
5739
5751
|
[`label-${props2.labelPosition}`]: props2.labelPosition
|
|
5740
5752
|
}),
|
|
@@ -5757,7 +5769,10 @@
|
|
|
5757
5769
|
icon: LeftIcon ? () => LeftIcon : null,
|
|
5758
5770
|
title: Label2 ? () => Label2 : null,
|
|
5759
5771
|
value: renderFieldBody,
|
|
5760
|
-
extra: slots.extra
|
|
5772
|
+
extra: slots.extra || hasErrorMessage ? () => {
|
|
5773
|
+
var _a;
|
|
5774
|
+
return [(_a = slots.extra) == null ? void 0 : _a.call(slots), renderMessage()];
|
|
5775
|
+
} : null
|
|
5761
5776
|
});
|
|
5762
5777
|
};
|
|
5763
5778
|
}
|
|
@@ -25430,7 +25445,7 @@
|
|
|
25430
25445
|
});
|
|
25431
25446
|
}
|
|
25432
25447
|
};
|
|
25433
|
-
const version = "0.0.
|
|
25448
|
+
const version = "0.0.51";
|
|
25434
25449
|
function install(app) {
|
|
25435
25450
|
const components = [
|
|
25436
25451
|
ActionBar,
|