hookehuyr

✨ feat: 产品中心页面自适应调整

1 <!-- 1 <!--
2 * @Date: 2024-09-27 16:53:09 2 * @Date: 2024-09-27 16:53:09
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-09-30 16:48:54 4 + * @LastEditTime: 2024-10-11 15:19:35
5 * @FilePath: /hager/src/views/product/index.vue 5 * @FilePath: /hager/src/views/product/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
8 <template> 8 <template>
9 <div class="product-index"> 9 <div class="product-index">
10 <hager-box> 10 <hager-box>
11 - <div> 11 + <div v-if="!is_xs">
12 <el-breadcrumb separator="/"> 12 <el-breadcrumb separator="/">
13 <el-breadcrumb-item>所有产品</el-breadcrumb-item> 13 <el-breadcrumb-item>所有产品</el-breadcrumb-item>
14 <el-breadcrumb-item>配电产品</el-breadcrumb-item> 14 <el-breadcrumb-item>配电产品</el-breadcrumb-item>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
16 </el-breadcrumb> 16 </el-breadcrumb>
17 </div> 17 </div>
18 <hager-h1 title="低压主配电" sub="Automatic conversion switch" style="margin: 2rem 0;"></hager-h1> 18 <hager-h1 title="低压主配电" sub="Automatic conversion switch" style="margin: 2rem 0;"></hager-h1>
19 - <el-row :gutter="0" style="margin: 1rem 0;"> 19 + <el-row v-if="!is_xs" :gutter="0" style="margin: 1rem 0;">
20 <el-col :span="6"> 20 <el-col :span="6">
21 <div class="product-nav-wrapper"> 21 <div class="product-nav-wrapper">
22 <div class="product-nav-title">按产品类别查找</div> 22 <div class="product-nav-title">按产品类别查找</div>
...@@ -40,6 +40,15 @@ ...@@ -40,6 +40,15 @@
40 <div style="height: 5rem;"></div> 40 <div style="height: 5rem;"></div>
41 </el-col> 41 </el-col>
42 </el-row> 42 </el-row>
43 + <div v-else class="product-list">
44 + <div class="product-item xs" v-for="(item, index) in 6" :key="index">
45 + <div class="product-item-img">
46 + <el-image style="width: 100%; height: 100%;" src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" fit="fit"></el-image>
47 + </div>
48 + <p class="product-item-title">acb hw 空气断路器</p>
49 + </div>
50 + </div>
51 + <div style="height: 5rem;"></div>
43 </hager-box> 52 </hager-box>
44 </div> 53 </div>
45 </template> 54 </template>
...@@ -115,6 +124,9 @@ export default { ...@@ -115,6 +124,9 @@ export default {
115 } 124 }
116 .product-item { 125 .product-item {
117 width: calc(33.33% - 1rem); 126 width: calc(33.33% - 1rem);
127 + &.xs {
128 + width: calc(50% - 1rem);
129 + }
118 } 130 }
119 .product-item-img { 131 .product-item-img {
120 background-color: #f5f5f5; 132 background-color: #f5f5f5;
......