vant 2.12.43 → 2.12.46

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 CHANGED
@@ -93,6 +93,7 @@ Vant 3 supports modern browsers and Chrome >= 51、iOS >= 10.0 (same as Vue 3).
93
93
  | [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro |
94
94
  | [vant-theme](https://github.com/Aisen60/vant-theme) | Online theme preview built on Vant UI |
95
95
  | [@antmjs/vantui](https://github.com/antmjs/vantui) | Mobile UI Components based on Vant, supporting Taro and React |
96
+ | [@formily/vant](https://github.com/formilyjs/vant) | Form solution based on Vant and Formily |
96
97
 
97
98
  ## Links
98
99
 
package/README.zh-CN.md CHANGED
@@ -26,9 +26,9 @@
26
26
 
27
27
  ### 介绍
28
28
 
29
- Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源,已持续维护 4 年时间。Vant 对内承载了有赞所有核心业务,对外服务十多万开发者,是业界主流的移动端组件库之一。
29
+ Vant 是一个**轻量、可靠的移动端组件库**,于 2017 年开源。
30
30
 
31
- 目前 Vant 官方提供了 [Vue 2 版本](https://vant-contrib.gitee.io/vant/v2)、[Vue 3 版本](https://vant-contrib.gitee.io/vant)和[微信小程序版本](http://vant-contrib.gitee.io/vant-weapp),并由社区团队维护 [React 版本](https://github.com/mxdi9i7/vant-react)。
31
+ 目前 Vant 官方提供了 [Vue 2 版本](https://vant-contrib.gitee.io/vant/v2)、[Vue 3 版本](https://vant-contrib.gitee.io/vant)和[微信小程序版本](http://vant-contrib.gitee.io/vant-weapp),并由社区团队维护 [React 版本](https://github.com/3lang3/react-vant)和[支付宝小程序版本](https://github.com/ant-move/Vant-Aliapp)。
32
32
 
33
33
  ## 特性
34
34
 
@@ -102,6 +102,7 @@ Vant 3 支持现代浏览器以及 Chrome >= 51、iOS >= 10.0(与 Vue 3 一致
102
102
  | [taroify](https://gitee.com/mallfoundry/taroify) | Vant Taro 版 |
103
103
  | [vant-theme](https://github.com/Aisen60/vant-theme) | Vant 在线主题预览工具 |
104
104
  | [@antmjs/vantui](https://github.com/antmjs/vantui) | 基于 Vant Weapp 开发的多端组件库,同时支持 Taro 和 React |
105
+ | [@formily/vant](https://github.com/formilyjs/vant) | 基于 Vant 和 Formily 开发的表单解决方案 |
105
106
 
106
107
  ## 链接
107
108
 
@@ -0,0 +1,12 @@
1
+ ### [v2.12.46](https://github.com/youzan/vant/compare/v2.12.45...v2.12.46)
2
+
3
+ `2022-03-30`
4
+
5
+ **Bug Fixes**
6
+
7
+ - TabBar: route matching in special cases [#10447](https://github.com/youzan/vant/issues/10447)
8
+
9
+ **Document**
10
+
11
+ - update README [cda29f](https://github.com/youzan/vant/commit/cda29f68fe25e2311fe6992bc077b387468861bc)
12
+ - changelog: 2.12.45 [5c48d2](https://github.com/youzan/vant/commit/5c48d289c1f9422c51578ca654536a9f188e87d0)
@@ -1,5 +1,5 @@
1
1
  import _mergeJSXProps from "@vue/babel-helper-vue-jsx-merge-props";
2
- import { createNamespace, addUnit } from '../utils';
2
+ import { createNamespace, addUnit, noop } from '../utils';
3
3
  import { BORDER_TOP, BORDER_LEFT } from '../utils/constant';
4
4
  import { PopupMixin } from '../mixins/popup';
5
5
  import Button from '../button';
@@ -95,13 +95,41 @@ export default createComponent({
95
95
  }
96
96
  },
97
97
  onOpened: function onOpened() {
98
+ var _this2 = this;
99
+
98
100
  this.$emit('opened');
101
+ this.$nextTick(function () {
102
+ var _this2$$refs$dialog;
103
+
104
+ (_this2$$refs$dialog = _this2.$refs.dialog) == null ? void 0 : _this2$$refs$dialog.focus();
105
+ });
99
106
  },
100
107
  onClosed: function onClosed() {
101
108
  this.$emit('closed');
102
109
  },
110
+ onKeydown: function onKeydown(event) {
111
+ var _this3 = this;
112
+
113
+ if (event.key === 'Escape' || event.key === 'Enter') {
114
+ // skip keyboard events of child elements
115
+ if (event.target !== this.$refs.dialog) {
116
+ return;
117
+ }
118
+
119
+ var onEventType = {
120
+ Enter: this.showConfirmButton ? function () {
121
+ return _this3.handleAction('confirm');
122
+ } : noop,
123
+ Escape: this.showCancelButton ? function () {
124
+ return _this3.handleAction('cancel');
125
+ } : noop
126
+ };
127
+ onEventType[event.key]();
128
+ this.$emit('keydown', event);
129
+ }
130
+ },
103
131
  genRoundButtons: function genRoundButtons() {
104
- var _this2 = this;
132
+ var _this4 = this;
105
133
 
106
134
  var h = this.$createElement;
107
135
  return h(GoodsAction, {
@@ -117,7 +145,7 @@ export default createComponent({
117
145
  "class": bem('cancel'),
118
146
  "on": {
119
147
  "click": function click() {
120
- _this2.handleAction('cancel');
148
+ _this4.handleAction('cancel');
121
149
  }
122
150
  }
123
151
  }), this.showConfirmButton && h(GoodsActionButton, {
@@ -131,13 +159,13 @@ export default createComponent({
131
159
  "class": bem('confirm'),
132
160
  "on": {
133
161
  "click": function click() {
134
- _this2.handleAction('confirm');
162
+ _this4.handleAction('confirm');
135
163
  }
136
164
  }
137
165
  })]);
138
166
  },
139
167
  genButtons: function genButtons() {
140
- var _this3 = this,
168
+ var _this5 = this,
141
169
  _ref;
142
170
 
143
171
  var h = this.$createElement;
@@ -156,7 +184,7 @@ export default createComponent({
156
184
  },
157
185
  "on": {
158
186
  "click": function click() {
159
- _this3.handleAction('cancel');
187
+ _this5.handleAction('cancel');
160
188
  }
161
189
  }
162
190
  }), this.showConfirmButton && h(Button, {
@@ -171,7 +199,7 @@ export default createComponent({
171
199
  },
172
200
  "on": {
173
201
  "click": function click() {
174
- _this3.handleAction('confirm');
202
+ _this5.handleAction('confirm');
175
203
  }
176
204
  }
177
205
  })]);
@@ -235,11 +263,16 @@ export default createComponent({
235
263
  }],
236
264
  "attrs": {
237
265
  "role": "dialog",
238
- "aria-labelledby": this.title || message
266
+ "aria-labelledby": this.title || message,
267
+ "tabIndex": 0
239
268
  },
240
269
  "class": [bem([this.theme]), this.className],
241
270
  "style": {
242
271
  width: addUnit(this.width)
272
+ },
273
+ "ref": "dialog",
274
+ "on": {
275
+ "keydown": this.onKeydown
243
276
  }
244
277
  }, [Title, this.genContent(title, messageSlot), this.theme === 'round-button' ? this.genRoundButtons() : this.genButtons()])]);
245
278
  }
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.43';
90
+ var version = '2.12.46';
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];
@@ -74,10 +74,10 @@ export var getSkuComb = function getSkuComb(skuList, selectedSku) {
74
74
  export var getSelectedSkuValues = function getSelectedSkuValues(skuTree, selectedSku) {
75
75
  var normalizedTree = normalizeSkuTree(skuTree);
76
76
  return Object.keys(selectedSku).reduce(function (selectedValues, skuKeyStr) {
77
- var skuValues = normalizedTree[skuKeyStr];
77
+ var skuValues = normalizedTree[skuKeyStr] || [];
78
78
  var skuValueId = selectedSku[skuKeyStr];
79
79
 
80
- if (skuValueId !== UNSELECTED_SKU_VALUE_ID) {
80
+ if (skuValueId !== UNSELECTED_SKU_VALUE_ID && skuValues.length > 0) {
81
81
  var skuValue = skuValues.filter(function (value) {
82
82
  return value.id === skuValueId;
83
83
  })[0];
@@ -70,7 +70,7 @@ export default createComponent({
70
70
  var _this2 = this;
71
71
 
72
72
  this.children.forEach(function (item, index) {
73
- item.nameMatched = (item.name || index) === _this2.value;
73
+ item.nameMatched = item.name === _this2.value || index === _this2.value;
74
74
  });
75
75
  },
76
76
  triggerChange: function triggerChange(active, afterChange) {
@@ -29,23 +29,25 @@ export default createComponent({
29
29
  };
30
30
  },
31
31
  computed: {
32
- routeMatched: function routeMatched() {
33
- var to = this.to,
34
- $route = this.$route;
32
+ active: function active() {
33
+ var routeMode = this.parent.route;
35
34
 
36
- if (to && $route) {
35
+ if (routeMode && '$route' in this) {
36
+ var to = this.to,
37
+ $route = this.$route;
37
38
  var config = isObject(to) ? to : {
38
39
  path: to
39
40
  };
40
41
  return !!$route.matched.find(function (r) {
41
- var pathMatched = config.path === r.path;
42
+ // vue-router 3.x $route.matched[0].path is empty in / and its children paths
43
+ var path = r.path === '' ? '/' : r.path;
44
+ var pathMatched = config.path === path;
42
45
  var nameMatched = isDef(config.name) && config.name === r.name;
43
46
  return pathMatched || nameMatched;
44
47
  });
45
48
  }
46
- },
47
- active: function active() {
48
- return this.parent.route ? this.routeMatched : this.nameMatched;
49
+
50
+ return this.nameMatched;
49
51
  }
50
52
  },
51
53
  methods: {
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
2
  export function isEmail(value) {
3
- var reg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
4
- return reg.test(value);
3
+ var reg = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
4
+ return reg.test(value.trim());
5
5
  }
@@ -108,13 +108,41 @@ var _default = createComponent({
108
108
  }
109
109
  },
110
110
  onOpened: function onOpened() {
111
+ var _this2 = this;
112
+
111
113
  this.$emit('opened');
114
+ this.$nextTick(function () {
115
+ var _this2$$refs$dialog;
116
+
117
+ (_this2$$refs$dialog = _this2.$refs.dialog) == null ? void 0 : _this2$$refs$dialog.focus();
118
+ });
112
119
  },
113
120
  onClosed: function onClosed() {
114
121
  this.$emit('closed');
115
122
  },
123
+ onKeydown: function onKeydown(event) {
124
+ var _this3 = this;
125
+
126
+ if (event.key === 'Escape' || event.key === 'Enter') {
127
+ // skip keyboard events of child elements
128
+ if (event.target !== this.$refs.dialog) {
129
+ return;
130
+ }
131
+
132
+ var onEventType = {
133
+ Enter: this.showConfirmButton ? function () {
134
+ return _this3.handleAction('confirm');
135
+ } : _utils.noop,
136
+ Escape: this.showCancelButton ? function () {
137
+ return _this3.handleAction('cancel');
138
+ } : _utils.noop
139
+ };
140
+ onEventType[event.key]();
141
+ this.$emit('keydown', event);
142
+ }
143
+ },
116
144
  genRoundButtons: function genRoundButtons() {
117
- var _this2 = this;
145
+ var _this4 = this;
118
146
 
119
147
  var h = this.$createElement;
120
148
  return h(_goodsAction.default, {
@@ -130,7 +158,7 @@ var _default = createComponent({
130
158
  "class": bem('cancel'),
131
159
  "on": {
132
160
  "click": function click() {
133
- _this2.handleAction('cancel');
161
+ _this4.handleAction('cancel');
134
162
  }
135
163
  }
136
164
  }), this.showConfirmButton && h(_goodsActionButton.default, {
@@ -144,13 +172,13 @@ var _default = createComponent({
144
172
  "class": bem('confirm'),
145
173
  "on": {
146
174
  "click": function click() {
147
- _this2.handleAction('confirm');
175
+ _this4.handleAction('confirm');
148
176
  }
149
177
  }
150
178
  })]);
151
179
  },
152
180
  genButtons: function genButtons() {
153
- var _this3 = this,
181
+ var _this5 = this,
154
182
  _ref;
155
183
 
156
184
  var h = this.$createElement;
@@ -169,7 +197,7 @@ var _default = createComponent({
169
197
  },
170
198
  "on": {
171
199
  "click": function click() {
172
- _this3.handleAction('cancel');
200
+ _this5.handleAction('cancel');
173
201
  }
174
202
  }
175
203
  }), this.showConfirmButton && h(_button.default, {
@@ -184,7 +212,7 @@ var _default = createComponent({
184
212
  },
185
213
  "on": {
186
214
  "click": function click() {
187
- _this3.handleAction('confirm');
215
+ _this5.handleAction('confirm');
188
216
  }
189
217
  }
190
218
  })]);
@@ -248,11 +276,16 @@ var _default = createComponent({
248
276
  }],
249
277
  "attrs": {
250
278
  "role": "dialog",
251
- "aria-labelledby": this.title || message
279
+ "aria-labelledby": this.title || message,
280
+ "tabIndex": 0
252
281
  },
253
282
  "class": [bem([this.theme]), this.className],
254
283
  "style": {
255
284
  width: (0, _utils.addUnit)(this.width)
285
+ },
286
+ "ref": "dialog",
287
+ "on": {
288
+ "keydown": this.onKeydown
256
289
  }
257
290
  }, [Title, this.genContent(title, messageSlot), this.theme === 'round-button' ? this.genRoundButtons() : this.genButtons()])]);
258
291
  }
package/lib/index.js CHANGED
@@ -361,7 +361,7 @@ exports.TreeSelect = _treeSelect.default;
361
361
  var _uploader = _interopRequireDefault(require("./uploader"));
362
362
 
363
363
  exports.Uploader = _uploader.default;
364
- var version = '2.12.43';
364
+ var version = '2.12.46';
365
365
  exports.version = version;
366
366
 
367
367
  function install(Vue) {
@@ -94,10 +94,10 @@ exports.getSkuComb = getSkuComb;
94
94
  var getSelectedSkuValues = function getSelectedSkuValues(skuTree, selectedSku) {
95
95
  var normalizedTree = normalizeSkuTree(skuTree);
96
96
  return Object.keys(selectedSku).reduce(function (selectedValues, skuKeyStr) {
97
- var skuValues = normalizedTree[skuKeyStr];
97
+ var skuValues = normalizedTree[skuKeyStr] || [];
98
98
  var skuValueId = selectedSku[skuKeyStr];
99
99
 
100
- if (skuValueId !== _constants.UNSELECTED_SKU_VALUE_ID) {
100
+ if (skuValueId !== _constants.UNSELECTED_SKU_VALUE_ID && skuValues.length > 0) {
101
101
  var skuValue = skuValues.filter(function (value) {
102
102
  return value.id === skuValueId;
103
103
  })[0];
@@ -78,7 +78,7 @@ var _default = createComponent({
78
78
  var _this2 = this;
79
79
 
80
80
  this.children.forEach(function (item, index) {
81
- item.nameMatched = (item.name || index) === _this2.value;
81
+ item.nameMatched = item.name === _this2.value || index === _this2.value;
82
82
  });
83
83
  },
84
84
  triggerChange: function triggerChange(active, afterChange) {
@@ -41,23 +41,25 @@ var _default = createComponent({
41
41
  };
42
42
  },
43
43
  computed: {
44
- routeMatched: function routeMatched() {
45
- var to = this.to,
46
- $route = this.$route;
44
+ active: function active() {
45
+ var routeMode = this.parent.route;
47
46
 
48
- if (to && $route) {
47
+ if (routeMode && '$route' in this) {
48
+ var to = this.to,
49
+ $route = this.$route;
49
50
  var config = (0, _utils.isObject)(to) ? to : {
50
51
  path: to
51
52
  };
52
53
  return !!$route.matched.find(function (r) {
53
- var pathMatched = config.path === r.path;
54
+ // vue-router 3.x $route.matched[0].path is empty in / and its children paths
55
+ var path = r.path === '' ? '/' : r.path;
56
+ var pathMatched = config.path === path;
54
57
  var nameMatched = (0, _utils.isDef)(config.name) && config.name === r.name;
55
58
  return pathMatched || nameMatched;
56
59
  });
57
60
  }
58
- },
59
- active: function active() {
60
- return this.parent.route ? this.routeMatched : this.nameMatched;
61
+
62
+ return this.nameMatched;
61
63
  }
62
64
  },
63
65
  methods: {
@@ -5,6 +5,6 @@ exports.isEmail = isEmail;
5
5
 
6
6
  /* eslint-disable */
7
7
  function isEmail(value) {
8
- var reg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
9
- return reg.test(value);
8
+ var reg = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
9
+ return reg.test(value.trim());
10
10
  }
package/lib/vant.js CHANGED
@@ -4936,13 +4936,41 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
4936
4936
  }
4937
4937
  },
4938
4938
  onOpened: function onOpened() {
4939
+ var _this2 = this;
4940
+
4939
4941
  this.$emit('opened');
4942
+ this.$nextTick(function () {
4943
+ var _this2$$refs$dialog;
4944
+
4945
+ (_this2$$refs$dialog = _this2.$refs.dialog) == null ? void 0 : _this2$$refs$dialog.focus();
4946
+ });
4940
4947
  },
4941
4948
  onClosed: function onClosed() {
4942
4949
  this.$emit('closed');
4943
4950
  },
4951
+ onKeydown: function onKeydown(event) {
4952
+ var _this3 = this;
4953
+
4954
+ if (event.key === 'Escape' || event.key === 'Enter') {
4955
+ // skip keyboard events of child elements
4956
+ if (event.target !== this.$refs.dialog) {
4957
+ return;
4958
+ }
4959
+
4960
+ var onEventType = {
4961
+ Enter: this.showConfirmButton ? function () {
4962
+ return _this3.handleAction('confirm');
4963
+ } : utils["i" /* noop */],
4964
+ Escape: this.showCancelButton ? function () {
4965
+ return _this3.handleAction('cancel');
4966
+ } : utils["i" /* noop */]
4967
+ };
4968
+ onEventType[event.key]();
4969
+ this.$emit('keydown', event);
4970
+ }
4971
+ },
4944
4972
  genRoundButtons: function genRoundButtons() {
4945
- var _this2 = this;
4973
+ var _this4 = this;
4946
4974
 
4947
4975
  var h = this.$createElement;
4948
4976
  return h(goods_action, {
@@ -4958,7 +4986,7 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
4958
4986
  "class": Dialog_bem('cancel'),
4959
4987
  "on": {
4960
4988
  "click": function click() {
4961
- _this2.handleAction('cancel');
4989
+ _this4.handleAction('cancel');
4962
4990
  }
4963
4991
  }
4964
4992
  }), this.showConfirmButton && h(goods_action_button, {
@@ -4972,13 +5000,13 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
4972
5000
  "class": Dialog_bem('confirm'),
4973
5001
  "on": {
4974
5002
  "click": function click() {
4975
- _this2.handleAction('confirm');
5003
+ _this4.handleAction('confirm');
4976
5004
  }
4977
5005
  }
4978
5006
  })]);
4979
5007
  },
4980
5008
  genButtons: function genButtons() {
4981
- var _this3 = this,
5009
+ var _this5 = this,
4982
5010
  _ref;
4983
5011
 
4984
5012
  var h = this.$createElement;
@@ -4997,7 +5025,7 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
4997
5025
  },
4998
5026
  "on": {
4999
5027
  "click": function click() {
5000
- _this3.handleAction('cancel');
5028
+ _this5.handleAction('cancel');
5001
5029
  }
5002
5030
  }
5003
5031
  }), this.showConfirmButton && h(es_button, {
@@ -5012,7 +5040,7 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
5012
5040
  },
5013
5041
  "on": {
5014
5042
  "click": function click() {
5015
- _this3.handleAction('confirm');
5043
+ _this5.handleAction('confirm');
5016
5044
  }
5017
5045
  }
5018
5046
  })]);
@@ -5076,11 +5104,16 @@ var Dialog_createNamespace = Object(create["a" /* createNamespace */])('dialog')
5076
5104
  }],
5077
5105
  "attrs": {
5078
5106
  "role": "dialog",
5079
- "aria-labelledby": this.title || message
5107
+ "aria-labelledby": this.title || message,
5108
+ "tabIndex": 0
5080
5109
  },
5081
5110
  "class": [Dialog_bem([this.theme]), this.className],
5082
5111
  "style": {
5083
5112
  width: Object(unit["a" /* addUnit */])(this.width)
5113
+ },
5114
+ "ref": "dialog",
5115
+ "on": {
5116
+ "keydown": this.onKeydown
5084
5117
  }
5085
5118
  }, [Title, this.genContent(title, messageSlot), this.theme === 'round-button' ? this.genRoundButtons() : this.genButtons()])]);
5086
5119
  }
@@ -18064,10 +18097,10 @@ var getSkuComb = function getSkuComb(skuList, selectedSku) {
18064
18097
  var sku_helper_getSelectedSkuValues = function getSelectedSkuValues(skuTree, selectedSku) {
18065
18098
  var normalizedTree = normalizeSkuTree(skuTree);
18066
18099
  return Object.keys(selectedSku).reduce(function (selectedValues, skuKeyStr) {
18067
- var skuValues = normalizedTree[skuKeyStr];
18100
+ var skuValues = normalizedTree[skuKeyStr] || [];
18068
18101
  var skuValueId = selectedSku[skuKeyStr];
18069
18102
 
18070
- if (skuValueId !== UNSELECTED_SKU_VALUE_ID) {
18103
+ if (skuValueId !== UNSELECTED_SKU_VALUE_ID && skuValues.length > 0) {
18071
18104
  var skuValue = skuValues.filter(function (value) {
18072
18105
  return value.id === skuValueId;
18073
18106
  })[0];
@@ -19037,8 +19070,8 @@ var QUOTA_LIMIT = LIMIT_TYPE.QUOTA_LIMIT,
19037
19070
  // CONCATENATED MODULE: ./es/utils/validate/email.js
19038
19071
  /* eslint-disable */
19039
19072
  function isEmail(value) {
19040
- var reg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
19041
- return reg.test(value);
19073
+ var reg = /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/;
19074
+ return reg.test(value.trim());
19042
19075
  }
19043
19076
  // CONCATENATED MODULE: ./es/uploader/utils.js
19044
19077
 
@@ -21830,7 +21863,7 @@ var tabbar_createNamespace = Object(create["a" /* createNamespace */])('tabbar')
21830
21863
  var _this2 = this;
21831
21864
 
21832
21865
  this.children.forEach(function (item, index) {
21833
- item.nameMatched = (item.name || index) === _this2.value;
21866
+ item.nameMatched = item.name === _this2.value || index === _this2.value;
21834
21867
  });
21835
21868
  },
21836
21869
  triggerChange: function triggerChange(active, afterChange) {
@@ -21911,23 +21944,25 @@ var tabbar_item_createNamespace = Object(create["a" /* createNamespace */])('tab
21911
21944
  };
21912
21945
  },
21913
21946
  computed: {
21914
- routeMatched: function routeMatched() {
21915
- var to = this.to,
21916
- $route = this.$route;
21947
+ active: function active() {
21948
+ var routeMode = this.parent.route;
21917
21949
 
21918
- if (to && $route) {
21950
+ if (routeMode && '$route' in this) {
21951
+ var to = this.to,
21952
+ $route = this.$route;
21919
21953
  var config = Object(utils["f" /* isObject */])(to) ? to : {
21920
21954
  path: to
21921
21955
  };
21922
21956
  return !!$route.matched.find(function (r) {
21923
- var pathMatched = config.path === r.path;
21957
+ // vue-router 3.x $route.matched[0].path is empty in / and its children paths
21958
+ var path = r.path === '' ? '/' : r.path;
21959
+ var pathMatched = config.path === path;
21924
21960
  var nameMatched = Object(utils["c" /* isDef */])(config.name) && config.name === r.name;
21925
21961
  return pathMatched || nameMatched;
21926
21962
  });
21927
21963
  }
21928
- },
21929
- active: function active() {
21930
- return this.parent.route ? this.routeMatched : this.nameMatched;
21964
+
21965
+ return this.nameMatched;
21931
21966
  }
21932
21967
  },
21933
21968
  methods: {
@@ -22226,7 +22261,7 @@ TreeSelect.props = {
22226
22261
 
22227
22262
 
22228
22263
 
22229
- var version = '2.12.43';
22264
+ var version = '2.12.46';
22230
22265
 
22231
22266
  function install(Vue) {
22232
22267
  var components = [action_sheet, address_edit, address_list, es_area, badge, es_button, calendar, card, cascader, cell, cell_group, es_checkbox, checkbox_group, circle, col, collapse, collapse_item, contact_card, contact_edit, contact_list, count_down, es_coupon, coupon_cell, coupon_list, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, es_form, goods_action, goods_action_button, goods_action_icon, grid, grid_item, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, es_list, es_loading, locale["a" /* default */], nav_bar, notice_bar, notify, number_keyboard, es_overlay, pagination, panel, password_input, es_picker, popover, popup, es_progress, pull_refresh, es_radio, radio_group, es_rate, row, search, share_sheet, sidebar, sidebar_item, skeleton, es_sku, slider, es_step, stepper, steps, es_sticky, submit_bar, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, tabs, es_tag, es_toast, tree_select, uploader];