vant 4.1.1 → 4.1.2

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/lib/index.d.ts CHANGED
@@ -99,4 +99,4 @@ declare namespace _default {
99
99
  }
100
100
  export default _default;
101
101
  export function install(app: any): void;
102
- export const version: "4.1.1";
102
+ export const version: "4.1.2";
package/lib/index.js CHANGED
@@ -212,7 +212,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
212
212
  __reExport(stdin_exports, require("./toast"), module.exports);
213
213
  __reExport(stdin_exports, require("./tree-select"), module.exports);
214
214
  __reExport(stdin_exports, require("./uploader"), module.exports);
215
- const version = "4.1.1";
215
+ const version = "4.1.2";
216
216
  function install(app) {
217
217
  const components = [
218
218
  import_action_bar.ActionBar,
@@ -0,0 +1,62 @@
1
+ declare const _default: {
2
+ name: string;
3
+ tel: string;
4
+ save: string;
5
+ confirm: string;
6
+ cancel: string;
7
+ delete: string;
8
+ loading: string;
9
+ noCoupon: string;
10
+ nameEmpty: string;
11
+ addContact: string;
12
+ telInvalid: string;
13
+ vanCalendar: {
14
+ end: string;
15
+ start: string;
16
+ title: string;
17
+ weekdays: string[];
18
+ monthTitle: (year: number, month: number) => string;
19
+ rangePrompt: (maxRange: number) => string;
20
+ };
21
+ vanCascader: {
22
+ select: string;
23
+ };
24
+ vanPagination: {
25
+ prev: string;
26
+ next: string;
27
+ };
28
+ vanPullRefresh: {
29
+ pulling: string;
30
+ loosing: string;
31
+ };
32
+ vanSubmitBar: {
33
+ label: string;
34
+ };
35
+ vanCoupon: {
36
+ unlimited: string;
37
+ discount: (discount: number) => string;
38
+ condition: (condition: number) => string;
39
+ };
40
+ vanCouponCell: {
41
+ title: string;
42
+ count: (count: number) => string;
43
+ };
44
+ vanCouponList: {
45
+ exchange: string;
46
+ close: string;
47
+ enable: string;
48
+ disabled: string;
49
+ placeholder: string;
50
+ };
51
+ vanAddressEdit: {
52
+ area: string;
53
+ areaEmpty: string;
54
+ addressEmpty: string;
55
+ addressDetail: string;
56
+ defaultAddress: string;
57
+ };
58
+ vanAddressList: {
59
+ add: string;
60
+ };
61
+ };
62
+ export default _default;
@@ -0,0 +1,83 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var stdin_exports = {};
19
+ __export(stdin_exports, {
20
+ default: () => stdin_default
21
+ });
22
+ module.exports = __toCommonJS(stdin_exports);
23
+ var stdin_default = {
24
+ name: "\u1788\u17D2\u1798\u17C4\u17C7",
25
+ tel: "\u1791\u17BC\u179A\u179F\u17D0\u1796\u17D2\u1791",
26
+ save: "\u179A\u1780\u17D2\u179F\u17B6\u1791\u17BB\u1780",
27
+ confirm: "\u1799\u179B\u17CB\u1796\u17D2\u179A\u1798",
28
+ cancel: "\u1794\u17C4\u17C7\u1794\u1784\u17CB",
29
+ delete: "\u179B\u17BB\u1794",
30
+ loading: "\u1780\u17C6\u1796\u17BB\u1784\u200B\u1795\u17D2\u1791\u17BB\u1780...",
31
+ noCoupon: "\u1782\u17D2\u1798\u17B6\u1793\u1782\u17BC\u1794\u17C9\u17BB\u1784",
32
+ nameEmpty: "\u179F\u17BC\u1798\u1794\u17C6\u1796\u17C1\u1789\u1788\u17D2\u1798\u17C4\u17C7",
33
+ addContact: "\u1794\u1793\u17D2\u1790\u17C2\u1798\u1791\u17C6\u1793\u17B6\u1780\u17CB\u1791\u17C6\u1793\u1784",
34
+ telInvalid: "\u179B\u17C1\u1781\u1791\u17BC\u179A\u179F\u17D0\u1796\u17D2\u1791\u1798\u17B7\u1793\u178F\u17D2\u179A\u17BC\u179C\u1791\u1798\u17D2\u179A\u1784\u17CB",
35
+ vanCalendar: {
36
+ end: "\u1794\u1789\u17D2\u1785\u1794\u17CB",
37
+ start: "\u1785\u17B6\u1794\u17CB\u1796\u17B8",
38
+ title: "\u1794\u17D2\u179A\u178F\u17B7\u1791\u17B7\u1793",
39
+ weekdays: ["\u17A2\u17B6", "\u1785", "\u17A2", "\u1796", "\u1796\u17D2\u179A", "\u179F\u17BB", "\u179F\u17C5"],
40
+ monthTitle: (year, month) => `${year}/${month}`,
41
+ rangePrompt: (maxRange) => `\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1798\u17B7\u1793\u179B\u17BE\u179F\u1796\u17B8 ${maxRange} \u1790\u17D2\u1784\u17C3`
42
+ },
43
+ vanCascader: {
44
+ select: "\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F"
45
+ },
46
+ vanPagination: {
47
+ prev: "\u1798\u17BB\u1793",
48
+ next: "\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB"
49
+ },
50
+ vanPullRefresh: {
51
+ pulling: "\u1791\u17B6\u1789\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u17A1\u17BE\u1784\u179C\u17B7\u1789...",
52
+ loosing: "\u1796\u17D2\u179A\u179B\u17C2\u1784\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u17A1\u17BE\u1784\u179C\u17B7\u1789..."
53
+ },
54
+ vanSubmitBar: {
55
+ label: "\u179F\u179A\u17BB\u1794:"
56
+ },
57
+ vanCoupon: {
58
+ unlimited: "\u1782\u17D2\u1798\u17B6\u1793\u178A\u17C2\u1793\u1780\u17C6\u178E\u178F\u17CB",
59
+ discount: (discount) => `\u1794\u1789\u17D2\u1785\u17BB\u17C7\u178F\u1798\u17D2\u179B\u17C3 ${discount * 10}%`,
60
+ condition: (condition) => `\u1799\u17C9\u17B6\u1784\u178F\u17B7\u1785 ${condition}`
61
+ },
62
+ vanCouponCell: {
63
+ title: "\u1782\u17BC\u1794\u17C9\u17BB\u1784",
64
+ count: (count) => `\u17A2\u17D2\u1793\u1780\u1798\u17B6\u1793 ${count}\u1782\u17BC\u1794\u17C9\u17BB\u1784`
65
+ },
66
+ vanCouponList: {
67
+ exchange: "\u1794\u17D2\u178A\u17BC\u179A",
68
+ close: "\u1794\u17B7\u1791",
69
+ enable: "\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",
70
+ disabled: "\u1798\u17B7\u1793\u17A2\u17B6\u1785\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",
71
+ placeholder: "\u179B\u17C1\u1781\u1780\u17BC\u178A\u1782\u17BC\u1794\u17C9\u17BB\u1784"
72
+ },
73
+ vanAddressEdit: {
74
+ area: "\u1791\u17B8\u178F\u17B6\u17C6\u1784",
75
+ areaEmpty: "\u179F\u17BC\u1798\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1791\u17B8\u178F\u17B6\u17C6\u1784\u1791\u1791\u17BD\u179B",
76
+ addressEmpty: "\u178F\u1798\u17D2\u179A\u17BC\u179C\u17A2\u17C4\u1799\u1798\u17B6\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793",
77
+ addressDetail: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793",
78
+ defaultAddress: "\u178A\u17B6\u1780\u17CB\u1787\u17B6\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u178A\u17BE\u1798"
79
+ },
80
+ vanAddressList: {
81
+ add: "\u1794\u1793\u17D2\u1790\u17C2\u1798\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u1790\u17D2\u1798\u17B8"
82
+ }
83
+ };
package/lib/vant.cjs.js CHANGED
@@ -4129,12 +4129,12 @@ var stdin_default$1n = vue.defineComponent({
4129
4129
  }
4130
4130
  };
4131
4131
  const onBlur = (event) => {
4132
- if (getProp("readonly")) {
4133
- return;
4134
- }
4135
4132
  state.focused = false;
4136
4133
  updateValue(getModelValue(), "onBlur");
4137
4134
  emit("blur", event);
4135
+ if (getProp("readonly")) {
4136
+ return;
4137
+ }
4138
4138
  validateWithTrigger("onBlur");
4139
4139
  vue.nextTick(adjustTextareaSize);
4140
4140
  resetScroll();
@@ -4157,7 +4157,8 @@ var stdin_default$1n = vue.defineComponent({
4157
4157
  });
4158
4158
  const labelStyle = vue.computed(() => {
4159
4159
  const labelWidth = getProp("labelWidth");
4160
- if (labelWidth) {
4160
+ const labelAlign = getProp("labelAlign");
4161
+ if (labelWidth && labelAlign !== "top") {
4161
4162
  return {
4162
4163
  width: addUnit(labelWidth)
4163
4164
  };
@@ -4267,6 +4268,8 @@ var stdin_default$1n = vue.defineComponent({
4267
4268
  }
4268
4269
  };
4269
4270
  const renderLabel = () => {
4271
+ const labelWidth = getProp("labelWidth");
4272
+ const labelAlign = getProp("labelAlign");
4270
4273
  const colon = getProp("colon") ? ":" : "";
4271
4274
  if (slots.label) {
4272
4275
  return [slots.label(), colon];
@@ -4274,7 +4277,10 @@ var stdin_default$1n = vue.defineComponent({
4274
4277
  if (props.label) {
4275
4278
  return vue.createVNode("label", {
4276
4279
  "id": `${id}-label`,
4277
- "for": getInputId()
4280
+ "for": getInputId(),
4281
+ "style": labelAlign === "top" && labelWidth ? {
4282
+ width: addUnit(labelWidth)
4283
+ } : void 0
4278
4284
  }, [props.label + colon]);
4279
4285
  }
4280
4286
  };
@@ -9706,7 +9712,7 @@ var stdin_default$J = vue.defineComponent({
9706
9712
  } = touch;
9707
9713
  const moveX = deltaX.value + startMoveX;
9708
9714
  const moveY = deltaY.value + startMoveY;
9709
- if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved) {
9715
+ if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved && touch.isHorizontal()) {
9710
9716
  state.moving = false;
9711
9717
  return;
9712
9718
  }
@@ -15224,7 +15230,7 @@ const Lazyload = {
15224
15230
  });
15225
15231
  }
15226
15232
  };
15227
- const version = "4.1.1";
15233
+ const version = "4.1.2";
15228
15234
  function install(app) {
15229
15235
  const components = [
15230
15236
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -4127,12 +4127,12 @@ var stdin_default$1n = defineComponent({
4127
4127
  }
4128
4128
  };
4129
4129
  const onBlur = (event) => {
4130
- if (getProp("readonly")) {
4131
- return;
4132
- }
4133
4130
  state.focused = false;
4134
4131
  updateValue(getModelValue(), "onBlur");
4135
4132
  emit("blur", event);
4133
+ if (getProp("readonly")) {
4134
+ return;
4135
+ }
4136
4136
  validateWithTrigger("onBlur");
4137
4137
  nextTick(adjustTextareaSize);
4138
4138
  resetScroll();
@@ -4155,7 +4155,8 @@ var stdin_default$1n = defineComponent({
4155
4155
  });
4156
4156
  const labelStyle = computed(() => {
4157
4157
  const labelWidth = getProp("labelWidth");
4158
- if (labelWidth) {
4158
+ const labelAlign = getProp("labelAlign");
4159
+ if (labelWidth && labelAlign !== "top") {
4159
4160
  return {
4160
4161
  width: addUnit(labelWidth)
4161
4162
  };
@@ -4265,6 +4266,8 @@ var stdin_default$1n = defineComponent({
4265
4266
  }
4266
4267
  };
4267
4268
  const renderLabel = () => {
4269
+ const labelWidth = getProp("labelWidth");
4270
+ const labelAlign = getProp("labelAlign");
4268
4271
  const colon = getProp("colon") ? ":" : "";
4269
4272
  if (slots.label) {
4270
4273
  return [slots.label(), colon];
@@ -4272,7 +4275,10 @@ var stdin_default$1n = defineComponent({
4272
4275
  if (props.label) {
4273
4276
  return createVNode("label", {
4274
4277
  "id": `${id}-label`,
4275
- "for": getInputId()
4278
+ "for": getInputId(),
4279
+ "style": labelAlign === "top" && labelWidth ? {
4280
+ width: addUnit(labelWidth)
4281
+ } : void 0
4276
4282
  }, [props.label + colon]);
4277
4283
  }
4278
4284
  };
@@ -9704,7 +9710,7 @@ var stdin_default$J = defineComponent({
9704
9710
  } = touch;
9705
9711
  const moveX = deltaX.value + startMoveX;
9706
9712
  const moveY = deltaY.value + startMoveY;
9707
- if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved) {
9713
+ if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved && touch.isHorizontal()) {
9708
9714
  state.moving = false;
9709
9715
  return;
9710
9716
  }
@@ -15222,7 +15228,7 @@ const Lazyload = {
15222
15228
  });
15223
15229
  }
15224
15230
  };
15225
- const version = "4.1.1";
15231
+ const version = "4.1.2";
15226
15232
  function install(app) {
15227
15233
  const components = [
15228
15234
  ActionBar,
package/lib/vant.js CHANGED
@@ -4509,12 +4509,12 @@
4509
4509
  }
4510
4510
  };
4511
4511
  const onBlur = (event) => {
4512
- if (getProp("readonly")) {
4513
- return;
4514
- }
4515
4512
  state.focused = false;
4516
4513
  updateValue(getModelValue(), "onBlur");
4517
4514
  emit("blur", event);
4515
+ if (getProp("readonly")) {
4516
+ return;
4517
+ }
4518
4518
  validateWithTrigger("onBlur");
4519
4519
  vue.nextTick(adjustTextareaSize);
4520
4520
  resetScroll();
@@ -4537,7 +4537,8 @@
4537
4537
  });
4538
4538
  const labelStyle = vue.computed(() => {
4539
4539
  const labelWidth = getProp("labelWidth");
4540
- if (labelWidth) {
4540
+ const labelAlign = getProp("labelAlign");
4541
+ if (labelWidth && labelAlign !== "top") {
4541
4542
  return {
4542
4543
  width: addUnit(labelWidth)
4543
4544
  };
@@ -4647,6 +4648,8 @@
4647
4648
  }
4648
4649
  };
4649
4650
  const renderLabel = () => {
4651
+ const labelWidth = getProp("labelWidth");
4652
+ const labelAlign = getProp("labelAlign");
4650
4653
  const colon = getProp("colon") ? ":" : "";
4651
4654
  if (slots.label) {
4652
4655
  return [slots.label(), colon];
@@ -4654,7 +4657,10 @@
4654
4657
  if (props.label) {
4655
4658
  return vue.createVNode("label", {
4656
4659
  "id": `${id}-label`,
4657
- "for": getInputId()
4660
+ "for": getInputId(),
4661
+ "style": labelAlign === "top" && labelWidth ? {
4662
+ width: addUnit(labelWidth)
4663
+ } : void 0
4658
4664
  }, [props.label + colon]);
4659
4665
  }
4660
4666
  };
@@ -10057,7 +10063,7 @@
10057
10063
  } = touch;
10058
10064
  const moveX = deltaX.value + startMoveX;
10059
10065
  const moveY = deltaY.value + startMoveY;
10060
- if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved) {
10066
+ if ((moveX > maxMoveX.value || moveX < -maxMoveX.value) && !isImageMoved && touch.isHorizontal()) {
10061
10067
  state.moving = false;
10062
10068
  return;
10063
10069
  }
@@ -16482,7 +16488,7 @@
16482
16488
  });
16483
16489
  }
16484
16490
  };
16485
- const version = "4.1.1";
16491
+ const version = "4.1.2";
16486
16492
  function install(app) {
16487
16493
  const components = [
16488
16494
  ActionBar,