28473c86460d4ac5e8976829fae3cb62178cdfd4.svn-base 789 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <el-dialog width="70%"
  3. :visible.sync="dialogVisible"
  4. title="文件预览"
  5. @close="dialogClose">
  6. <div class="pdf" >
  7. <iframe :src="pdfsrc" frameborder="0" style="width: 100%; height: 100%"></iframe>
  8. </div>
  9. </el-dialog>
  10. </template>
  11. <script>
  12. export default {
  13. props: ["clctzUrl"],
  14. components: {
  15. },
  16. data(){
  17. return{
  18. dialogVisible:true,
  19. pdfsrc:""
  20. }
  21. },
  22. mounted(){
  23. this.pdfsrc=this.clctzUrl;
  24. this.dialogVisible=true
  25. },
  26. methods:{
  27. dialogClose(){
  28. this.$emit('closeDialog')
  29. },
  30. },
  31. }
  32. </script>
  33. <style scoped>
  34. .pdf{
  35. color: #606266;
  36. padding: 30px 20px;
  37. height: 60vh;
  38. overflow: auto;
  39. }
  40. </style>