瀏覽代碼

RING:素材库FIX

ringcode 3 年之前
父節點
當前提交
bff62bbdb2
共有 2 個文件被更改,包括 11 次插入9 次删除
  1. 6 3
      src/views/material/component/common-table.vue
  2. 5 6
      src/views/material/component/preview.vue

+ 6 - 3
src/views/material/component/common-table.vue

@@ -98,7 +98,7 @@
         }"
       />
     </a-modal>
-    <a-modal
+    <!-- <a-modal
       v-model:visible="previewVisible"
       width="40%"
       height="200px"
@@ -119,7 +119,7 @@
         :src="currentUrl"
         controls
       ></video>
-    </a-modal>
+    </a-modal> -->
     <preview-box
       @close="previewVisible = false"
       :type="type"
@@ -255,7 +255,10 @@ const CommonTable = defineComponent({
       console.log("IDS", this.currentId, this.advertiser);
       try {
         await pushMaterial({
-          material_id: this.currentId == 0 ? this.selectedRowKeys.join(',') : this.currentId,
+          material_id:
+            this.currentId == 0
+              ? this.selectedRowKeys.join(",")
+              : this.currentId,
           advertiser_id: this.advertiser[1],
         });
         this.pushVisible = false;

+ 5 - 6
src/views/material/component/preview.vue

@@ -19,12 +19,7 @@
           v-show="playType === 'picture'"
           :style="{ transform: 'scale(' + multiples + ')' }"
         />
-        <video
-          v-show="playType === 'video'"
-          style="max-width: 100%; max-height: 100%"
-          :src="playUrl"
-          controls
-        ></video>
+        <video v-show="playType === 'video'" :src="playUrl" controls></video>
       </div>
     </div>
   </div>
@@ -130,6 +125,10 @@ export default PreviewBox;
       max-height: 100%;
       transition: 0.3s all;
     }
+    video {
+      max-width: 100%;
+      max-height: 100%;
+    }
   }
 }
 </style>