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
7643e337
Commit
7643e337
authored
Aug 16, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统资料替换图
parent
de2b94a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
0 deletions
+101
-0
ImageOpera.vue
src/views/components/source/ImageOpera.vue
+101
-0
No files found.
src/views/components/source/ImageOpera.vue
0 → 100644
View file @
7643e337
<
template
>
<div
class=
"row items-center imageOperaBox"
:class=
"[handleElement.type=='image'?'imageOperaI':'imageOperaT']"
>
<!--
<div
class=
"text-opera-item"
@
click=
"handleCopyImage"
>
<el-tooltip
content=
"复制图"
placement=
"top"
>
<IconCopy
:size=
"18"
></IconCopy>
</el-tooltip>
</div>
-->
<div
class=
"text-opera-item"
@
click=
"handleInsert"
>
<el-tooltip
content=
"插入图"
placement=
"top"
>
<IconDocAdd
:size=
"18"
></IconDocAdd>
</el-tooltip>
</div>
<div
v-show=
"handleElement.type=='image'"
class=
"text-opera-item"
@
click=
"handleReplace"
>
<el-tooltip
content=
"替换图"
placement=
"top"
>
<IconFileConversion
:size=
"18"
></IconFileConversion>
</el-tooltip>
</div>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
useMainStore
}
from
"@/store"
;
import
{
copyText
,
replaceText
}
from
"@/utils/clipboard"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
ref
}
from
"vue"
;
import
useHistorySnapshot
from
'@/hooks/useHistorySnapshot'
const
mainStore
=
useMainStore
();
const
{
handleElement
}
=
storeToRefs
(
mainStore
);
const
emit
=
defineEmits
<
{
(
event
:
'handleCopyImage'
):
void
(
event
:
'handleInsert'
):
void
(
event
:
'handleReplace'
):
void
}
>
()
const
handleCopyImage
=
()
=>
{
emit
(
'handleCopyImage'
)
}
const
handleReplace
=
()
=>
{
emit
(
'handleReplace'
)
}
const
handleInsert
=
()
=>
{
emit
(
'handleInsert'
)
}
</
script
>
<
style
scoped
>
.text-opera-item
{
padding
:
5px
;
border-radius
:
5px
;
cursor
:
pointer
;
color
:
#fff
;
line-height
:
1
;
}
.text-opera-item
:hover
{
background
:
#ffff
;
color
:
black
;
}
.imageOperaBox
{
padding
:
4px
10px
;
position
:
relative
;
position
:
fixed
;
top
:
-50px
;
z-index
:
99
;
background
:
rgba
(
23
,
23
,
23
,
.5
);
border-radius
:
8px
;
}
.imageOperaT
{
left
:
180px
;
}
.imageOperaT
::after
{
content
:
' '
;
width
:
0
;
height
:
0
;
position
:
absolute
;
left
:
15px
;
bottom
:
-10px
;
border-left
:
10px
solid
transparent
;
border-right
:
10px
solid
transparent
;
border-top
:
10px
solid
rgba
(
23
,
23
,
23
,
.5
);
}
.imageOperaI
{
left
:
160px
;
}
.imageOperaI
::after
{
content
:
' '
;
width
:
0
;
height
:
0
;
position
:
absolute
;
left
:
28px
;
bottom
:
-10px
;
border-left
:
10px
solid
transparent
;
border-right
:
10px
solid
transparent
;
border-top
:
10px
solid
rgba
(
23
,
23
,
23
,
.5
);
}
</
style
>
\ No newline at end of file
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