2021-04-29 17:42:01 +08:00
|
|
|
<template>
|
|
|
|
<div class="preview-container">
|
|
|
|
<el-card shadow="hover" header="element-plus 大图预览">
|
|
|
|
<el-image style="width: 100px; height: 100px; border-radius: 5px" :src="url" :preview-src-list="srcList" title="点击查看大图预览"> </el-image>
|
|
|
|
</el-card>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2022-02-21 23:52:59 +08:00
|
|
|
import { toRefs, reactive, defineComponent } from 'vue';
|
2022-04-18 19:14:38 +08:00
|
|
|
|
2022-02-21 23:52:59 +08:00
|
|
|
export default defineComponent({
|
2021-04-29 17:42:01 +08:00
|
|
|
name: 'pagesPreview',
|
|
|
|
setup() {
|
|
|
|
const state = reactive({
|
2022-07-10 19:37:39 +08:00
|
|
|
url: 'https://img2.baidu.com/it/u=1978192862,2048448374&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
|
2021-04-29 17:42:01 +08:00
|
|
|
srcList: [
|
2022-07-10 19:37:39 +08:00
|
|
|
'https://img2.baidu.com/it/u=1978192862,2048448374&fm=253&fmt=auto&app=138&f=JPEG?w=504&h=500',
|
|
|
|
'https://img2.baidu.com/it/u=2370931438,70387529&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
|
2021-04-29 17:42:01 +08:00
|
|
|
'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg',
|
|
|
|
],
|
|
|
|
});
|
|
|
|
return {
|
|
|
|
...toRefs(state),
|
|
|
|
};
|
|
|
|
},
|
2022-02-21 23:52:59 +08:00
|
|
|
});
|
2021-04-29 17:42:01 +08:00
|
|
|
</script>
|