Browse Source

删除图片视频功能

zengyicheng 2 years ago
parent
commit
fa2cb93e8c

+ 1 - 1
dist/index.html

@@ -1 +1 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.74104cf96fa5e1d4dc1737e6a1568a4e.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.daedbc91bbde45c4def8.js></script></body></html>
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>pbl-student</title><link href=./static/css/app.acc2528ed4f997ceb28d14f65ade2b86.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.deec116227fdc82db9e5.js></script><script type=text/javascript src=./static/js/app.018e746943c3b07efcbc.js></script></body></html>

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.74104cf96fa5e1d4dc1737e6a1568a4e.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.acc2528ed4f997ceb28d14f65ade2b86.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.acc2528ed4f997ceb28d14f65ade2b86.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.018e746943c3b07efcbc.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.018e746943c3b07efcbc.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.daedbc91bbde45c4def8.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.daedbc91bbde45c4def8.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 34 - 10
src/components/liveProjectDetail.vue

@@ -191,7 +191,7 @@
           </div>
         </div>
       </div>
-      <div v-if="steps == 3" style="width: 40%; height: 96%; ">
+      <div v-if="steps == 3" style="width: 40%; height: 96%">
         <div
           style="
             box-sizing: border-box;
@@ -203,7 +203,9 @@
             position: relative;
           "
         >
-        <div class="close" @click="steps = 0,type = 0"><img src="../assets/icon/close.png" alt="" /></div>
+          <div class="close" @click="(steps = 0), (type = 0)">
+            <img src="../assets/icon/close.png" alt="" />
+          </div>
 
           <div style="color: #b6b6b6; font-size: 20px; padding: 20px">
             上传作业
@@ -226,6 +228,9 @@
               >
                 <img :src="uImg.url" alt="" />
                 <div>{{ uImg.name }}</div>
+                <div class="deleteWord" @click="clean(1)">
+                  <img src="../assets/icon/delete.png" alt="" />
+                </div>
               </div>
             </div>
             <div class="uploadImg" @click="addImg($event)">
@@ -265,6 +270,9 @@
               >
                 <img src="../assets/uploadMp4.png" alt="" />
                 <div>{{ uVedio.name }}</div>
+                <div class="deleteWord" @click="clean(2)">
+                  <img src="../assets/icon/delete.png" alt="" />
+                </div>
               </div>
             </div>
             <div class="uploadImg" @click="addImg($event)">
@@ -477,6 +485,13 @@ export default {
         this.$message.error("至少选择一个答案!");
       }
     },
+    clean(type) {
+      if (type == 1) {
+        this.upload[0].upImg.splice(0, 1);
+      } else if (type == 2) {
+        this.upload[0].upVedio.splice(0, 1);
+      }
+    },
     addImg(e) {
       var el = e.currentTarget;
       el.getElementsByTagName("input")[0].click();
@@ -603,11 +618,19 @@ export default {
 .uploadVedio > img,
 .uploadImgPic > img,
 .logoLive > img,
-.close > img {
+.close > img,
+.deleteWord > img {
   width: 100%;
   height: 100%;
 }
-
+.deleteWord {
+  width: 22px !important;
+  height: 22px;
+  position: absolute;
+  right: -5px;
+  top: -5px;
+  cursor: pointer;
+}
 .blackBottomB {
   position: absolute;
   bottom: 0px;
@@ -804,6 +827,7 @@ export default {
 .uploadImgPic {
   width: 100px;
   height: 100px;
+  position: relative;
   margin: 0 20px 0 0;
 }
 .uploadImgPic > div {
@@ -890,11 +914,11 @@ export default {
   color: #fff !important;
   background: #5e78fa !important;
 }
-.close{
-    position: absolute;
-    right: 10px;
-    top: 10px;
-    width: 20px;
-    cursor: pointer;
+.close {
+  position: absolute;
+  right: 10px;
+  top: 10px;
+  width: 20px;
+  cursor: pointer;
 }
 </style>

Some files were not shown because too many files changed in this diff