vant 2.12.47 → 2.12.48

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.
@@ -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/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.47';
90
+ var version = '2.12.48';
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];
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
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,
@@ -4,7 +4,7 @@ function isWindow(val) {
4
4
  // https://github.com/youzan/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;
@@ -189,7 +189,8 @@ var _default = createComponent({
189
189
  "attrs": {
190
190
  "size": "large",
191
191
  "loading": this.loading.cancel,
192
- "text": this.cancelButtonText || t('cancel')
192
+ "text": this.cancelButtonText || t('cancel'),
193
+ "nativeType": "button"
193
194
  },
194
195
  "class": bem('cancel'),
195
196
  "style": {
@@ -204,7 +205,8 @@ var _default = createComponent({
204
205
  "attrs": {
205
206
  "size": "large",
206
207
  "loading": this.loading.confirm,
207
- "text": this.confirmButtonText || t('confirm')
208
+ "text": this.confirmButtonText || t('confirm'),
209
+ "nativeType": "button"
208
210
  },
209
211
  "class": [bem('confirm'), (_ref = {}, _ref[_constant.BORDER_LEFT] = multiple, _ref)],
210
212
  "style": {
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.47';
364
+ var version = '2.12.48';
365
365
  exports.version = version;
366
366
 
367
367
  function install(Vue) {
package/lib/step/index.js CHANGED
@@ -33,15 +33,27 @@ var _default = createComponent({
33
33
  return this.status === 'process';
34
34
  },
35
35
  lineStyle: function lineStyle() {
36
- if (this.status === 'finish') {
36
+ var _this$parent = this.parent,
37
+ activeColor = _this$parent.activeColor,
38
+ inactiveColor = _this$parent.inactiveColor,
39
+ center = _this$parent.center,
40
+ direction = _this$parent.direction;
41
+ var style = {
42
+ background: this.status === 'finish' ? activeColor : inactiveColor
43
+ };
44
+
45
+ if (center && direction === 'vertical') {
46
+ style.top = '50%';
47
+ }
48
+
49
+ return style;
50
+ },
51
+ circleContainerStyle: function circleContainerStyle() {
52
+ if (this.parent.center && this.parent.direction === 'vertical') {
37
53
  return {
38
- background: this.parent.activeColor
54
+ top: '50%'
39
55
  };
40
56
  }
41
-
42
- return {
43
- background: this.parent.inactiveColor
44
- };
45
57
  },
46
58
  titleStyle: function titleStyle() {
47
59
  if (this.active) {
@@ -60,12 +72,12 @@ var _default = createComponent({
60
72
  methods: {
61
73
  genCircle: function genCircle() {
62
74
  var h = this.$createElement;
63
- var _this$parent = this.parent,
64
- activeIcon = _this$parent.activeIcon,
65
- iconPrefix = _this$parent.iconPrefix,
66
- activeColor = _this$parent.activeColor,
67
- finishIcon = _this$parent.finishIcon,
68
- inactiveIcon = _this$parent.inactiveIcon;
75
+ var _this$parent2 = this.parent,
76
+ activeIcon = _this$parent2.activeIcon,
77
+ iconPrefix = _this$parent2.iconPrefix,
78
+ activeColor = _this$parent2.activeColor,
79
+ finishIcon = _this$parent2.finishIcon,
80
+ inactiveIcon = _this$parent2.inactiveIcon;
69
81
 
70
82
  if (this.active) {
71
83
  return this.slots('active-icon') || h(_icon.default, {
@@ -133,7 +145,8 @@ var _default = createComponent({
133
145
  "class": bem('circle-container'),
134
146
  "on": {
135
147
  "click": this.onClickStep
136
- }
148
+ },
149
+ "style": this.circleContainerStyle
137
150
  }, [this.genCircle()]), h("div", {
138
151
  "class": bem('line'),
139
152
  "style": this.lineStyle
@@ -14,6 +14,7 @@ var _createNamespace = (0, _utils.createNamespace)('steps'),
14
14
  var _default = createComponent({
15
15
  mixins: [(0, _relation.ParentMixin)('vanSteps')],
16
16
  props: {
17
+ center: Boolean,
17
18
  iconPrefix: String,
18
19
  finishIcon: String,
19
20
  activeColor: String,
@@ -16,7 +16,7 @@ function isWindow(val) {
16
16
  // https://github.com/youzan/vant/issues/3823
17
17
 
18
18
 
19
- var overflowScrollReg = /scroll|auto/i;
19
+ var overflowScrollReg = /scroll|auto|overlay/i;
20
20
 
21
21
  function getScroller(el, root) {
22
22
  if (root === void 0) {