mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-15 01:41:20 +08:00
33 lines
715 B
Vue
33 lines
715 B
Vue
|
<template>
|
||
|
<div class="demo-image__placeholder">
|
||
|
<div class="block">
|
||
|
<span class="demonstration">Default</span>
|
||
|
<el-image :src="src"></el-image>
|
||
|
</div>
|
||
|
<div class="block">
|
||
|
<span class="demonstration">Custom</span>
|
||
|
<el-image :src="src">
|
||
|
<template #placeholder>
|
||
|
<div class="image-slot">Loading<span class="dot">...</span></div>
|
||
|
</template>
|
||
|
</el-image>
|
||
|
</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script lang="ts">
|
||
|
import { defineComponent, ref } from 'vue'
|
||
|
|
||
|
export default defineComponent({
|
||
|
setup() {
|
||
|
const src = ref(
|
||
|
'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg'
|
||
|
)
|
||
|
|
||
|
return {
|
||
|
src,
|
||
|
}
|
||
|
},
|
||
|
})
|
||
|
</script>
|