Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
liyeyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cfld-frontend
liyeyun
Commits
5996e15e
Commit
5996e15e
authored
Dec 17, 2023
by
王玉鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 图片质量参数修改
parent
f6007ee3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
CommonImage.vue
src/components/common/CommonImage.vue
+10
-1
No files found.
src/components/common/CommonImage.vue
View file @
5996e15e
<!-- 图片展示,方便修改占位图、错误图 -->
<
template
>
<ElImage
:src=
"
s
rc"
@
click=
"handleClick"
>
<ElImage
:src=
"
formatedS
rc"
@
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'
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment