Commit 5996e15e authored by 王玉鑫's avatar 王玉鑫

feat: 图片质量参数修改

parent f6007ee3
<!-- 图片展示,方便修改占位图、错误图 -->
<template>
<ElImage :src="src" @click="handleClick">
<ElImage :src="formatedSrc" @click="handleClick">
<template #placeholder>
<img class="h-full w-full" :src="currentdefault" @click="handleClick" />
</template>
......@@ -45,6 +45,15 @@ const currentdefault = computed(() => {
return props.type ? config[props.type] : defaultPicIcon;
});
const formatedSrc = computed(() => {
const { src } = props;
if (src) {
return `${src}?x-image-process=style/style-a460`;
} else {
return src;
}
});
const handleClick = () => {
emit('click');
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment