Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
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
陈玉桐
marketing
Commits
d41dd9dd
Commit
d41dd9dd
authored
Dec 06, 2019
by
陈玉桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
9e8e835c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
47 deletions
+35
-47
tool.vue
src/views/tool.vue
+35
-47
No files found.
src/views/tool.vue
View file @
d41dd9dd
<
template
>
<
template
>
<div
id=
"tool"
>
<div
id=
"tool"
>
<div
class=
"cropper"
v-if=
"cropperShow"
>
<div
class=
"cropper"
v-if=
"cropperShow"
>
<vueCropper
<vueCropper
ref=
"cropper"
ref=
"cropper"
:img=
"option.img"
:img=
"option.img"
:outputSize=
"option.size"
:outputSize=
"option.size"
:outputType=
"option.outputType"
:outputType=
"option.outputType"
:info=
"option.info"
:info=
"option.info"
:full=
"option.full"
:full=
"option.full"
:canMove=
"option.canMove"
:canMove=
"option.canMove"
:canMoveBox=
"option.canMoveBox"
:canMoveBox=
"option.canMoveBox"
:original=
"option.original"
:original=
"option.original"
:autoCrop=
"option.autoCrop"
:autoCrop=
"option.autoCrop"
:autoCropWidth=
"option.autoCropWidth"
:autoCropWidth=
"option.autoCropWidth"
:autoCropHeight=
"option.autoCropHeight"
:autoCropHeight=
"option.autoCropHeight"
:fixedBox=
"option.fixedBox"
:fixedBox=
"option.fixedBox"
@
realTime=
"realTime"
></vueCropper>
@
imgLoad=
"imgLoad"
<div
class=
"cropperOpt"
>
></vueCropper>
<span
@
click=
"cropperShow=false"
>
取消
</span>
<div
class=
"cropperOpt"
>
<span
@
click=
"croppSure"
>
完成
</span>
<span
@
click=
"cropperShow=false"
>
取消
</span>
</div>
<span
@
click=
"croppSure"
>
完成
</span>
</div>
</div>
</div>
<!-- 21天模板 -->
<!-- 21天模板 -->
<div
id=
"posterCon"
class=
"posterCon_21"
v-if=
"days==21||days==150"
>
<div
id=
"posterCon"
class=
"posterCon_21"
v-if=
"days==21||days==150"
>
<div
id=
"posterBox"
>
<div
id=
"posterBox"
>
...
@@ -198,22 +196,21 @@ import loading from '../components/loading/loading.vue'
...
@@ -198,22 +196,21 @@ import loading from '../components/loading/loading.vue'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
option
:
{
option
:
{
img
:
''
,
// 裁剪图片的地址
img
:
''
,
// 裁剪图片的地址
info
:
true
,
// 裁剪框的大小信息
info
:
true
,
// 裁剪框的大小信息
outputSize
:
1
,
// 剪切后的图片质量(0.1-1)
outputSize
:
1
,
// 剪切后的图片质量(0.1-1)
full
:
true
,
// 输出原图比例截图 props名full
full
:
true
,
// 输出原图比例截图 props名full
outputType
:
'png'
,
// 裁剪生成额图片的格式
outputType
:
'png'
,
// 裁剪生成额图片的格式
canMove
:
true
,
// 能否拖动图片
canMove
:
true
,
// 能否拖动图片
original
:
false
,
// 上传图片是否显示原始宽高
original
:
false
,
// 上传图片是否显示原始宽高
canMoveBox
:
true
,
// 能否拖动截图框
canMoveBox
:
true
,
// 能否拖动截图框
autoCrop
:
true
,
// 是否默认生成截图框
autoCrop
:
true
,
// 是否默认生成截图框
autoCropWidth
:
150
,
autoCropWidth
:
150
,
autoCropHeight
:
150
,
autoCropHeight
:
150
,
fixedBox
:
false
// 截图框固定大小
fixedBox
:
false
// 截图框固定大小
},
},
previews
:
{},
cropperShow
:
false
,
cropperShow
:
false
,
posterUrl
:
''
,
posterUrl
:
''
,
...
@@ -339,15 +336,6 @@ export default {
...
@@ -339,15 +336,6 @@ export default {
})
})
},
},
methods
:
{
methods
:
{
// 实时预览函数
realTime
(
data
)
{
console
.
log
(
'realTime'
)
this
.
previews
=
data
},
imgLoad
(
msg
)
{
console
.
log
(
'imgLoad'
)
console
.
log
(
msg
)
},
croppSure
()
{
//裁剪完成
croppSure
()
{
//裁剪完成
this
.
$refs
.
cropper
.
getCropData
(
data
=>
{
this
.
$refs
.
cropper
.
getCropData
(
data
=>
{
this
.
option
.
img
=
''
this
.
option
.
img
=
''
...
...
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