mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
parent
59389a8fd7
commit
6ecb25d756
@ -183,9 +183,9 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 属性未全选
|
// 属性未全选
|
||||||
return !this.propList.some(
|
return !this.propList
|
||||||
(it) => (this.selectedProp[it.k_id] || []).length < 1
|
.filter((i) => i.is_necessary !== false)
|
||||||
);
|
.some((i) => (this.selectedProp[i.k_id] || []).length === 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
isSkuEmpty() {
|
isSkuEmpty() {
|
||||||
|
@ -179,6 +179,24 @@ export function getSkuData(largeImageMode = false) {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
k: '非必选属性',
|
||||||
|
k_id: 125,
|
||||||
|
is_multiple: true,
|
||||||
|
is_necessary: false,
|
||||||
|
v: [
|
||||||
|
{
|
||||||
|
id: 1234,
|
||||||
|
name: '属性1',
|
||||||
|
price: 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 1235,
|
||||||
|
name: '属性2',
|
||||||
|
price: 4,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
1
types/sku.d.ts
vendored
1
types/sku.d.ts
vendored
@ -32,6 +32,7 @@ export type SkuPropItemData = {
|
|||||||
v: SkuPropItemValueData[];
|
v: SkuPropItemValueData[];
|
||||||
k_id: number;
|
k_id: number;
|
||||||
is_multiple?: boolean;
|
is_multiple?: boolean;
|
||||||
|
is_necessary?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SkuPropItemValueData = {
|
export type SkuPropItemValueData = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user