fix(editor): icon 图片模式样式修改

This commit is contained in:
roymondchen 2022-08-09 19:48:26 +08:00 committed by jia000
parent 66d013f510
commit 23617a63e9
2 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<template>
<el-icon v-if="!icon"><edit></edit></el-icon>
<img v-else-if="typeof icon === 'string' && icon.startsWith('http')" :src="icon" />
<el-icon v-else-if="typeof icon === 'string' && icon.startsWith('http')"><img :src="icon" /></el-icon>
<i v-else-if="typeof icon === 'string'" :class="icon"></i>
<el-icon v-else><component :is="toRaw(icon)"></component></el-icon>
</template>

View File

@ -86,6 +86,11 @@
}
}
img {
max-width: 100%;
max-height: 100%;
}
span {
font-size: 12px;
text-align: center;