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