Explorar el Código

fix(cfc-web): add table overflow scroll to admin pages

Xiaogang Liao hace 3 meses
padre
commit
338871093e

+ 3 - 1
cfc-web/src/views/admin/CouponManagement.vue

@@ -10,7 +10,8 @@
         </div>
       </div>
 
-      <el-table :data="list" v-loading="loading" border stripe>
+      <div style="overflow:auto;max-height:calc(100vh - 300px);">
+        <el-table :data="list" v-loading="loading" border stripe style="max-height:calc(100vh - 300px);">
         <el-table-column prop="id" label="ID" width="70" />
         <el-table-column prop="name" label="名称" min-width="140" show-overflow-tooltip />
         <el-table-column label="类型" width="90">
@@ -53,6 +54,7 @@
           </template>
         </el-table-column>
       </el-table>
+      </div>
 
       <el-pagination
         @current-change="onPageChange"

+ 3 - 1
cfc-web/src/views/admin/Foods.vue

@@ -26,7 +26,8 @@
           <el-option label="其他" value="其他" />
         </el-select>
       </div>
-      <el-table :data="list" v-loading="loading" border stripe>
+      <div style="overflow:auto;max-height:calc(100vh - 300px);">
+        <el-table :data="list" v-loading="loading" border stripe style="max-height:calc(100vh - 300px);">
         <el-table-column prop="id" label="ID" width="80" />
         <el-table-column prop="name" label="名称" />
         <el-table-column prop="category" label="分类" width="100" />
@@ -59,6 +60,7 @@
           </template>
         </el-table-column>
       </el-table>
+      </div>
     </el-card>
 
     <el-dialog :title="editId ? '编辑食材' : '新建食材'" :visible.sync="dialogVisible" width="600px">

+ 4 - 4
cfc-web/src/views/admin/Recipes.vue

@@ -19,8 +19,8 @@
           <el-option label="晚餐" value="晚餐" />
           <el-option label="加餐" value="加餐" />
         </el-select>
-      </div>
-      <el-table :data="list" v-loading="loading" border stripe>
+    </div>
+    <div style="overflow:auto;max-height:calc(100vh - 300px);"><el-table style="max-height:calc(100vh - 300px);" :data="list" v-loading="loading" border stripe>
         <el-table-column prop="id" label="ID" width="80" />
         <el-table-column prop="name" label="名称" />
         <el-table-column prop="mealType" label="类型" width="80" />
@@ -39,8 +39,8 @@
             </el-dropdown>
           </template>
         </el-table-column>
-      </el-table>
-    </el-card>
+    </el-table></div>
+  </el-card>
 
     <el-dialog :title="editId ? '编辑食谱' : '新建食谱'" :visible.sync="dialogVisible" width="700px">
       <el-form label-width="120px">

+ 3 - 1
cfc-web/src/views/admin/ServiceTypes.vue

@@ -6,7 +6,8 @@
         <el-input v-model="keyword" placeholder="搜索服务类型..." prefix-icon="el-icon-search" style="width:200px" clearable @keyup.enter.native="handleSearch" @clear="handleSearch" />
         <el-button style="float: right; margin-left: 10px" type="primary" size="small" @click="handleCreate">+ 添加类型</el-button>
       </div>
-      <el-table :data="filteredData" stripe>
+      <div style="overflow:auto;max-height:calc(100vh - 300px);">
+        <el-table :data="filteredData" stripe style="max-height:calc(100vh - 300px);">
         <el-table-column prop="id" label="ID" width="80"></el-table-column>
         <el-table-column prop="name" label="类型名称"></el-table-column>
         <el-table-column prop="icon" label="图标" width="100">
@@ -35,6 +36,7 @@
           </template>
         </el-table-column>
       </el-table>
+      </div>
     </el-card>
 
     <el-dialog :visible.sync="dialogVisible" :title="isEdit ? '编辑类型' : '添加类型'" width="500px">