vant 2.12.46 → 2.12.49

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.
Files changed (67) hide show
  1. package/README.md +11 -11
  2. package/README.zh-CN.md +9 -9
  3. package/changelog.generated.md +17 -5
  4. package/es/button/index.less +1 -1
  5. package/es/calendar/index.js +2 -2
  6. package/es/collapse-item/index.less +1 -1
  7. package/es/count-down/index.js +1 -1
  8. package/es/datetime-picker/DatePicker.js +1 -1
  9. package/es/datetime-picker/TimePicker.js +1 -1
  10. package/es/datetime-picker/shared.js +1 -1
  11. package/es/dialog/Dialog.js +4 -2
  12. package/es/field/index.js +3 -3
  13. package/es/grid-item/index.less +1 -1
  14. package/es/index.js +1 -1
  15. package/es/locale/lang/vi-VN.js +91 -0
  16. package/es/mixins/touch.js +1 -1
  17. package/es/nav-bar/index.js +1 -1
  18. package/es/notice-bar/index.js +1 -1
  19. package/es/number-keyboard/Key.js +1 -1
  20. package/es/picker/index.js +2 -2
  21. package/es/sidebar-item/index.less +1 -1
  22. package/es/step/index.js +26 -13
  23. package/es/stepper/index.js +1 -1
  24. package/es/steps/index.js +1 -0
  25. package/es/swipe/index.less +1 -1
  26. package/es/switch/index.less +1 -1
  27. package/es/switch-cell/index.js +1 -1
  28. package/es/tabbar/index.js +1 -1
  29. package/es/tabs/index.js +1 -1
  30. package/es/toast/index.less +1 -1
  31. package/es/utils/dom/scroll.js +2 -2
  32. package/es/utils/index.js +1 -1
  33. package/lib/button/index.less +1 -1
  34. package/lib/calendar/index.js +2 -2
  35. package/lib/collapse-item/index.less +1 -1
  36. package/lib/count-down/index.js +1 -1
  37. package/lib/datetime-picker/DatePicker.js +1 -1
  38. package/lib/datetime-picker/TimePicker.js +1 -1
  39. package/lib/datetime-picker/shared.js +1 -1
  40. package/lib/dialog/Dialog.js +4 -2
  41. package/lib/field/index.js +3 -3
  42. package/lib/grid-item/index.less +1 -1
  43. package/lib/index.js +1 -1
  44. package/lib/locale/lang/vi-VN.js +96 -0
  45. package/lib/mixins/touch.js +1 -1
  46. package/lib/nav-bar/index.js +1 -1
  47. package/lib/notice-bar/index.js +1 -1
  48. package/lib/number-keyboard/Key.js +1 -1
  49. package/lib/picker/index.js +2 -2
  50. package/lib/sidebar-item/index.less +1 -1
  51. package/lib/step/index.js +26 -13
  52. package/lib/stepper/index.js +1 -1
  53. package/lib/steps/index.js +1 -0
  54. package/lib/swipe/index.less +1 -1
  55. package/lib/switch/index.less +1 -1
  56. package/lib/switch-cell/index.js +1 -1
  57. package/lib/tabbar/index.js +1 -1
  58. package/lib/tabs/index.js +1 -1
  59. package/lib/toast/index.less +1 -1
  60. package/lib/utils/dom/scroll.js +2 -2
  61. package/lib/utils/index.js +1 -1
  62. package/lib/vant.js +999 -86
  63. package/lib/vant.min.js +2 -2
  64. package/package.json +3 -3
  65. package/vetur/attributes.json +328 -412
  66. package/vetur/tags.json +105 -171
  67. package/vetur/web-types.json +1068 -1182
package/README.md CHANGED
@@ -8,8 +8,8 @@
8
8
 
9
9
  <p align="center">
10
10
  <img src="https://img.shields.io/npm/v/vant.svg?style=flat-square" alt="npm version" />
11
- <img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="npm version" />
12
- <img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
11
+ <img src="https://img.shields.io/github/workflow/status/vant-ui/vant/CI/dev?style=flat-square" alt="npm version" />
12
+ <img src="https://img.shields.io/codecov/c/github/vant-ui/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
13
13
  <img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
