Browse Source

chore[litemall-admin]: 图片点击放大

linlinjava 4 years ago
parent
commit
07f861b078

+ 2 - 1
litemall-admin/src/views/goods/list.vue

@@ -21,7 +21,7 @@
               <span>{{ props.row.goodsSn }}</span>
             </el-form-item>
             <el-form-item label="宣传画廊">
-              <img v-for="pic in props.row.gallery" :key="pic" :src="pic" class="gallery">
+              <el-image v-for="pic in props.row.gallery" :key="pic" :src="pic" class="gallery" :preview-src-list="props.row.gallery" style="width: 40px; height: 40px" />
             </el-form-item>
             <el-form-item label="商品介绍">
               <span>{{ props.row.brief }}</span>
@@ -110,6 +110,7 @@
 <style>
   .table-expand {
     font-size: 0;
+    padding-left: 60px;
   }
   .table-expand label {
     width: 100px;

+ 4 - 1
litemall-admin/src/views/mall/category.vue

@@ -21,7 +21,7 @@
 
       <el-table-column align="center" property="picUrl" label="类目图片">
         <template slot-scope="scope">
-          <img v-if="scope.row.picUrl" :src="scope.row.picUrl" width="80">
+          <el-image :src="thumbnail(scope.row.picUrl)" :preview-src-list="toPreview(scope.row, scope.row.picUrl)" style="width: 80px; height: 40px" />
         </template>
       </el-table-column>
 
@@ -134,11 +134,14 @@
 import { listCategory, listCatL1, createCategory, updateCategory, deleteCategory } from '@/api/category'
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
+import { thumbnail, toPreview } from '@/utils/index'
 
 export default {
   name: 'Category',
   data() {
     return {
+      thumbnail,
+      toPreview,
       uploadPath,
       list: [],
       listLoading: true,

+ 4 - 1
litemall-admin/src/views/promotion/ad.vue

@@ -21,7 +21,7 @@
 
       <el-table-column align="center" label="广告图片" prop="url">
         <template slot-scope="scope">
-          <img v-if="scope.row.url" :src="scope.row.url" width="80">
+          <el-image :src="thumbnail(scope.row.url)" :preview-src-list="toPreview(scope.row, scope.row.url)" style="width: 80px; height: 40px" />
         </template>
       </el-table-column>
 
@@ -125,12 +125,15 @@ import { listAd, createAd, updateAd, deleteAd } from '@/api/ad'
 import { uploadPath } from '@/api/storage'
 import { getToken } from '@/utils/auth'
 import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
+import { thumbnail, toPreview } from '@/utils/index'
 
 export default {
   name: 'Ad',
   components: { Pagination },
   data() {
     return {
+      thumbnail,
+      toPreview,
       uploadPath,
       list: [],
       total: 0,

+ 0 - 3
litemall-admin/src/views/user/user.vue

@@ -60,9 +60,6 @@
         <el-form-item label="用户昵称" prop="nickname">
           <el-input v-model="userDetail.nickname" />
         </el-form-item>
-        <el-form-item label="用户密码" prop="mobile">
-          <el-input v-model="userDetail.password" />
-        </el-form-item>
         <el-form-item label="用户手机" prop="mobile">
           <el-input v-model="userDetail.mobile" />
         </el-form-item>