Commit f01b82f07a35b9a3424e66f91949851cf796408f

Authored by jeromesoar
1 parent c8f3eb6f

商品分类可上传图片

yudao-ui-admin/src/views/mall/product/category/index.vue
... ... @@ -48,7 +48,7 @@
48 48 </el-table-column>
49 49 <el-table-column label="分类图片" align="center" prop="bannerUrl">
50 50 <template slot-scope="scope">
51   - <img v-if="scope.row.bannerUrl" :src="scope.row.bannerUrl" alt="分类图片"/>
  51 + <img v-if="scope.row.bannerUrl" :src="scope.row.bannerUrl" alt="分类图片" class="img-height"/>
52 52 </template>
53 53 </el-table-column>
54 54 <el-table-column label="分类排序" align="center" prop="sort"/>
... ... @@ -95,7 +95,7 @@
95 95 </el-popover>
96 96 </el-form-item>
97 97 <el-form-item label="分类图片" prop="bannerUrl">
98   - <ImageUpload v-model="form.bannerUrl" />
  98 + <ImageUpload v-model="form.bannerUrl" :limit="1"/>
99 99 </el-form-item>
100 100 <el-form-item label="分类排序" prop="sort">
101 101 <el-input-number v-model="form.sort" controls-position="right" :min="0" />
... ... @@ -125,7 +125,6 @@ import {
125 125 deleteCategory,
126 126 exportCategoryExcel,
127 127 getCategory,
128   - getCategoryPage,
129 128 listCategory,
130 129 updateCategory
131 130 } from "@/api/mall/product/category";
... ... @@ -320,7 +319,7 @@ export default {
320 319 this.exportLoading = true;
321 320 return exportCategoryExcel(params);
322 321 }).then(response => {
323   - this.$download.excel(response, '${table.classComment}.xls');
  322 + this.$download.excel(response, '商品分类.xls');
324 323 this.exportLoading = false;
325 324 }).catch(() => {
326 325 });
... ... @@ -328,3 +327,10 @@ export default {
328 327 }
329 328 };
330 329 </script>
  330 +
  331 +<style scoped lang="scss">
  332 +//
  333 +.img-height {
  334 + height: 150px;
  335 +}
  336 +</style>
... ...