14
14
  <img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits">
15
15
  <img src="https://img.badgesize.io/https://unpkg.com/vant/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" />
@@ -22,7 +22,7 @@
22
22
  🇨🇳 <a href="./README.zh-CN.md">中文版介绍</a>
23
23
  &nbsp;
24
24
  &nbsp;
25
- 🚀 <a href="https://github.com/youzan/vant-weapp" target="_blank">小程序版</a>
25
+ 🚀 <a href="https://github.com/vant-ui/vant-weapp" target="_blank">小程序版</a>
26
26
  </p>
27
27
 
28
28
  ---
@@ -61,7 +61,7 @@ import 'vant/lib/index.css';
61
61
  Vue.use(Button);
62
62
  ```
63
63
 
64
- See more in [Quickstart](https://youzan.github.io/vant#/en-US/quickstart).
64
+ See more in [Quickstart](https://vant-ui.github.io/vant#/en-US/quickstart).
65
65
 
66
66
  ## Contribution
67
67
 
@@ -77,11 +77,11 @@ Vant 3 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
77
77
 
78
78
  | Project | Description |
79
79
  | --- | --- |
80
- | [vant-weapp](https://github.com/youzan/vant-weapp) | WeChat MiniProgram UI |
81
- | [vant-demo](https://github.com/youzan/vant-demo) | Collection of Vant demos |
82
- | [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
83
- | [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant icons |
84
- | [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
80
+ | [vant-weapp](https://github.com/vant-ui/vant-weapp) | WeChat MiniProgram UI |
81
+ | [vant-demo](https://github.com/vant-ui/vant-demo) | Collection of Vant demos |
82
+ | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
83
+ | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant icons |
84
+ | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
85
85
 
86
86
  ## Community Ecosystem
87
87
 
@@ -97,8 +97,8 @@ Vant 3 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
97
97
 
98
98
  ## Links
99
99
 
100
- - [Documentation](https://youzan.github.io/vant)
101
- - [Changelog](https://youzan.github.io/vant#/en-US/changelog)
100
+ - [Documentation](https://vant-ui.github.io/vant)
101
+ - [Changelog](https://vant-ui.github.io/vant#/en-US/changelog)
102
102
  - [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
103
103
 
104
104
  ## Preview
package/README.zh-CN.md CHANGED
@@ -8,8 +8,8 @@
8
8
 
9
9
  <p align="center">
10
10
  <img src="https://img.shields.io/npm/v/vant.svg?style=flat-square" alt="npm version" />
11
- <img src="https://img.shields.io/github/workflow/status/youzan/vant/CI/dev?style=flat-square" alt="npm version" />
12
- <img src="https://img.shields.io/codecov/c/github/youzan/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
11
+ <img src="https://img.shields.io/github/workflow/status/vant-ui/vant/CI/dev?style=flat-square" alt="npm version" />
12
+ <img src="https://img.shields.io/codecov/c/github/vant-ui/vant/dev.svg?style=flat-square&color=#4fc08d" alt="Coverage Status" />
13
13
  <img src="https://img.shields.io/npm/dm/vant.svg?style=flat-square&color=#4fc08d" alt="downloads" />
14
14
  <img src="https://img.shields.io/jsdelivr/npm/hm/vant?style=flat-square" alt="Jsdelivr Hits">
15
15
  <img src="https://img.badgesize.io/https://unpkg.com/vant/lib/vant.min.js?compression=gzip&style=flat-square&label=gzip%20size&color=#4fc08d" alt="Gzip Size" />
@@ -19,7 +19,7 @@
19
19
  🔥 <a href="https://vant-contrib.gitee.io/vant">文档网站</a>
20
20
  &nbsp;
21
21
  &nbsp;
22
- 🚀 <a href="https://github.com/youzan/vant-weapp" target="_blank">小程序版</a>
22
+ 🚀 <a href="https://github.com/vant-ui/vant-weapp" target="_blank">小程序版</a>
23
23
  </p>
24
24
 
25
25
  ---
@@ -70,7 +70,7 @@ vant 也支持按需引入、CDN 引入等方式,详细说明见 [快速上手
70
70
 
71
71
  修改代码请阅读我们的 [开发指南](https://vant-contrib.gitee.io/vant/#/zh-CN/contribution)。
72
72
 
73
- 使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。
73
+ 使用过程中发现任何问题都可以提 [Issue](https://github.com/vant-ui/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/vant-ui/vant/pulls)。
74
74
 
75
75
  ## 浏览器支持
76
76
 
@@ -84,11 +84,11 @@ Vant 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致
84
84
 
85
85
  | 项目 | 描述 |
86
86
  | --- | --- |
87
- | [vant-weapp](https://github.com/youzan/vant-weapp) | Vant 微信小程序版 |
88
- | [vant-demo](https://github.com/youzan/vant-demo) | Vant 官方示例合集 |
89
- | [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
90
- | [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
91
- | [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |
87
+ | [vant-weapp](https://github.com/vant-ui/vant-weapp) | Vant 微信小程序版 |
88
+ | [vant-demo](https://github.com/vant-ui/vant-demo) | Vant 官方示例合集 |
89
+ | [vant-cli](https://github.com/vant-ui/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
90
+ | [vant-icons](https://github.com/vant-ui/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
91
+ | [vant-touch-emulator](https://github.com/vant-ui/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |
92
92
 
93
93
  ## 社区生态
94
94
 
@@ -1,12 +1,24 @@
1
- ### [v2.12.46](https://github.com/youzan/vant/compare/v2.12.45...v2.12.46)
1
+ ### [v2.12.49](https://github.com/vant-ui/vant/compare/v2.12.48...v2.12.49)
2
2
 
3
- `2022-03-30`
3
+ `2022-09-05`
4
4
 
5
5
  **Bug Fixes**
6
6
 
7
- - TabBar: route matching in special cases [#10447](https://github.com/youzan/vant/issues/10447)
7
+ - utils: avoid getting unexpected value [#11010](https://github.com/vant-ui/vant/issues/11010)
8
+
9
+ - fix (vi-Vn lang): Accurate Vietnamese translation (#10889) [#10889](https://github.com/vant-ui/vant/issues/10889)
10
+
11
+ **dcos**
12
+
13
+ - update changelog [ffb819](https://github.com/vant-ui/vant/commit/ffb819181a3eaecd00e8a6f11a15ce8a439bd0e5)
8
14
 
9
15
  **Document**
10
16
 
11
- - update README [cda29f](https://github.com/youzan/vant/commit/cda29f68fe25e2311fe6992bc077b387468861bc)
12
- - changelog: 2.12.45 [5c48d2](https://github.com/youzan/vant/commit/5c48d289c1f9422c51578ca654536a9f188e87d0)
17
+ - fix [107511](https://github.com/vant-ui/vant/commit/107511aa54e430a1a15fd5f20559ce592d9d0a19)
18
+ - Uploader: fix isOverSize param [#10824](https://github.com/vant-ui/vant/issues/10824)
19
+ - update domain [60b890](https://github.com/vant-ui/vant/commit/60b8906acd736d105ec92c1c30446aea9297bc8c)
20
+ - changelog: vant@2.12.48 [#10744](https://github.com/vant-ui/vant/issues/10744)
21
+
22
+ **Feature**
23
+
24
+ - cli: add site.headHtml option [d4ab42](https://github.com/vant-ui/vant/commit/d4ab4214ef3cceb259e5496cf2e7d0e0e4dc4015)
@@ -153,7 +153,7 @@
153
153
  height: 100%;
154
154
 
155
155
  // fix icon vertical align
156
- // see: https://github.com/youzan/vant/issues/7617
156
+ // see: https://github.com/vant-ui/vant/issues/7617
157
157
  &::before {
158
158
  content: ' ';
159
159
  }
@@ -155,7 +155,7 @@ export default createComponent({
155
155
  mounted: function mounted() {
156
156
  var _this$vanPopup;
157
157
 
158
- this.init(); // https://github.com/youzan/vant/issues/9845
158
+ this.init(); // https://github.com/vant-ui/vant/issues/9845
159
159
 
160
160
  (_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
161
161
  },
@@ -183,7 +183,7 @@ export default createComponent({
183
183
 
184
184
  this.$nextTick(function () {
185
185
  // add Math.floor to avoid decimal height issues
186
- // https://github.com/youzan/vant/issues/5640
186
+ // https://github.com/vant-ui/vant/issues/5640
187
187
  _this.bodyHeight = Math.floor(_this.$refs.body.getBoundingClientRect().height);
188
188
 
189
189
  _this.onScroll();
@@ -13,7 +13,7 @@
13
13
  &__title {
14
14
  .van-cell__right-icon::before {
15
15
  // using translateZ to fix safari rendering issues
16
- // see: https://github.com/youzan/vant/issues/8608
16
+ // see: https://github.com/vant-ui/vant/issues/8608
17
17
  transform: rotate(90deg) translateZ(0);
18
18
  transition: transform @collapse-item-transition-duration;
19
19
  }
@@ -84,7 +84,7 @@ export default createComponent({
84
84
  },
85
85
  tick: function tick() {
86
86
  // should not start counting in server
87
- // see: https://github.com/youzan/vant/issues/7807
87
+ // see: https://github.com/vant-ui/vant/issues/7807
88
88
  if (!inBrowser) {
89
89
  return;
90
90
  }
@@ -272,7 +272,7 @@ export default createComponent({
272
272
  this.updateInnerValue();
273
273
  this.$nextTick(function () {
274
274
  _this4.$nextTick(function () {
275
- // https://github.com/youzan/vant/issues/9775
275
+ // https://github.com/vant-ui/vant/issues/9775
276
276
  _this4.updateInnerValue();
277
277
 
278
278
  _this4.$emit('change', picker);
@@ -114,7 +114,7 @@ export default createComponent({
114
114
  this.updateInnerValue();
115
115
  this.$nextTick(function () {
116
116
  _this2.$nextTick(function () {
117
- // https://github.com/youzan/vant/issues/9775
117
+ // https://github.com/vant-ui/vant/issues/9775
118
118
  _this2.updateInnerValue();
119
119
 
120
120
  _this2.$emit('change', picker);
@@ -80,7 +80,7 @@ export var TimePickerMixin = {
80
80
  getPicker: function getPicker() {
81
81
  return this.$refs.picker;
82
82
  },
83
- // https://github.com/youzan/vant/issues/10013
83
+ // https://github.com/vant-ui/vant/issues/10013
84
84
  getProxiedPicker: function getProxiedPicker() {
85
85
  var _this4 = this;
86
86
 
@@ -176,7 +176,8 @@ export default createComponent({
176
176
  "attrs": {
177
177
  "size": "large",
178
178
  "loading": this.loading.cancel,
179
- "text": this.cancelButtonText || t('cancel')
179
+ "text": this.cancelButtonText || t('cancel'),
180
+ "nativeType": "button"
180
181
  },
181
182
  "class": bem('cancel'),
182
183
  "style": {
@@ -191,7 +192,8 @@ export default createComponent({
191
192
  "attrs": {
192
193
  "size": "large",
193
194
  "loading": this.loading.confirm,
194
- "text": this.confirmButtonText || t('confirm')
195
+ "text": this.confirmButtonText || t('confirm'),
196
+ "nativeType": "button"
195
197
  },
196
198
  "class": [bem('confirm'), (_ref = {}, _ref[BORDER_LEFT] = multiple, _ref)],
197
199
  "style": {
package/es/field/index.js CHANGED
@@ -292,7 +292,7 @@ export default createComponent({
292
292
  }
293
293
 
294
294
  value = isDef(value) ? String(value) : ''; // native maxlength have incorrect line-break counting
295
- // see: https://github.com/youzan/vant/issues/5033
295
+ // see: https://github.com/vant-ui/vant/issues/5033
296
296
 
297
297
  var maxlength = this.maxlength;
298
298
 
@@ -333,7 +333,7 @@ export default createComponent({
333
333
  },
334
334
  onFocus: function onFocus(event) {
335
335
  this.focused = true;
336
- this.$emit('focus', event); // https://github.com/youzan/vant/issues/9715
336
+ this.$emit('focus', event); // https://github.com/vant-ui/vant/issues/9715
337
337
 
338
338
  this.$nextTick(this.adjustSize); // readonly not work in legacy mobile safari
339
339
 
@@ -416,7 +416,7 @@ export default createComponent({
416
416
  }
417
417
 
418
418
  if (height) {
419
- input.style.height = height + 'px'; // https://github.com/youzan/vant/issues/9178
419
+ input.style.height = height + 'px'; // https://github.com/vant-ui/vant/issues/9178
420
420
 
421
421
  setRootScrollTop(scrollTop);
422
422
  }
@@ -20,7 +20,7 @@
20
20
  color: @grid-item-text-color;
21
21
  font-size: @grid-item-text-font-size;
22
22
  line-height: 1.5;
23
- // https://github.com/youzan/vant/issues/3894
23
+ // https://github.com/vant-ui/vant/issues/3894
24
24
  word-break: break-all;
25
25
  }
26
26
 
package/es/index.js CHANGED
@@ -87,7 +87,7 @@ import Tag from './tag';
87
87
  import Toast from './toast';
88
88
  import TreeSelect from './tree-select';
89
89
  import Uploader from './uploader';
90
- var version = '2.12.46';
90
+ var version = '2.12.49';
91
91
 
92
92
  function install(Vue) {
93
93
  var components = [ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, GoodsAction, GoodsActionButton, GoodsActionIcon, Grid, GridItem, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Panel, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Sku, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
@@ -0,0 +1,91 @@
1
+ export default {
2
+ name: 'Tên',
3
+ tel: 'Điện thoại',
4
+ save: 'Đồng ý',
5
+ confirm: 'Xác nhận',
6
+ cancel: 'Hủy bỏ',
7
+ delete: 'Xóa bỏ',
8
+ complete: 'Hoàn thành',
9
+ loading: 'Đang tải...',
10
+ telEmpty: 'Vui lòng điền số điện thoại',
11
+ nameEmpty: 'vui lòng điền tên',
12
+ nameInvalid: 'Vui lòng nhập tên chính xác',
13
+ confirmDelete: 'Bạn có chắc chắn muốn xóa',
14
+ telInvalid: 'Vui lòng nhập số điện thoại chính xác',
15
+ vanCalendar: {
16
+ end: 'Chấm dứt',
17
+ start: 'Bắt đầu',
18
+ title: 'Chọn ngày',
19
+ confirm: 'Đảm bảo',
20
+ startEnd: 'Bắt đầu / Kết thúc',
21
+ weekdays: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'],
22
+ monthTitle: function monthTitle(year, month) {
23
+ return year + " n\u0103m " + month + " th\xE1ng";
24
+ },
25
+ rangePrompt: function rangePrompt(maxRange) {
26
+ return "C\xE1c ng\xE0y \u0111\u01B0\u1EE3c ch\u1ECDn kh\xF4ng \u0111\u01B0\u1EE3c v\u01B0\u1EE3t qu\xE1 " + maxRange + " ng\xE0y";
27
+ }
28
+ },
29
+ vanCascader: {
30
+ select: 'Xin hãy lựa chọn'
31
+ },
32
+ vanContactCard: {
33
+ addText: 'Thêm địa chỉ liên hệ'
34
+ },
35
+ vanContactList: {
36
+ addText: 'Địa chỉ liên lạc mới'
37
+ },
38
+ vanPagination: {
39
+ prev: 'Trang trước',
40
+ next: 'Trang sau'
41
+ },
42
+ vanPullRefresh: {
43
+ pulling: 'Kéo xuống để làm mới...',
44
+ loosing: 'Phát hành để làm mới...'
45
+ },
46
+ vanSubmitBar: {
47
+ label: 'Toàn bộ:'
48
+ },
49
+ vanCoupon: {
50
+ unlimited: 'Không có ngưỡng sử dụng',
51
+ discount: function discount(_discount) {
52
+ return _discount + " Chi\u1EBFt kh\u1EA5u";
53
+ },
54
+ condition: function condition(_condition) {
55
+ return "C\xF3 s\u1EB5n sau khi chi ti\xEAu " + _condition + " Vi\u1EC7t Nam \u0110\u1ED3ng";
56
+ }
57
+ },
58
+ vanCouponCell: {
59
+ title: 'Phiếu giảm giá',
60
+ tips: 'Chưa có',
61
+ count: function count(_count) {
62
+ return _count + " trang t\xEDnh kh\u1EA3 d\u1EE5ng";
63
+ }
64
+ },
65
+ vanCouponList: {
66
+ empty: 'Chưa có phiếu giảm giá',
67
+ exchange: 'Trao đổi',
68
+ close: 'Không sử dụng phiếu giảm giá',
69
+ enable: 'Có sẵn',
70
+ disabled: 'không có sẵn',
71
+ placeholder: 'Vui lòng nhập mã khuyến mãi'
72
+ },
73
+ vanAddressEdit: {
74
+ area: 'Khu vực',
75
+ postal: 'Mã bưu điện',
76
+ areaEmpty: 'Vui lòng chọn khu vực',
77
+ addressEmpty: 'Vui lòng điền vào địa chỉ chi tiết',
78
+ postalEmpty: 'Định dạng mã zip không chính xác',
79
+ defaultAddress: 'Đặt làm địa chỉ giao hàng mặc định',
80
+ telPlaceholder: 'Số điện thoại của người nhận hàng',
81
+ namePlaceholder: 'Tên người nhận hàng',
82
+ areaPlaceholder: 'Chọn Tỉnh / Thành phố / Quận / Huyện'
83
+ },
84
+ vanAddressEditDetail: {
85
+ label: 'Địa chỉ chi tiết',
86
+ placeholder: 'Số đường phố, số phòng tầng, v.v.'
87
+ },
88
+ vanAddressList: {
89
+ add: 'Thêm địa chỉ'
90
+ }
91
+ };
@@ -46,7 +46,7 @@ export var TouchMixin = {
46
46
  this.offsetY = 0;
47
47
  },
48
48
  // avoid Vue 2.6 event bubble issues by manually binding events
49
- // https://github.com/youzan/vant/issues/3015
49
+ // https://github.com/vant-ui/vant/issues/3015
50
50
  bindTouchEvent: function bindTouchEvent(el) {
51
51
  var onTouchStart = this.onTouchStart,
52
52
  onTouchMove = this.onTouchMove,
@@ -36,7 +36,7 @@ export default createComponent({
36
36
  _this.height = _this.$refs.navBar.getBoundingClientRect().height;
37
37
  };
38
38
 
39
- setHeight(); // https://github.com/youzan/vant/issues/10131
39
+ setHeight(); // https://github.com/vant-ui/vant/issues/10131
40
40
 
41
41
  setTimeout(setHeight, 100);
42
42
  }
@@ -55,7 +55,7 @@ export default createComponent({
55
55
  }
56
56
  },
57
57
  created: function created() {
58
- // https://github.com/youzan/vant/issues/8634
58
+ // https://github.com/vant-ui/vant/issues/8634
59
59
  if (this.vanPopup) {
60
60
  this.vanPopup.onReopen(this.reset);
61
61
  }
@@ -43,7 +43,7 @@ export default createComponent({
43
43
  onTouchEnd: function onTouchEnd(event) {
44
44
  if (this.active) {
45
45
  // eliminate tap delay on safari
46
- // see: https://github.com/youzan/vant/issues/6836
46
+ // see: https://github.com/vant-ui/vant/issues/6836
47
47
  if (!this.slots('default')) {
48
48
  event.preventDefault();
49
49
  }
@@ -121,7 +121,7 @@ export default createComponent({
121
121
  } else {
122
122
  var values = this.getValues(); // compatible with old version of wrong parameters
123
123
  // should be removed in next major version
124
- // see: https://github.com/youzan/vant/issues/5905
124
+ // see: https://github.com/vant-ui/vant/issues/5905
125
125
 
126
126
  if (this.dataType === 'cascade') {
127
127
  values = values.map(function (item) {
@@ -160,7 +160,7 @@ export default createComponent({
160
160
  } else {
161
161
  var values = this.getValues(); // compatible with old version of wrong parameters
162
162
  // should be removed in next major version
163
- // see: https://github.com/youzan/vant/issues/5905
163
+ // see: https://github.com/vant-ui/vant/issues/5905
164
164
 
165
165
  if (this.dataType === 'cascade') {
166
166
  values = values.map(function (item) {
@@ -20,7 +20,7 @@
20
20
  &__text {
21
21
  position: relative;
22
22
  display: inline-block;
23
- // https://github.com/youzan/vant/issues/7455
23
+ // https://github.com/vant-ui/vant/issues/7455
24
24
  word-break: break-all;
25
25
  }
26
26
 
package/es/step/index.js CHANGED
@@ -23,15 +23,27 @@ export default createComponent({
23
23
  return this.status === 'process';
24
24
  },
25
25
  lineStyle: function lineStyle() {
26
- if (this.status === 'finish') {
26
+ var _this$parent = this.parent,
27
+ activeColor = _this$parent.activeColor,
28
+ inactiveColor = _this$parent.inactiveColor,
29
+ center = _this$parent.center,
30
+ direction = _this$parent.direction;
31
+ var style = {
32
+ background: this.status === 'finish' ? activeColor : inactiveColor
33
+ };
34
+
35
+ if (center && direction === 'vertical') {
36
+ style.top = '50%';
37
+ }
38
+
39
+ return style;
40
+ },
41
+ circleContainerStyle: function circleContainerStyle() {
42
+ if (this.parent.center && this.parent.direction === 'vertical') {
27
43
  return {
28
- background: this.parent.activeColor
44
+ top: '50%'
29
45
  };
30
46
  }
31
-
32
- return {
33
- background: this.parent.inactiveColor
34
- };
35
47
  },
36
48
  titleStyle: function titleStyle() {
37
49
  if (this.active) {
@@ -50,12 +62,12 @@ export default createComponent({
50
62
  methods: {
51
63
  genCircle: function genCircle() {
52
64
  var h = this.$createElement;
53
- var _this$parent = this.parent,
54
- activeIcon = _this$parent.activeIcon,
55
- iconPrefix = _this$parent.iconPrefix,
56
- activeColor = _this$parent.activeColor,
57
- finishIcon = _this$parent.finishIcon,
58
- inactiveIcon = _this$parent.inactiveIcon;
65
+ var _this$parent2 = this.parent,
66
+ activeIcon = _this$parent2.activeIcon,
67
+ iconPrefix = _this$parent2.iconPrefix,
68
+ activeColor = _this$parent2.activeColor,
69
+ finishIcon = _this$parent2.finishIcon,
70
+ inactiveIcon = _this$parent2.inactiveIcon;
59
71
 
60
72
  if (this.active) {
61
73
  return this.slots('active-icon') || h(Icon, {
@@ -123,7 +135,8 @@ export default createComponent({
123
135
  "class": bem('circle-container'),
124
136
  "on": {
125
137
  "click": this.onClickStep
126
- }
138
+ },
139
+ "style": this.circleContainerStyle
127
140
  }, [this.genCircle()]), h("div", {
128
141
  "class": bem('line'),
129
142
  "style": this.lineStyle
@@ -258,7 +258,7 @@ export default createComponent({
258
258
  },
259
259
  onMousedown: function onMousedown(event) {
260
260
  // fix mobile safari page scroll down issue
261
- // see: https://github.com/youzan/vant/issues/7690
261
+ // see: https://github.com/vant-ui/vant/issues/7690
262
262
  if (this.disableInput) {
263
263
  event.preventDefault();
264
264
  }
package/es/steps/index.js CHANGED
@@ -8,6 +8,7 @@ var _createNamespace = createNamespace('steps'),
8
8
  export default createComponent({
9
9
  mixins: [ParentMixin('vanSteps')],
10
10
  props: {
11
+ center: Boolean,
11
12
  iconPrefix: String,
12
13
  finishIcon: String,
13
14
  activeColor: String,
@@ -3,7 +3,7 @@
3
3
  .van-swipe {
4
4
  position: relative;
5
5
  overflow: hidden;
6
- // https://github.com/youzan/vant/issues/9931
6
+ // https://github.com/vant-ui/vant/issues/9931
7
7
  transform: translateZ(0);
8
8
  cursor: grab;
9
9
  user-select: none;
@@ -19,7 +19,7 @@
19
19
  left: 0;
20
20
  width: @switch-node-size;
21
21
  height: @switch-node-size;
22
- // https://github.com/youzan/vant/issues/9839
22
+ // https://github.com/vant-ui/vant/issues/9839
23
23
  font-size: inherit;
24
24
  background-color: @switch-node-background-color;
25
25
  border-radius: 100%;
@@ -14,7 +14,7 @@ var _createNamespace = createNamespace('switch-cell'),
14
14
 
15
15
  function SwitchCell(h, props, slots, ctx) {
16
16
  if (process.env.NODE_ENV === 'development') {
17
- console.warn('[Vant] "SwitchCell" component is deprecated, see: https://youzan.github.io/vant/#/zh-CN/switch-cell.');
17
+ console.warn('[Vant] "SwitchCell" component is deprecated, see: https://vant-ui.github.io/vant/v2/#/zh-CN/switch-cell.');
18
18
  }
19
19
 
20
20
  return h(Cell, _mergeJSXProps([{
@@ -60,7 +60,7 @@ export default createComponent({
60
60
  _this.height = _this.$refs.tabbar.getBoundingClientRect().height;
61
61
  };
62
62
 
63
- setHeight(); // https://github.com/youzan/vant/issues/10131
63
+ setHeight(); // https://github.com/vant-ui/vant/issues/10131
64
64
 
65
65
  setTimeout(setHeight, 100);
66
66
  }
package/es/tabs/index.js CHANGED
@@ -155,7 +155,7 @@ export default createComponent({
155
155
  mounted: function mounted() {
156
156
  var _this2 = this;
157
157
 
158
- this.init(); // https://github.com/youzan/vant/issues/7959
158
+ this.init(); // https://github.com/vant-ui/vant/issues/7959
159
159
 
160
160
  if (this.vanPopup) {
161
161
  this.vanPopup.onReopen(function () {
@@ -22,7 +22,7 @@
22
22
  // allow newline character
23
23
  white-space: pre-wrap;
24
24
  text-align: center;
25
- // https://github.com/youzan/vant/issues/8959
25
+ // https://github.com/vant-ui/vant/issues/8959
26
26
  word-break: break-all;
27
27
  background-color: @toast-background-color;
28
28
  border-radius: @toast-border-radius;
@@ -1,10 +1,10 @@
1
1
  function isWindow(val) {
2
2
  return val === window;
3
3
  } // get nearest scroll element
4
- // https://github.com/youzan/vant/issues/3823
4
+ // https://github.com/vant-ui/vant/issues/3823
5
5
 
6
6
 
7
- var overflowScrollReg = /scroll|auto/i;
7
+ var overflowScrollReg = /scroll|auto|overlay/i;
8
8
  export function getScroller(el, root) {
9
9
  if (root === void 0) {
10
10
  root = window;
package/es/utils/index.js CHANGED
@@ -23,7 +23,7 @@ export function get(object, path) {
23
23
  keys.forEach(function (key) {
24
24
  var _result$key;
25
25
 
26
- result = (_result$key = result[key]) != null ? _result$key : '';
26
+ result = isObject(result) ? (_result$key = result[key]) != null ? _result$key : '' : '';
27
27
  });
28
28
  return result;
29
29
  }
@@ -153,7 +153,7 @@
153
153
  height: 100%;
154
154
 
155
155
  // fix icon vertical align
156
- // see: https://github.com/youzan/vant/issues/7617
156
+ // see: https://github.com/vant-ui/vant/issues/7617
157
157
  &::before {
158
158
  content: ' ';
159
159
  }