Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
95b97307
Commit
95b97307
authored
1 year ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
98073e32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
SignName.vue
src/components/SignName.vue
+13
-2
No files found.
src/components/SignName.vue
View file @
95b97307
...
...
@@ -75,7 +75,7 @@
<div
class=
"signTc"
v-show=
"tcStatus"
>
<span
@
click=
"tcStatus=false;"
class=
"closeTc"
>
去签字
</span>
</div>
<div
class=
"CliSignDiv"
style=
"height:100%;
background:#fff;z-index:100
"
>
<div
class=
"CliSignDiv"
style=
"height:100%;
z-index:100;background:#fff;
"
>
<div
class=
"CanvasDiv"
>
<div
class=
"dash"
>
<div
id=
"canvas"
style=
"position:relative;top:0;"
>
...
...
@@ -110,7 +110,7 @@
data
()
{
return
{
tcStatus
:
false
,
linewidth
:
3
,
//线条粗细,选填
linewidth
:
5
,
//线条粗细,选填
color
:
"black"
,
//线条颜色,选填
background
:
"#fff"
,
//线条背景,选填
SignInfo
:
{},
...
...
@@ -209,6 +209,17 @@
cxt
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
},
handelSaveEl
()
{
var
imageData
=
canvas
.
getContext
(
"2d"
).
getImageData
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
for
(
var
i
=
0
;
i
<
imageData
.
data
.
length
;
i
+=
4
)
{
// 当该像素是白色的,则设置成透明
if
(
imageData
.
data
[
i
]
==
255
)
{
imageData
.
data
[
i
]
=
0
;
imageData
.
data
[
i
+
1
]
=
0
;
imageData
.
data
[
i
+
2
]
=
0
;
imageData
.
data
[
i
+
3
]
=
0
;
}
}
canvas
.
getContext
(
"2d"
).
putImageData
(
imageData
,
0
,
0
);
let
imgBase64
=
canvas
.
toDataURL
();
this
.
SignInfo
.
companySignature
=
imgBase64
;
this
.
SaveMsg
();
...
...
This diff is collapsed.
Click to expand it.
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