bigImg.vue 769 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <!-- 过渡动画 -->
  3. <a-modal title="查看封面" v-model="showImageChouzhen" :width="400" :footer="null">
  4. <img :src="showImageStr" style="width: 100%" v-if="showType == 'inage'" />
  5. <video class="video" :src="showImageStr" controls="controls" style="width: 100%" v-else>
  6. 您的浏览器不支持 video 标签。
  7. </video>
  8. </a-modal>
  9. </template>
  10. <script>
  11. export default {
  12. props: {
  13. imgSrc: {
  14. type: String,
  15. default: '',
  16. },
  17. },
  18. data() {
  19. return {
  20. scale: 1,
  21. showType: 'image',
  22. showImageChouzhen: false,
  23. showImageStr:''
  24. }
  25. },
  26. methods: {
  27. showImg(type,url) {
  28. this.showType = type
  29. this.showImageStr = url
  30. this.showImageChouzhen = true
  31. },
  32. },
  33. }
  34. </script>