persagy-vant 0.0.49 → 0.0.50

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.
@@ -412,9 +412,16 @@ var stdin_default = defineComponent({
412
412
  "class": bem("unit")
413
413
  }, [props.unit]);
414
414
  };
415
+ const getWordLimitValue = () => {
416
+ const value = getModelValue();
417
+ if (props.type !== "textarea") {
418
+ return value;
419
+ }
420
+ return value.split(/\r\n|\r|\n/).map((paragraph) => paragraph.trim()).join("\n").trim();
421
+ };
415
422
  const renderWordLimit = () => {
416
423
  if (props.showWordLimit && props.maxlength) {
417
- const count = getStringLength(getModelValue());
424
+ const count = getStringLength(getWordLimitValue());
418
425
  return _createVNode("div", {
419
426
  "class": bem("word-limit")
420
427
  }, [_createVNode("span", {
package/es/index.d.ts CHANGED
@@ -117,4 +117,4 @@ declare namespace _default {
117
117
  }
118
118
  export default _default;
119
119
  export function install(app: any): void;
120
- export const version: "0.0.49";
120
+ export const version: "0.0.50";
package/es/index.mjs CHANGED
@@ -110,7 +110,7 @@ import { Uploader } from "./uploader/index.mjs";
110
110
  import { VideoPreview } from "./video-preview/index.mjs";
111
111
  import { WorkOrderCard } from "./work-order-card/index.mjs";
112
112
  import { WorkOrderFilter } from "./work-order-filter/index.mjs";
113
- const version = "0.0.49";
113
+ const version = "0.0.50";
114
114
  function install(app) {
115
115
  const components = [
116
116
  ActionBar,
@@ -435,9 +435,16 @@ var stdin_default = (0, import_vue.defineComponent)({
435
435
  "class": bem("unit")
436
436
  }, [props.unit]);
437
437
  };
438
+ const getWordLimitValue = () => {
439
+ const value = getModelValue();
440
+ if (props.type !== "textarea") {
441
+ return value;
442
+ }
443
+ return value.split(/\r\n|\r|\n/).map((paragraph) => paragraph.trim()).join("\n").trim();
444
+ };
438
445
  const renderWordLimit = () => {
439
446
  if (props.showWordLimit && props.maxlength) {
440
- const count = (0, import_utils2.getStringLength)(getModelValue());
447
+ const count = (0, import_utils2.getStringLength)(getWordLimitValue());
441
448
  return (0, import_vue.createVNode)("div", {
442
449
  "class": bem("word-limit")
443
450
  }, [(0, import_vue.createVNode)("span", {
package/lib/index.d.ts CHANGED
@@ -117,4 +117,4 @@ declare namespace _default {
117
117
  }
118
118
  export default _default;
119
119
  export function install(app: any): void;
120
- export const version: "0.0.49";
120
+ export const version: "0.0.50";
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.49";
251
+ const version = "0.0.50";
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(getModelValue());
4423
+ const count = getStringLength(getWordLimitValue());
4417
4424
  return vue.createVNode("div", {
4418
4425
  "class": bem$1x("word-limit")
4419
4426
  }, [vue.createVNode("span", {
@@ -21843,7 +21850,7 @@ const Lazyload = {
21843
21850
  });
21844
21851
  }
21845
21852
  };
21846
- const version = "0.0.49";
21853
+ const version = "0.0.50";
21847
21854
  function install(app) {
21848
21855
  const components = [
21849
21856
  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(getModelValue());
4421
+ const count = getStringLength(getWordLimitValue());
4415
4422
  return createVNode("div", {
4416
4423
  "class": bem$1x("word-limit")
4417
4424
  }, [createVNode("span", {
@@ -21841,7 +21848,7 @@ const Lazyload = {
21841
21848
  });
21842
21849
  }
21843
21850
  };
21844
- const version = "0.0.49";
21851
+ const version = "0.0.50";
21845
21852
  function install(app) {
21846
21853
  const components = [
21847
21854
  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(getModelValue());
5661
+ const count = getStringLength(getWordLimitValue());
5655
5662
  return vue.createVNode("div", {
5656
5663
  "class": bem$1x("word-limit")
5657
5664
  }, [vue.createVNode("span", {
@@ -25430,7 +25437,7 @@
25430
25437
  });
25431
25438
  }
25432
25439
  };
25433
- const version = "0.0.49";
25440
+ const version = "0.0.50";
25434
25441
  function install(app) {
25435
25442
  const components = [
25436
25443
  ActionBar,