Explorar o código

update views/disk

reghao hai 6 meses
pai
achega
c8b47a09ba
Modificáronse 3 ficheiros con 36 adicións e 36 borrados
  1. 1 13
      src/views/disk/DiskAlbum.vue
  2. 34 23
      src/views/disk/DiskAlbumIndex.vue
  3. 1 0
      src/views/disk/DiskFile.vue

+ 1 - 13
src/views/disk/DiskAlbum.vue

@@ -75,7 +75,7 @@ export default {
     handleCurrentChange(pageNumber) {
       this.currentPage = pageNumber
       this.dataList = []
-      this.getData(albumId)
+      // this.getData(albumId)
       // 回到顶部
       scrollTo(0, 0)
     },
@@ -127,16 +127,4 @@ export default {
   height: 320px;
   display: block;
 }
-
-.imgs {
-  position: relative;
-}
-.img320 {
-  width: 320px;
-  height: 240px
-}
-.img240 {
-  width: 240px;
-  height: 180px
-}
 </style>

+ 34 - 23
src/views/disk/DiskAlbumIndex.vue

@@ -7,11 +7,19 @@
         :xs="12"
         style="padding: 5px;"
       >
-        <el-image
-          fit="cover"
-          class="coverImg"
-          @click.native="onCreateAlbum"
-        />
+        <el-card :body-style="{ padding: '1px' }">
+          <div>
+            <el-image
+              lazy
+              fit="cover"
+              class="coverImg"
+              @click.native="onCreateAlbum"
+            />
+          </div>
+          <div style="padding: 14px">
+            <span style="color: black">创建相册</span>
+          </div>
+        </el-card>
       </el-col>
       <el-col
         v-for="(album, index) in dataList"
@@ -21,13 +29,26 @@
         :xs="12"
         style="padding: 5px"
       >
-        <el-image
-          lazy
-          fit="cover"
-          class="coverImg"
-          :src="album.coverUrl"
-          @click="getAlbum(album.albumId)"
-        />
+        <el-card :body-style="{ padding: '1px' }">
+          <router-link style="text-decoration-line: none" target="_blank" :to="`/disk/album/${album.albumId}`">
+            <div>
+              <el-image
+                lazy
+                fit="cover"
+                :src="album.coverUrl"
+                class="coverImg"
+              />
+            </div>
+          </router-link>
+          <div style="padding: 14px">
+            <router-link style="text-decoration-line: none" target="_blank" :to="`/disk/album/${album.albumId}`">
+              <span style="color: black">{{ album.albumName }}</span>
+              <span style="color: black">
+                <i class="el-icon-picture-outline">{{ album.num }}</i>
+              </span>
+            </router-link>
+          </div>
+        </el-card>
       </el-col>
     </el-row>
     <el-row>
@@ -46,7 +67,6 @@
 
     <el-dialog
       :visible.sync="showCreateAlbumDialog"
-      width="30%"
       center
     >
       <div>
@@ -153,16 +173,7 @@ export default {
 
 .coverImg {
   width: 100%;
-  height: 320px;
+  height: 240px;
   display: block;
 }
-
-.img320 {
-  width: 320px;
-  height: 240px
-}
-.img240 {
-  width: 240px;
-  height: 180px
-}
 </style>

+ 1 - 0
src/views/disk/DiskFile.vue

@@ -469,6 +469,7 @@ export default {
 
           this.dataList = pageList.list
           this.totalSize = pageList.totalSize
+          this.pathList = []
           if (namePathList.length === 0) {
             this.pathList.push({ path: '/disk', name: '全部文件' })
           } else {