Commit d926bda4 by fuqiang

【商家端】商品详情

parent 9b443269
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<el-table style="align-self: flex-start;" :data="form.skus" size="mini"> <el-table style="align-self: flex-start;" :data="form.skus" size="mini">
<el-table-column v-for="(spec, index) in specs" :key="index" :label="spec.specName" min-width="120"> <el-table-column v-for="(spec, index) in specs" :key="index" :label="spec.specName" min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{titleValue(spec, scope.row)}}</span> <span> {{titleValue(spec, scope.row)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="价格" min-width="160"> <el-table-column label="价格" min-width="160">
...@@ -189,8 +189,8 @@ ...@@ -189,8 +189,8 @@
titleValue() { titleValue() {
return (spec, row) => { return (spec, row) => {
for (let s of row.specs) { for (let s of row.specs) {
if (s.id == spec.specId) { if (s.specId == spec.specId) {
return s.specName return s.name
} }
} }
return "未知" return "未知"
...@@ -228,8 +228,9 @@ ...@@ -228,8 +228,9 @@
if(skus && skus.length > 0) { if(skus && skus.length > 0) {
let specs = skus[0].specs.map(r => { let specs = skus[0].specs.map(r => {
return { return {
specId: r.id, name: r.name,
specName: r.name specId: r.specId,
specName: r.specName
} }
}) })
this.specs = specs this.specs = specs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment