Parcourir la source

解决侧边栏展开后未缩回问题

zq il y a 1 semaine
Parent
commit
aae1b1072e
1 fichiers modifiés avec 4 ajouts et 11 suppressions
  1. 4 11
      src/components/CommonPreview.vue

+ 4 - 11
src/components/CommonPreview.vue

@@ -660,17 +660,10 @@ export default {
      * @param {string} param.type - 抽屉类型(0: 图片, 1: 音频, 2: 视频)
      */
     openDrawer({ type }) {
-      // if (this.drawerType === type) {
-      //   this.drawerType = '';
-      //   return;
-      // }
-      // this.drawerType = type;
-      // this.$nextTick(() => {
-      //   this.cur_page = 1;
-      //   this.file_list = [];
-      //   this.loadMore();
-      // });
-
+      if (this.drawerType === type) {
+        this.drawerType = '';
+        return;
+      }
       // 重置所有加载状态
       this.resetLoadState();
       this.drawerType = type; // 假设这是你的类型变量