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