docs(Sku): add docs and change the usage of properties (#5563)

This commit is contained in:
Waiter
2020-01-14 17:08:58 +08:00
committed by neverland
parent 0223258a01
commit 89900bbcfd
6 changed files with 206 additions and 62 deletions
+51 -51
View File
@@ -179,58 +179,58 @@ export const skuData = {
required: 0
}
],
properties: [
{
k_id: 123,
k: '加冰',
v: [
{
id: 1222,
name: '少冰',
price: 1,
},
{
id: 1223,
name: '去冰',
price: 1,
}
],
},
{
k_id: 133,
k: '不知道',
v: [
{
id: 1244,
name: '什么',
price: 9,
}
],
},
{
k_id: 124,
k: '加料',
is_multiple: true,
v: [
{
id: 1224,
name: '布丁',
price: 3,
},
{
id: 1225,
name: '波霸',
price: 4,
},
{
id: 1226,
name: '珍珠',
price: 5,
}
],
}
],
},
properties: [
{
k_id: 123,
k: '加冰',
v: [
{
id: 1222,
name: '少冰',
price: 1,
},
{
id: 1223,
name: '去冰',
price: 1,
}
],
},
{
k_id: 133,
k: '打包',
v: [
{
id: 1244,
name: '分开打包',
price: 9,
}
],
},
{
k_id: 124,
k: '加料',
is_multiple: true,
v: [
{
id: 1224,
name: '布丁',
price: 3,
},
{
id: 1225,
name: '波霸',
price: 4,
},
{
id: 1226,
name: '珍珠',
price: 5,
}
],
}
],
};
export const initialSku = {
+4
View File
@@ -15,6 +15,7 @@
:close-on-click-overlay="closeOnClickOverlay"
:message-config="messageConfig"
:custom-sku-validator="customSkuValidator"
:properties="skuData.properties"
disable-stepper-input
reset-stepper-on-hide
safe-area-inset-bottom
@@ -46,6 +47,7 @@
:start-sale-num="skuData.start_sale_num"
:custom-stepper-config="customStepperConfig"
:message-config="messageConfig"
:properties="skuData.properties"
hide-quota-text
safe-area-inset-bottom
@buy-clicked="onBuyClicked"
@@ -76,6 +78,7 @@
:custom-stepper-config="customStepperConfig"
:message-config="messageConfig"
:show-soldout-sku="false"
:properties="skuData.properties"
hide-quota-text
safe-area-inset-bottom
@buy-clicked="onBuyClicked"
@@ -103,6 +106,7 @@
:quota="skuData.quota"
:quota-used="skuData.quota_used"
:start-sale-num="skuData.start_sale_num"
:properties="skuData.properties"
show-add-cart-btn
reset-stepper-on-hide
safe-area-inset-bottom