Commit ed929c27 by 孙美琪

计算资源无数据修改

parent 2d8ba33f
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
:label="productType.name" :label="productType.name"
:name="productType.id"> :name="productType.id">
<div v-if="showVersion === 1" class="version-1"> <div v-if="showVersion === 1" class="version-1">
<el-table :data="tableData" :max-height="490" style="width: 100%"> <el-table v-if="tableData.length !== 0" :data="tableData" :max-height="490" style="width: 100%">
<el-table-column prop="name" label="型号" width="190px" sortable/> <el-table-column prop="name" label="型号" width="190px" sortable/>
<el-table-column <el-table-column
v-for="(item, index) in tableData[0]?.properties.length!==0?tableData[0]?.properties.slice(0,6):tableData[0]?.properties" v-for="(item, index) in tableData[0]?.properties.length!==0?tableData[0]?.properties.slice(0,6):tableData[0]?.properties"
...@@ -77,10 +77,11 @@ ...@@ -77,10 +77,11 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-empty v-if="tableData.length === 0" description="暂无资源"/>
</div> </div>
<!--卡片形式--> <!--卡片形式-->
<div v-if="showVersion === 2" class="version-2"> <div v-if="showVersion === 2" class="version-2">
<el-row :gutter="24"> <el-row :gutter="24" v-if="tableData.length !== 0">
<el-col v-for="(item,index) in tableData" :key="index" :span="6"> <el-col v-for="(item,index) in tableData" :key="index" :span="6">
<div class="product-card"> <div class="product-card">
<div class="top-info"> <div class="top-info">
...@@ -116,6 +117,7 @@ ...@@ -116,6 +117,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-empty v-if="tableData.length === 0" description="暂无资源"/>
</div> </div>
<pagination <pagination
......
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 sign in to comment