Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
viitto
pptist
Commits
f08e36cd
Commit
f08e36cd
authored
Jun 17, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化高清图对比
parent
ec51208e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
imgArticContr.vue
src/components/CloudDisk/imgArticContr.vue
+1
-2
ImageStylePanel.vue
...iews/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue
+6
-3
No files found.
src/components/CloudDisk/imgArticContr.vue
View file @
f08e36cd
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
const
{
handleElement
,
handleElementId
}
=
storeToRefs
(
mainStore
)
const
{
handleElement
,
handleElementId
}
=
storeToRefs
(
mainStore
)
const
dialogFormVisible
=
ref
(
true
)
const
dialogFormVisible
=
ref
(
true
)
const
dialogTitle
=
ref
(
'原图/
清晰
图对比'
)
const
dialogTitle
=
ref
(
'原图/
高清
图对比'
)
const
setLoading
=
ref
(
false
)
const
setLoading
=
ref
(
false
)
const
props
=
defineProps
({
const
props
=
defineProps
({
width
:
{
type
:
String
,
default
:
"500"
},
width
:
{
type
:
String
,
default
:
"500"
},
...
@@ -147,7 +147,6 @@
...
@@ -147,7 +147,6 @@
position
:
relative
;
position
:
relative
;
display
:
inline-block
;
display
:
inline-block
;
margin
:
0
auto
;
margin
:
0
auto
;
min-height
:
273px
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
.before-image
{
.before-image
{
...
...
src/views/Editor/Toolbar/ElementStylePanel/ImageStylePanel.vue
View file @
f08e36cd
...
@@ -87,10 +87,11 @@
...
@@ -87,10 +87,11 @@
@
success=
"DefinitionDatas=null"
>
@
success=
"DefinitionDatas=null"
>
<
template
#
left
>
<
template
#
left
>
<span
style=
"position: absolute;left: 10px;top:10px;background: #fff;border-radius: 3px;padding:0 5px;width: 38px;"
>
原图
</span>
<span
style=
"position: absolute;left: 10px;top:10px;background: #fff;border-radius: 3px;padding:0 5px;width: 38px;"
>
原图
</span>
<img
:src=
"handleImageElement.src"
class=
"images"
:style=
"
{width: imgWidth+'px'}" />
<img
:src=
"handleImageElement.src"
class=
"images"
:style=
"
{width: imgWidth+'px'
,height: imgHeigth+'px'
}" />
</
template
>
</
template
>
<
template
#
right
>
<
template
#
right
>
<img
:src=
"'data:image/png;base64,'+DefinitionDatas"
class=
"images"
:style=
"
{width: imgWidth+'px'}" />
<span
style=
"position: absolute;right: 10px;top:10px;background: #fff;border-radius: 3px;padding:0 5px;width: 53px;"
>
高清图
</span>
<img
:src=
"'data:image/png;base64,'+DefinitionDatas"
class=
"images"
:style=
"
{width: imgWidth+'px',height: imgHeigth+'px'}" />
</
template
>
</
template
>
</imgArticContr>
</imgArticContr>
</div>
</div>
...
@@ -190,6 +191,7 @@ const imgWidth = ref(500)
...
@@ -190,6 +191,7 @@ const imgWidth = ref(500)
const
imgHeigth
=
ref
(
0
)
const
imgHeigth
=
ref
(
0
)
const
getPictDef
=
async
()
=>
{
const
getPictDef
=
async
()
=>
{
await
getImgSize
()
if
(
handleImageElement
.
value
.
src
.
startsWith
(
"data:image"
)){
if
(
handleImageElement
.
value
.
src
.
startsWith
(
"data:image"
)){
let
name
=
new
Date
().
getTime
()
+
".jpg"
let
name
=
new
Date
().
getTime
()
+
".jpg"
const
file
=
dataURLtoFile
(
handleImageElement
.
value
.
src
,
name
)
const
file
=
dataURLtoFile
(
handleImageElement
.
value
.
src
,
name
)
...
@@ -225,8 +227,9 @@ const getImgSize = async () => {
...
@@ -225,8 +227,9 @@ const getImgSize = async () => {
let
TempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
handleImageElement
.
value
.
src
)
let
TempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
handleImageElement
.
value
.
src
)
let
ratio
=
TempSize
.
width
/
imgWidth
.
value
let
ratio
=
TempSize
.
width
/
imgWidth
.
value
imgHeigth
.
value
=
TempSize
.
height
/
ratio
imgHeigth
.
value
=
TempSize
.
height
/
ratio
console
.
log
(
imgHeigth
.
value
,
'------'
)
}
}
getImgSize
()
const
getLockCutRatio
=
()
=>
{
const
getLockCutRatio
=
()
=>
{
keyboardStore
.
setCtrlKeyState
(
ctrlKeyState
.
value
)
keyboardStore
.
setCtrlKeyState
(
ctrlKeyState
.
value
)
}
}
...
...
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