修复尺码表
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<!-- 产品尺码表:5 列 × 4 行,交替行背景 -->
|
||||
<!-- 产品尺码表:列数由后端 columns 动态决定(首列固定"尺码"),交替行背景 -->
|
||||
<view class="chart-wrap">
|
||||
<view class="header-row">
|
||||
<text class="title">产品尺码</text>
|
||||
@@ -8,13 +8,10 @@
|
||||
</view>
|
||||
|
||||
<view class="table">
|
||||
<!-- 表头:bg #DFDFDF,圆角 6px -->
|
||||
<!-- 表头:首列固定"尺码",其余列名来自后端 columns -->
|
||||
<view class="row header">
|
||||
<text
|
||||
class="cell"
|
||||
v-for="(col, index) in data.columns"
|
||||
:key="index"
|
||||
>{{ col }}</text>
|
||||
<text class="cell">尺码</text>
|
||||
<text class="cell" v-for="col in data.columns" :key="col.key">{{ col.name }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 数据行:偶数行(第 2、4 行)bg #F7F7F7,圆角 6px -->
|
||||
@@ -25,10 +22,7 @@
|
||||
:key="index"
|
||||
>
|
||||
<text class="cell">{{ row.size }}</text>
|
||||
<text class="cell">{{ row.shoulder }}</text>
|
||||
<text class="cell">{{ row.chest }}</text>
|
||||
<text class="cell">{{ row.length }}</text>
|
||||
<text class="cell">{{ row.sleeve }}</text>
|
||||
<text class="cell" v-for="col in data.columns" :key="col.key">{{ (row.cells && row.cells[col.key]) || '' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user