Sfoglia il codice sorgente

feat:图片禁止右键保存

zhangsiya 10 mesi fa
parent
commit
1a9ffe54ec

+ 2 - 2
jydocs-mobile/src/views/details/details.vue

@@ -31,7 +31,7 @@
             <pdf v-for="i in getPageNum" :key="i" :src="pdfPage.url" :page="i" @error="pdfError($event)"></pdf>
           </div>
           <div class="file-content file-word-docx" v-if="detailData.source !== 1">
-            <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
+            <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览" oncontextmenu="return false" >
           </div>
         </div>
         <div
@@ -61,7 +61,7 @@
 <!--    已购买,但是加载失败-->
     <div class="bottoms-preview" v-if="docLoadError && buyed === 1">
       <div class="file-content">
-        <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
+        <img v-for="(iUrl, ind) in previewConfig.docinImg"  :key="'iUrl_' + ind" :src="iUrl" alt="预览" oncontextmenu="return false">
       </div>
       <div
           class="continue"

+ 2 - 2
jydocs-pc/src/views/Content.vue

@@ -36,7 +36,7 @@
               <div class="cont-p"  id="previewPdfPage"></div>
             </div>
             <div class="file-content file-word-docx" v-else>
-              <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
+              <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览" oncontextmenu="return false">
             </div>
           </div>
           <div class="continue" v-if="unreadPage > 0 && datas.docPageSize > 1 && guideText">
@@ -56,7 +56,7 @@
           <div class="preview-content">
             <!--剑鱼文档全为PDF-->
             <div class="file-content">
-              <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览">
+              <img v-for="(iUrl, ind) in previewConfig.docinImg" :key="'iUrl_' + ind" :src="iUrl" alt="预览" oncontextmenu="return false" >
             </div>
             <div class="continue" v-if="unreadPage > 0 && datas.docPageSize > 1 && guideText">
               剩余{{ unreadPage }}页未读,<span @click="continued">{{ guideText }}