Commit b8ca173c authored by 李苏's avatar 李苏 💬

附件预览禁用右击

parent d4ef302e
......@@ -6,7 +6,7 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" style="height: 85vh;width: 100%">
<div ref='show' v-if="show" style="height: 85vh;width: 100%">
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
......@@ -177,6 +177,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
......@@ -6,7 +6,7 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" style="height: 85vh;width: 100%">
<div ref='show' v-if="show" style="height: 85vh;width: 100%">
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
......@@ -175,6 +175,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
......@@ -8,7 +8,7 @@
>
<div v-if="show" style="height: 85vh;width: 100%">
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<pdf ref="show" v-if="showType=='pdf'" :src="url" ></pdf>
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
</div>
</el-dialog>
......@@ -175,6 +175,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
......@@ -6,7 +6,7 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" style="height: 85vh;width: 100%">
<div ref="show" v-if="show" style="height: 85vh;width: 100%">
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
......@@ -177,6 +177,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
......@@ -6,7 +6,7 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" style="height: 85vh;width: 100%">
<div ref='show' v-if="show" style="height: 85vh;width: 100%">
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
......@@ -81,7 +81,7 @@
</template>
<script>
import {pdf} from 'common'
import {pdf} from 'common'
import {
doQuerytree
} from "@/api/outsourcingDirector/approve.js";
......@@ -176,6 +176,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
......@@ -6,10 +6,10 @@
:visible.sync="show"
width="100%"
>
<div v-if="show" style="height: 85vh;width: 100%">
<!-- <iframe v-if="showType=='pdf'" :src="url" width="100%" height="100%" border="0"></iframe> -->
<pdf v-if="showType=='pdf'" :src="url" ></pdf>
<pdf ref="show" v-if="showType=='pdf'" :src="url" ></pdf>
<img v-if="['gif','jpg','jpeg','png','bmp'].indexOf(showType)!=-1" :src="url" width="100%" height="100%" border="0" >
</div>
</el-dialog>
......@@ -178,6 +178,9 @@
});
this.url=URL.createObjectURL(blob)
this.show=true
this.$nextTick(()=>{
this.$refs.show.addEventListener( 'contextmenu', function ( event ) { event.preventDefault(); }, false );
})
})
},
creatFile(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment