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.
- package/README.md +11 -11
- package/README.zh-CN.md +9 -9
- package/changelog.generated.md +17 -5
- package/es/button/index.less +1 -1
- package/es/calendar/index.js +2 -2
- package/es/collapse-item/index.less +1 -1
- package/es/count-down/index.js +1 -1
- package/es/datetime-picker/DatePicker.js +1 -1
- package/es/datetime-picker/TimePicker.js +1 -1
- package/es/datetime-picker/shared.js +1 -1
- package/es/dialog/Dialog.js +4 -2
- package/es/field/index.js +3 -3
- package/es/grid-item/index.less +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/vi-VN.js +91 -0
- package/es/mixins/touch.js +1 -1
- package/es/nav-bar/index.js +1 -1
- package/es/notice-bar/index.js +1 -1
- package/es/number-keyboard/Key.js +1 -1
- package/es/picker/index.js +2 -2
- package/es/sidebar-item/index.less +1 -1
- package/es/step/index.js +26 -13
- package/es/stepper/index.js +1 -1
- package/es/steps/index.js +1 -0
- package/es/swipe/index.less +1 -1
- package/es/switch/index.less +1 -1
- package/es/switch-cell/index.js +1 -1
- package/es/tabbar/index.js +1 -1
- package/es/tabs/index.js +1 -1
- package/es/toast/index.less +1 -1
- package/es/utils/dom/scroll.js +2 -2
- package/es/utils/index.js +1 -1
- package/lib/button/index.less +1 -1
- package/lib/calendar/index.js +2 -2
- package/lib/collapse-item/index.less +1 -1
- package/lib/count-down/index.js +1 -1
- package/lib/datetime-picker/DatePicker.js +1 -1
- package/lib/datetime-picker/TimePicker.js +1 -1
- package/lib/datetime-picker/shared.js +1 -1
- package/lib/dialog/Dialog.js +4 -2
- package/lib/field/index.js +3 -3
- package/lib/grid-item/index.less +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/vi-VN.js +96 -0
- package/lib/mixins/touch.js +1 -1
- package/lib/nav-bar/index.js +1 -1
- package/lib/notice-bar/index.js +1 -1
- package/lib/number-keyboard/Key.js +1 -1
- package/lib/picker/index.js +2 -2
- package/lib/sidebar-item/index.less +1 -1
- package/lib/step/index.js +26 -13
- package/lib/stepper/index.js +1 -1
- package/lib/steps/index.js +1 -0
- package/lib/swipe/index.less +1 -1
- package/lib/switch/index.less +1 -1
- package/lib/switch-cell/index.js +1 -1
- package/lib/tabbar/index.js +1 -1
- package/lib/tabs/index.js +1 -1
- package/lib/toast/index.less +1 -1
- package/lib/utils/dom/scroll.js +2 -2
- package/lib/utils/index.js +1 -1
- package/lib/vant.js +999 -86
- package/lib/vant.min.js +2 -2
- package/package.json +3 -3
- package/vetur/attributes.json +328 -412
- package/vetur/tags.json +105 -171
- 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/
|
12
|
-
<img src="https://img.shields.io/codecov/c/github/
|
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
|
|
24
24
|
|
25
|
-
🚀 <a href="https://github.com/
|
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://
|
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/
|
81
|
-
| [vant-demo](https://github.com/
|
82
|
-
| [vant-cli](https://github.com/
|
83
|
-
| [vant-icons](https://github.com/
|
84
|
-
| [vant-touch-emulator](https://github.com/
|
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://
|
101
|
-
- [Changelog](https://
|
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/
|
12
|
-
<img src="https://img.shields.io/codecov/c/github/
|
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
|
|
21
21
|
|
22
|
-
🚀 <a href="https://github.com/
|
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/
|
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/
|
88
|
-
| [vant-demo](https://github.com/
|
89
|
-
| [vant-cli](https://github.com/
|
90
|
-
| [vant-icons](https://github.com/
|
91
|
-
| [vant-touch-emulator](https://github.com/
|
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
|
|
package/changelog.generated.md
CHANGED
@@ -1,12 +1,24 @@
|
|
1
|
-
### [v2.12.
|
1
|
+
### [v2.12.49](https://github.com/vant-ui/vant/compare/v2.12.48...v2.12.49)
|
2
2
|
|
3
|
-
`2022-
|
3
|
+
`2022-09-05`
|
4
4
|
|
5
5
|
**Bug Fixes**
|
6
6
|
|
7
|
-
-
|
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
|
-
-
|
12
|
-
-
|
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)
|
package/es/button/index.less
CHANGED
package/es/calendar/index.js
CHANGED
@@ -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/
|
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/
|
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/
|
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
|
}
|
package/es/count-down/index.js
CHANGED
@@ -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/
|
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/
|
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/
|
83
|
+
// https://github.com/vant-ui/vant/issues/10013
|
84
84
|
getProxiedPicker: function getProxiedPicker() {
|
85
85
|
var _this4 = this;
|
86
86
|
|
package/es/dialog/Dialog.js
CHANGED
@@ -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/
|
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/
|
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/
|
419
|
+
input.style.height = height + 'px'; // https://github.com/vant-ui/vant/issues/9178
|
420
420
|
|
421
421
|
setRootScrollTop(scrollTop);
|
422
422
|
}
|
package/es/grid-item/index.less
CHANGED
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.
|
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
|
+
};
|
package/es/mixins/touch.js
CHANGED
@@ -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/
|
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,
|
package/es/nav-bar/index.js
CHANGED
@@ -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/
|
39
|
+
setHeight(); // https://github.com/vant-ui/vant/issues/10131
|
40
40
|
|
41
41
|
setTimeout(setHeight, 100);
|
42
42
|
}
|
package/es/notice-bar/index.js
CHANGED
@@ -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/
|
46
|
+
// see: https://github.com/vant-ui/vant/issues/6836
|
47
47
|
if (!this.slots('default')) {
|
48
48
|
event.preventDefault();
|
49
49
|
}
|
package/es/picker/index.js
CHANGED
@@ -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/
|
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/
|
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) {
|
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
|
-
|
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
|
-
|
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$
|
54
|
-
activeIcon = _this$
|
55
|
-
iconPrefix = _this$
|
56
|
-
activeColor = _this$
|
57
|
-
finishIcon = _this$
|
58
|
-
inactiveIcon = _this$
|
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
|
package/es/stepper/index.js
CHANGED
@@ -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/
|
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
package/es/swipe/index.less
CHANGED
package/es/switch/index.less
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
left: 0;
|
20
20
|
width: @switch-node-size;
|
21
21
|
height: @switch-node-size;
|
22
|
-
// https://github.com/
|
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%;
|
package/es/switch-cell/index.js
CHANGED
@@ -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://
|
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([{
|
package/es/tabbar/index.js
CHANGED
@@ -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/
|
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/
|
158
|
+
this.init(); // https://github.com/vant-ui/vant/issues/7959
|
159
159
|
|
160
160
|
if (this.vanPopup) {
|
161
161
|
this.vanPopup.onReopen(function () {
|
package/es/toast/index.less
CHANGED
@@ -22,7 +22,7 @@
|
|
22
22
|
// allow newline character
|
23
23
|
white-space: pre-wrap;
|
24
24
|
text-align: center;
|
25
|
-
// https://github.com/
|
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;
|
package/es/utils/dom/scroll.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
function isWindow(val) {
|
2
2
|
return val === window;
|
3
3
|
} // get nearest scroll element
|
4
|
-
// https://github.com/
|
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
|
}
|