vant 2.12.42 → 2.12.45

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
@@ -44,11 +44,11 @@
44
44
  ## Install
45
45
 
46
46
  ```bash
47
- # Install Vant 2 for Vue 2 project
47
+ # Install latest Vant for Vue 3 project
48
48
  npm i vant -S
49
49
 
50
- # Install Vant 3 for Vue 3 project
51
- npm i vant@next -S
50
+ # Install Vant 2 for Vue 2 project
51
+ npm i vant@latest-v2 -S
52
52
  ```
53
53
 
54
54
  ## Quickstart
@@ -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
@@ -28,7 +28,7 @@
28
28
 
29
29
  Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源,已持续维护 4 年时间。Vant 对内承载了有赞所有核心业务,对外服务十多万开发者,是业界主流的移动端组件库之一。
30
30
 
31
- 目前 Vant 官方提供了 [Vue 2 版本](https://vant-contrib.gitee.io/vant)、[Vue 3 版本](https://vant-contrib.gitee.io/vant/v3)和[微信小程序版本](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/mxdi9i7/vant-react)。
32
32
 
33
33
  ## 特性
34
34
 
@@ -47,11 +47,11 @@ Vant 是**有赞前端团队**开源的移动端组件库,于 2017 年开源
47
47
  ## 安装
48
48
 
49
49
  ```bash
50
- # Vue 2 项目,安装 Vant 2
50
+ # Vue 3 项目,安装最新版 Vant:
51
51
  npm i vant -S
52
52
 
53
- # Vue 3 项目,安装 Vant 3
54
- npm i vant@next -S
53
+ # Vue 2 项目,安装 Vant 2
54
+ npm i vant@latest-v2 -S
55
55
  ```
56
56
 
57
57
  ## 快速上手
@@ -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,17 @@
1
+ ### [v2.12.45](https://github.com/youzan/vant/compare/v2.12.44...v2.12.45)
2
+
3
+ `2022-03-18`
4
+
5
+ **Bug Fixes**
6
+
7
+ - Sku: 修复特殊情况下 skuTree 为空数组时导致的语法报错问题 [#10390](https://github.com/youzan/vant/issues/10390)
8
+
9
+ **Document**
10
+
11
+ - add @formily/vant to README.md and home.md [#10323](https://github.com/youzan/vant/issues/10323)
12
+ - fix [167e99](https://github.com/youzan/vant/commit/167e99cef84b25fdd46929e4fc0324c37c6a135c)
13
+ - changelog: 2.12.44 [b9035d](https://github.com/youzan/vant/commit/b9035d69f0d72aace66e5fb6890a9d0097552de9)
14
+
15
+ **Feature**
16
+
17
+ - Dialog: support keyboard events [#10359](https://github.com/youzan/vant/issues/10359)
@@ -18,6 +18,10 @@ export default createComponent({
18
18
  props: _extends({}, cellProps, {
19
19
  name: [Number, String],
20
20
  disabled: Boolean,
21
+ lazyRender: {
22
+ type: Boolean,
23
+ default: true
24
+ },
21
25
  isLink: {
22
26
  type: Boolean,
23
27
  default: true
@@ -169,7 +173,7 @@ export default createComponent({
169
173
  genContent: function genContent() {
170
174
  var h = this.$createElement;
171
175
 
172
- if (this.inited) {
176
+ if (this.inited || !this.lazyRender) {
173
177
  return h("div", {
174
178
  "directives": [{
175
179
  name: "show",
@@ -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.42';
90
+ var version = '2.12.45';
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];
@@ -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
  }
@@ -31,6 +31,10 @@ var _default = createComponent({
31
31
  props: (0, _extends2.default)({}, _shared.cellProps, {
32
32
  name: [Number, String],
33
33
  disabled: Boolean,
34
+ lazyRender: {
35
+ type: Boolean,
36
+ default: true
37
+ },
34
38
  isLink: {
35
39
  type: Boolean,
36
40
  default: true
@@ -182,7 +186,7 @@ var _default = createComponent({
182
186
  genContent: function genContent() {
183
187
  var h = this.$createElement;
184
188
 
185
- if (this.inited) {
189
+ if (this.inited || !this.lazyRender) {
186
190
  return h("div", {
187
191
  "directives": [{
188
192
  name: "show",
@@ -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.42';
364
+ var version = '2.12.45';
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];
@@ -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
  }
@@ -9582,6 +9615,10 @@ var CELL_SLOTS = ['title', 'icon', 'right-icon'];
9582
9615
  props: _extends({}, cellProps, {
9583
9616
  name: [Number, String],
9584
9617
  disabled: Boolean,
9618
+ lazyRender: {
9619
+ type: Boolean,
9620
+ default: true
9621
+ },
9585
9622
  isLink: {
9586
9623
  type: Boolean,
9587
9624
  default: true
@@ -9730,7 +9767,7 @@ var CELL_SLOTS = ['title', 'icon', 'right-icon'];
9730
9767
  genContent: function genContent() {
9731
9768
  var h = this.$createElement;
9732
9769
 
9733
- if (this.inited) {
9770
+ if (this.inited || !this.lazyRender) {
9734
9771
  return h("div", {
9735
9772
  "directives": [{
9736
9773
  name: "show",
@@ -18060,10 +18097,10 @@ var getSkuComb = function getSkuComb(skuList, selectedSku) {
18060
18097
  var sku_helper_getSelectedSkuValues = function getSelectedSkuValues(skuTree, selectedSku) {
18061
18098
  var normalizedTree = normalizeSkuTree(skuTree);
18062
18099
  return Object.keys(selectedSku).reduce(function (selectedValues, skuKeyStr) {
18063
- var skuValues = normalizedTree[skuKeyStr];
18100
+ var skuValues = normalizedTree[skuKeyStr] || [];
18064
18101
  var skuValueId = selectedSku[skuKeyStr];
18065
18102
 
18066
- if (skuValueId !== UNSELECTED_SKU_VALUE_ID) {
18103
+ if (skuValueId !== UNSELECTED_SKU_VALUE_ID && skuValues.length > 0) {
18067
18104
  var skuValue = skuValues.filter(function (value) {
18068
18105
  return value.id === skuValueId;
18069
18106
  })[0];
@@ -19033,8 +19070,8 @@ var QUOTA_LIMIT = LIMIT_TYPE.QUOTA_LIMIT,
19033
19070
  // CONCATENATED MODULE: ./es/utils/validate/email.js
19034
19071
  /* eslint-disable */
19035
19072
  function isEmail(value) {
19036
- 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;
19037
- 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());
19038
19075
  }
19039
19076
  // CONCATENATED MODULE: ./es/uploader/utils.js
19040
19077
 
@@ -22222,7 +22259,7 @@ TreeSelect.props = {
22222
22259
 
22223
22260
 
22224
22261
 
22225
- var version = '2.12.42';
22262
+ var version = '2.12.45';
22226
22263
 
22227
22264
  function install(Vue) {
22228
22265
  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];