vant 2.12.51 → 2.12.53
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/es/action-sheet/index.css +1 -1
- package/es/action-sheet/index.less +1 -0
- package/es/index.js +1 -1
- package/es/sku/Sku.js +12 -3
- package/es/sku/components/SkuRowPropItem.js +5 -1
- package/es/uploader/index.js +5 -1
- package/lib/action-sheet/index.css +1 -1
- package/lib/action-sheet/index.less +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/sku/Sku.js +12 -3
- package/lib/sku/components/SkuRowPropItem.js +5 -1
- package/lib/uploader/index.js +5 -1
- package/lib/vant.js +23 -6
- package/lib/vant.min.js +2 -2
- package/package.json +1 -1
- package/vetur/attributes.json +380 -380
- package/vetur/tags.json +135 -135
- package/vetur/web-types.json +1155 -1155
- package/changelog.generated.md +0 -11
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.
|
364
|
+
var version = '2.12.53';
|
365
365
|
exports.version = version;
|
366
366
|
|
367
367
|
function install(Vue) {
|
package/lib/sku/Sku.js
CHANGED
@@ -424,10 +424,18 @@ var _default2 = createComponent({
|
|
424
424
|
k_id = item.k_id;
|
425
425
|
var isHasConfigPrice = v.some(function (i) {
|
426
426
|
return +i.price !== 0;
|
427
|
-
});
|
427
|
+
}); // 没有加价属性
|
428
428
|
|
429
429
|
if (!isHasConfigPrice) {
|
430
|
-
|
430
|
+
// 找到第一个不被禁用的属性
|
431
|
+
// 历史如果没有 text_status 字段的,就相当于沿用直接原来的逻辑取第一个属性
|
432
|
+
var firstEnableProp = v.find(function (prop) {
|
433
|
+
return prop.text_status !== 0;
|
434
|
+
});
|
435
|
+
|
436
|
+
if (firstEnableProp) {
|
437
|
+
_this3.selectedProp[k_id] = [firstEnableProp.id];
|
438
|
+
}
|
431
439
|
}
|
432
440
|
}
|
433
441
|
});
|
@@ -722,7 +730,8 @@ var _default2 = createComponent({
|
|
722
730
|
"skuKeyStr": skuTreeItem.k_id + '',
|
723
731
|
"selectedProp": selectedProp,
|
724
732
|
"skuEventBus": skuEventBus,
|
725
|
-
"multiple": skuTreeItem.is_multiple
|
733
|
+
"multiple": skuTreeItem.is_multiple,
|
734
|
+
"disabled": skuValue.text_status === 0
|
726
735
|
}
|
727
736
|
});
|
728
737
|
})]);
|
@@ -18,7 +18,8 @@ var _default = createComponent({
|
|
18
18
|
skuKeyStr: String,
|
19
19
|
skuEventBus: Object,
|
20
20
|
selectedProp: Object,
|
21
|
-
multiple: Boolean
|
21
|
+
multiple: Boolean,
|
22
|
+
disabled: Boolean
|
22
23
|
},
|
23
24
|
computed: {
|
24
25
|
choosed: function choosed() {
|
@@ -35,6 +36,7 @@ var _default = createComponent({
|
|
35
36
|
},
|
36
37
|
methods: {
|
37
38
|
onSelect: function onSelect() {
|
39
|
+
if (this.disabled) return;
|
38
40
|
this.skuEventBus.$emit('sku:propSelect', (0, _extends2.default)({}, this.skuValue, {
|
39
41
|
skuKeyStr: this.skuKeyStr,
|
40
42
|
multiple: this.multiple
|
@@ -46,6 +48,8 @@ var _default = createComponent({
|
|
46
48
|
return h("span", {
|
47
49
|
"class": ['van-sku-row__item', {
|
48
50
|
'van-sku-row__item--active': this.choosed
|
51
|
+
}, {
|
52
|
+
'van-sku-row__item--disabled': this.disabled
|
49
53
|
}],
|
50
54
|
"on": {
|
51
55
|
"click": this.onSelect
|
package/lib/uploader/index.js
CHANGED
@@ -423,7 +423,7 @@ var _default2 = createComponent({
|
|
423
423
|
genUpload: function genUpload() {
|
424
424
|
var h = this.$createElement;
|
425
425
|
|
426
|
-
if (this.fileList.length >= this.maxCount
|
426
|
+
if (this.fileList.length >= this.maxCount) {
|
427
427
|
return;
|
428
428
|
}
|
429
429
|
|
@@ -462,6 +462,10 @@ var _default2 = createComponent({
|
|
462
462
|
}
|
463
463
|
|
464
464
|
return h("div", {
|
465
|
+
"directives": [{
|
466
|
+
name: "show",
|
467
|
+
value: this.showUpload
|
468
|
+
}],
|
465
469
|
"class": bem('upload', {
|
466
470
|
readonly: this.readonly
|
467
471
|
}),
|
package/lib/vant.js
CHANGED
@@ -19400,7 +19400,8 @@ var SkuRowPropItem_createNamespace = Object(create["a" /* createNamespace */])('
|
|
19400
19400
|
skuKeyStr: String,
|
19401
19401
|
skuEventBus: Object,
|
19402
19402
|
selectedProp: Object,
|
19403
|
-
multiple: Boolean
|
19403
|
+
multiple: Boolean,
|
19404
|
+
disabled: Boolean
|
19404
19405
|
},
|
19405
19406
|
computed: {
|
19406
19407
|
choosed: function choosed() {
|
@@ -19417,6 +19418,7 @@ var SkuRowPropItem_createNamespace = Object(create["a" /* createNamespace */])('
|
|
19417
19418
|
},
|
19418
19419
|
methods: {
|
19419
19420
|
onSelect: function onSelect() {
|
19421
|
+
if (this.disabled) return;
|
19420
19422
|
this.skuEventBus.$emit('sku:propSelect', _extends({}, this.skuValue, {
|
19421
19423
|
skuKeyStr: this.skuKeyStr,
|
19422
19424
|
multiple: this.multiple
|
@@ -19428,6 +19430,8 @@ var SkuRowPropItem_createNamespace = Object(create["a" /* createNamespace */])('
|
|
19428
19430
|
return h("span", {
|
19429
19431
|
"class": ['van-sku-row__item', {
|
19430
19432
|
'van-sku-row__item--active': this.choosed
|
19433
|
+
}, {
|
19434
|
+
'van-sku-row__item--disabled': this.disabled
|
19431
19435
|
}],
|
19432
19436
|
"on": {
|
19433
19437
|
"click": this.onSelect
|
@@ -20453,7 +20457,7 @@ var uploader_createNamespace = Object(create["a" /* createNamespace */])('upload
|
|
20453
20457
|
genUpload: function genUpload() {
|
20454
20458
|
var h = this.$createElement;
|
20455
20459
|
|
20456
|
-
if (this.fileList.length >= this.maxCount
|
20460
|
+
if (this.fileList.length >= this.maxCount) {
|
20457
20461
|
return;
|
20458
20462
|
}
|
20459
20463
|
|
@@ -20492,6 +20496,10 @@ var uploader_createNamespace = Object(create["a" /* createNamespace */])('upload
|
|
20492
20496
|
}
|
20493
20497
|
|
20494
20498
|
return h("div", {
|
20499
|
+
"directives": [{
|
20500
|
+
name: "show",
|
20501
|
+
value: this.showUpload
|
20502
|
+
}],
|
20495
20503
|
"class": uploader_bem('upload', {
|
20496
20504
|
readonly: this.readonly
|
20497
20505
|
}),
|
@@ -21439,10 +21447,18 @@ var Sku_QUOTA_LIMIT = LIMIT_TYPE.QUOTA_LIMIT;
|
|
21439
21447
|
k_id = item.k_id;
|
21440
21448
|
var isHasConfigPrice = v.some(function (i) {
|
21441
21449
|
return +i.price !== 0;
|
21442
|
-
});
|
21450
|
+
}); // 没有加价属性
|
21443
21451
|
|
21444
21452
|
if (!isHasConfigPrice) {
|
21445
|
-
|
21453
|
+
// 找到第一个不被禁用的属性
|
21454
|
+
// 历史如果没有 text_status 字段的,就相当于沿用直接原来的逻辑取第一个属性
|
21455
|
+
var firstEnableProp = v.find(function (prop) {
|
21456
|
+
return prop.text_status !== 0;
|
21457
|
+
});
|
21458
|
+
|
21459
|
+
if (firstEnableProp) {
|
21460
|
+
_this3.selectedProp[k_id] = [firstEnableProp.id];
|
21461
|
+
}
|
21446
21462
|
}
|
21447
21463
|
}
|
21448
21464
|
});
|
@@ -21738,7 +21754,8 @@ var Sku_QUOTA_LIMIT = LIMIT_TYPE.QUOTA_LIMIT;
|
|
21738
21754
|
"skuKeyStr": skuTreeItem.k_id + '',
|
21739
21755
|
"selectedProp": selectedProp,
|
21740
21756
|
"skuEventBus": skuEventBus,
|
21741
|
-
"multiple": skuTreeItem.is_multiple
|
21757
|
+
"multiple": skuTreeItem.is_multiple,
|
21758
|
+
"disabled": skuValue.text_status === 0
|
21742
21759
|
}
|
21743
21760
|
});
|
21744
21761
|
})]);
|
@@ -23176,7 +23193,7 @@ TreeSelect.props = {
|
|
23176
23193
|
|
23177
23194
|
|
23178
23195
|
|
23179
|
-
var version = '2.12.
|
23196
|
+
var version = '2.12.53';
|
23180
23197
|
|
23181
23198
|
function install(Vue) {
|
23182
23199
|
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];
|