123456789101112131415161718192021222324252627282930313233343536 |
- <template>
- <!-- 过渡动画 -->
- <a-modal title="查看封面" v-model="showImageChouzhen" :width="400" :footer="null">
- <img :src="showImageStr" style="width: 100%" v-if="showType == 'inage'" />
- <video class="video" :src="showImageStr" controls="controls" style="width: 100%" v-else>
- 您的浏览器不支持 video 标签。
- </video>
- </a-modal>
- </template>
- <script>
- export default {
- props: {
- imgSrc: {
- type: String,
- default: '',
- },
- },
- data() {
- return {
- scale: 1,
- showType: 'image',
- showImageChouzhen: false,
- showImageStr:''
- }
- },
- methods: {
- showImg(type,url) {
- this.showType = type
- this.showImageStr = url
- this.showImageChouzhen = true
- },
- },
- }
- </script>
|