Browse Source

用户头像空占位

wyy 2 năm trước cách đây
mục cha
commit
e229849c85
2 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 2 1
      mall4v/src/crud/user/user.js
  2. 8 0
      mall4v/src/views/modules/user/user.vue

+ 2 - 1
mall4v/src/crud/user/user.js

@@ -28,7 +28,8 @@ export const tableOption = {
     prop: 'pic',
     type: 'upload',
     imgWidth: 150,
-    listType: 'picture-img'
+    listType: 'picture-img',
+    slot: true
   }, {
     label: '状态',
     prop: 'status',

+ 8 - 0
mall4v/src/views/modules/user/user.vue

@@ -15,6 +15,14 @@
 <!--                   :disabled="dataListSelections.length <= 0">批量删除</el-button>-->
 <!--      </template>-->
 
+    <template slot-scope="scope"
+              slot="pic">
+              <span class="avue-crud__img" v-if="scope.row.pic">
+                <i :src="scope.row.pic" class="el-icon-document"></i>
+              </span>
+              <span v-else>-</span>
+      </template>
+
       <template slot-scope="scope"
                 slot="status">
         <el-tag v-if="scope.row.status === 0"