Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
253de5f9
Commit
253de5f9
authored
Mar 31, 2021
by
李俊赕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑拍照页面
parent
c186de06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
take.vue
take-order/pages/photo/take.vue
+23
-9
No files found.
take-order/pages/photo/take.vue
View file @
253de5f9
...
@@ -372,20 +372,29 @@
...
@@ -372,20 +372,29 @@
canvas
.
setFontSize
(
14
)
canvas
.
setFontSize
(
14
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
let
txt
=
settingTxtArr
[
i
]
let
txt
=
settingTxtArr
[
i
]
if
(
txt
.
length
>
14
){
// if(txt.length>14){
canvas
.
fillText
(
txt
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt.substr(14,18), 10, canvasHeight - txtHeight * h++);
canvas
.
fillText
(
txt
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt.substr(0,18), 10, canvasHeight - txtHeight * h++);
}
else
{
// }else{
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
// }
canvas
.
fillText
(
txt
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
// canvas.fillText(txt, 10, canvasHeight - txtHeight * h++);
}
}
const
title
=
this
.
titleTxt
const
title
=
this
.
titleTxt
if
(
title
){
if
(
title
){
txtHeight
=
20
canvas
.
save
()
let
titleHeight
=
title
.
length
>
14
?
60
:
30
canvas
.
setFillStyle
(
'rgba(34, 114, 255, 0.6)'
)
canvas
.
fillRect
(
10
,
canvasHeight
-
txtHeight
*
h
-
titleHeight
,
215
,
titleHeight
)
canvas
.
restore
()
canvas
.
setFontSize
(
20
)
canvas
.
setFontSize
(
20
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
setFillStyle
(
'#f2f2f2'
)
canvas
.
fillText
(
title
,
10
,
canvasHeight
-
txtHeight
*
h
++
);
// canvas.setTextAlign('center')
if
(
title
.
length
>
14
){
canvas
.
fillText
(
title
.
substr
(
14
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
);
}
canvas
.
fillText
(
title
.
substr
(
0
,
14
),
10
,
canvasHeight
-
txtHeight
*
h
++
-
titleHeight
/
2
);
}
}
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
if
(
this
.
waterSetting
&&
this
.
waterSetting
.
mid_text
){
//加入 水印图片
//加入 水印图片
...
@@ -511,8 +520,13 @@
...
@@ -511,8 +520,13 @@
white-space
:
normal
;
white-space
:
normal
;
font-size
:
28rpx
;
font-size
:
28rpx
;
color
:
#fff
;
color
:
#fff
;
.big
{
&
.big
{
padding
:
10rpx
;
margin-bottom
:
10rpx
;
width
:
430rpx
;
line-height
:
40rpx
;
font-size
:
32rpx
;
font-size
:
32rpx
;
background-color
:
rgba
(
34
,
114
,
255
,
0
.6
);
}
}
}
}
}
}
...
...
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