vant 2.12.52 → 2.12.54
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/changelog.generated.md +12 -0
- package/es/index.js +1 -1
- package/es/popover/index.js +14 -2
- package/es/search/index.css +1 -1
- package/es/search/index.less +1 -1
- package/es/sku/Sku.js +12 -3
- package/es/sku/components/SkuRowPropItem.js +5 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/popover/index.js +13 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.less +1 -1
- package/lib/sku/Sku.js +12 -3
- package/lib/sku/components/SkuRowPropItem.js +5 -1
- package/lib/vant.js +31 -6
- package/lib/vant.min.js +2 -2
- package/package.json +1 -1
- package/vetur/attributes.json +316 -316
- package/vetur/tags.json +106 -106
- package/vetur/web-types.json +1008 -1008
@@ -0,0 +1,12 @@
|
|
1
|
+
### [v2.12.54](https://github.com/vant-ui/vant/compare/v2.12.53...v2.12.54)
|
2
|
+
|
3
|
+
`2023-02-11`
|
4
|
+
|
5
|
+
**Bug Fixes**
|
6
|
+
|
7
|
+
- popover: location update after transition [#11558](https://github.com/vant-ui/vant/issues/11558)
|
8
|
+
- Search: @search-left-icon-color invalid & docs update [#11299](https://github.com/vant-ui/vant/issues/11299)
|
9
|
+
|
10
|
+
**Document**
|
11
|
+
|
12
|
+
- changelog: vant@2.12.53 [#11262](https://github.com/vant-ui/vant/issues/11262)
|
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.54';
|
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/popover/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import { createPopper as _createPopper, offsetModifier } from '@vant/popperjs';
|
3
|
-
import { createNamespace } from '../utils';
|
3
|
+
import { createNamespace, isServer } from '../utils';
|
4
4
|
import { BORDER_BOTTOM } from '../utils/constant'; // Mixins
|
5
5
|
|
6
6
|
import { ClickOutsideMixin } from '../mixins/click-outside'; // Components
|
@@ -59,13 +59,18 @@ export default createComponent({
|
|
59
59
|
},
|
60
60
|
beforeDestroy: function beforeDestroy() {
|
61
61
|
if (this.popper) {
|
62
|
+
if (!isServer) {
|
63
|
+
window.removeEventListener('animationend', this.updateLocation);
|
64
|
+
window.removeEventListener('transitionend', this.updateLocation);
|
65
|
+
}
|
66
|
+
|
62
67
|
this.popper.destroy();
|
63
68
|
this.popper = null;
|
64
69
|
}
|
65
70
|
},
|
66
71
|
methods: {
|
67
72
|
createPopper: function createPopper() {
|
68
|
-
|
73
|
+
var popper = _createPopper(this.$refs.wrapper, this.$refs.popover.$el, {
|
69
74
|
placement: this.placement,
|
70
75
|
modifiers: [{
|
71
76
|
name: 'computeStyles',
|
@@ -79,6 +84,13 @@ export default createComponent({
|
|
79
84
|
}
|
80
85
|
})]
|
81
86
|
});
|
87
|
+
|
88
|
+
if (!isServer) {
|
89
|
+
window.addEventListener('animationend', this.updateLocation);
|
90
|
+
window.addEventListener('transitionend', this.updateLocation);
|
91
|
+
}
|
92
|
+
|
93
|
+
return popper;
|
82
94
|
},
|
83
95
|
updateLocation: function updateLocation() {
|
84
96
|
var _this = this;
|
package/es/search/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.van-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;background-color:#fff}.van-search__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding-left:12px;background-color:#f7f8fa;border-radius:2px}.van-search__content--round{border-radius:999px}.van-search__label{padding:0 5px;color:#323233;font-size:14px;line-height:34px}.van-search .van-cell{-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:5px 8px 5px 0;background-color:transparent}.van-search .van-
|
1
|
+
.van-search{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;box-sizing:border-box;padding:10px 12px;background-color:#fff}.van-search__content{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding-left:12px;background-color:#f7f8fa;border-radius:2px}.van-search__content--round{border-radius:999px}.van-search__label{padding:0 5px;color:#323233;font-size:14px;line-height:34px}.van-search .van-cell{-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:5px 8px 5px 0;background-color:transparent}.van-search .van-cell .van-field__left-icon{color:#969799}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:0 8px;color:#323233;font-size:14px;line-height:34px;cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:#f2f3f5}
|
package/es/search/index.less
CHANGED
package/es/sku/Sku.js
CHANGED
@@ -400,10 +400,18 @@ export default createComponent({
|
|
400
400
|
k_id = item.k_id;
|
401
401
|
var isHasConfigPrice = v.some(function (i) {
|
402
402
|
return +i.price !== 0;
|
403
|
-
});
|
403
|
+
}); // 没有加价属性
|
404
404
|
|
405
405
|
if (!isHasConfigPrice) {
|
406
|
-
|
406
|
+
// 找到第一个不被禁用的属性
|
407
|
+
// 历史如果没有 text_status 字段的,就相当于沿用直接原来的逻辑取第一个属性
|
408
|
+
var firstEnableProp = v.find(function (prop) {
|
409
|
+
return prop.text_status !== 0;
|
410
|
+
});
|
411
|
+
|
412
|
+
if (firstEnableProp) {
|
413
|
+
_this3.selectedProp[k_id] = [firstEnableProp.id];
|
414
|
+
}
|
407
415
|
}
|
408
416
|
}
|
409
417
|
});
|
@@ -699,7 +707,8 @@ export default createComponent({
|
|
699
707
|
"skuKeyStr": skuTreeItem.k_id + '',
|
700
708
|
"selectedProp": selectedProp,
|
701
709
|
"skuEventBus": skuEventBus,
|
702
|
-
"multiple": skuTreeItem.is_multiple
|
710
|
+
"multiple": skuTreeItem.is_multiple,
|
711
|
+
"disabled": skuValue.text_status === 0
|
703
712
|
}
|
704
713
|
});
|
705
714
|
})]);
|
@@ -10,7 +10,8 @@ export default createComponent({
|
|
10
10
|
skuKeyStr: String,
|
11
11
|
skuEventBus: Object,
|
12
12
|
selectedProp: Object,
|
13
|
-
multiple: Boolean
|
13
|
+
multiple: Boolean,
|
14
|
+
disabled: Boolean
|
14
15
|
},
|
15
16
|
computed: {
|
16
17
|
choosed: function choosed() {
|
@@ -27,6 +28,7 @@ export default createComponent({
|
|
27
28
|
},
|
28
29
|
methods: {
|
29
30
|
onSelect: function onSelect() {
|
31
|
+
if (this.disabled) return;
|
30
32
|
this.skuEventBus.$emit('sku:propSelect', _extends({}, this.skuValue, {
|
31
33
|
skuKeyStr: this.skuKeyStr,
|
32
34
|
multiple: this.multiple
|
@@ -38,6 +40,8 @@ export default createComponent({
|
|
38
40
|
return h("span", {
|
39
41
|
"class": ['van-sku-row__item', {
|
40
42
|
'van-sku-row__item--active': this.choosed
|
43
|
+
}, {
|
44
|
+
'van-sku-row__item--disabled': this.disabled
|
41
45
|
}],
|
42
46
|
"on": {
|
43
47
|
"click": this.onSelect
|