perf: 固定宽高
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
absolute h-200px w-200px rd="1/2" top="1/2" overflow-hidden
|
||||
class="translate-x-1/2 -translate-y-1/2" :style="imageStyle"
|
||||
>
|
||||
<img v-show="options.previews.url" :src="options.previews.url" :style="options.previews.img" alt="实时预览图片">
|
||||
<img v-show="options.previews.url" h-200px w-200px :src="options.previews.url" :style="options.previews.img" alt="实时预览图片">
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -109,11 +109,9 @@ const emit = defineEmits<{
|
||||
let avatarUrl = $ref(props.fileUrl)
|
||||
const filelId = useVModel(props, 'fileId', emit)
|
||||
|
||||
const imageStyle = computed(() => ({
|
||||
height: `${props.autoCropHeight}px`,
|
||||
width: `${props.autoCropWidth}px`,
|
||||
const imageStyle = {
|
||||
boxShadow: '0 0 4px #ccc',
|
||||
}))
|
||||
}
|
||||
|
||||
let loading = $ref(false)
|
||||
|
||||
|
Reference in New Issue
Block a user