Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mould-vuecli3
Project
Project
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
lhfe
mould-vuecli3
Commits
4f641539
Commit
4f641539
authored
Aug 27, 2020
by
lilei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of gitlab.ilaihua.com:laihua-web/laihua-toolkit into develop
parents
d0fac4be
957acf44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
208 additions
and
5 deletions
+208
-5
index.vue
src/components/sideNav/index.vue
+1
-1
videoConverter.vue
src/views/videoConverter.vue
+207
-4
No files found.
src/components/sideNav/index.vue
View file @
4f641539
...
...
@@ -3,7 +3,7 @@
<router-link
to=
"/"
>
Home
</router-link>
<router-link
to=
"/about"
>
About
</router-link>
<router-link
to=
"/cutter"
>
cutter
</router-link>
<router-link
to=
"/videoConverter"
>
videoConverter
</router-link>
<router-link
to=
"/videoConverter"
>
转换宝
</router-link>
<router-link
to=
"/screenshot"
>
screenshot
</router-link>
</div>
</
template
>
...
...
src/views/videoConverter.vue
View file @
4f641539
<
template
>
<div
class=
"videoConverter"
>
转换baby
</div>
<div
class=
"videoConverter"
>
<ul>
<li
v-for=
"(item, index) in taskList"
:key=
"index"
>
<div
class=
"info"
>
<div
class=
"cove"
>
视频封面
</div>
<div>
<div>
{{
item
.
name
}}
.mp4
</div>
<div>
时长:
{{
item
.
duration
}}
</div>
</div>
</div>
<div
class=
"operationPanel"
>
<div
class=
"wait"
v-show=
"item.state == 0"
>
<div>
输出格式
</div>
<div
class=
"selectionFormat"
>
mp4
</div>
<div
class=
"delete"
@
click=
"clearAllTasks(item)"
>
删除
</div>
</div>
<div
class=
"active"
v-show=
"item.state == 1"
>
<div
class=
"progress"
>
<div>
转换中
{{
item
.
progress
}}
%
</div>
<div
class=
"slide"
>
<div></div>
</div>
</div>
<div
class=
"stop"
@
click=
"stopTask(item)"
>
取消
</div>
</div>
</div>
</li>
</ul>
<div
class=
"editBar"
>
<div
class=
"addVideo"
@
click=
"addVideo"
>
添加视频
</div>
<div
class=
"clearList"
@
click=
"clearAllTasks"
>
清空列表
</div>
<div
class=
"clearWatermark"
>
去除水印
</div>
</div>
<div
class=
"startAll"
@
click=
"startAllTasks"
>
开始转换
</div>
</div>
</
template
>
<
script
>
...
...
@@ -8,20 +45,186 @@ export default {
components
:
{},
props
:
{},
data
()
{
return
{}
return
{
taskList
:
[]
}
},
computed
:
{},
watch
:
{},
methods
:
{}
methods
:
{
addVideo
()
{
this
.
taskList
.
push
({
cover
:
''
,
name
:
'视频片段'
+
(
this
.
taskList
.
length
+
1
),
duration
:
'10:00'
,
state
:
0
,
progress
:
60
,
outputFormat
:
'mp4'
})
},
stopTask
(
item
)
{
item
.
state
=
0
},
clearTask
(
item
)
{
let
index
=
this
.
taskList
(
item
)
if
(
index
>
-
1
)
{
this
.
taskList
.
splice
(
index
,
1
)
}
},
clearAllTasks
()
{
this
.
taskList
=
[]
},
startAllTasks
()
{
this
.
taskList
.
forEach
((
task
)
=>
{
task
.
state
=
1
})
}
},
created
()
{
for
(
let
i
=
1
;
i
<
10
;
i
++
)
{
this
.
taskList
.
push
({
cover
:
''
,
name
:
'视频片段'
+
i
,
duration
:
'10:00'
,
state
:
0
,
progress
:
60
,
outputFormat
:
'mp4'
})
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.videoConverter
{
width
:
100%
;
height
:
100%
;
height
:
800px
;
background-color
:
#fff
;
border
:
0px
solid
black
;
margin
:
0px
;
padding
:
0
20px
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
cursor
:
pointer
;
overflow
:
hidden
;
>
ul
{
width
:
100%
;
height
:
100%
;
border
:
1px
solid
black
;
flex-grow
:
1
;
overflow-y
:
scroll
;
>
li
{
padding
:
5px
0
;
height
:
60px
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
>
li
:nth-of-type
(
odd
)
{
background-color
:
gainsboro
;
}
.info
{
display
:
flex
;
align-items
:
center
;
.cove
{
width
:
100px
;
height
:
40px
;
background-color
:
#ccc
;
line-height
:
40px
;
margin-right
:
10px
;
}
}
.operationPanel
{
width
:
300px
;
height
:
100%
;
.wait
{
height
:
100%
;
display
:
flex
;
align-items
:
center
;
.selectionFormat
{
height
:
30px
;
width
:
100px
;
line-height
:
30px
;
border
:
1px
solid
black
;
margin-left
:
20px
;
}
.delete
{
width
:
60px
;
height
:
30px
;
line-height
:
30px
;
background-color
:
black
;
color
:
#fff
;
margin-left
:
20px
;
}
}
.active
{
height
:
100%
;
width
:
300px
;
display
:
flex
;
align-items
:
center
;
.progress
{
}
.slide
{
width
:
200px
;
height
:
5px
;
background
:
gray
;
>
div
{
width
:
120px
;
height
:
100%
;
background-color
:
black
;
}
}
.stop
{
width
:
60px
;
height
:
30px
;
line-height
:
30px
;
background-color
:
black
;
color
:
#fff
;
margin-left
:
20px
;
}
}
}
}
.editBar
{
position
:
relative
;
height
:
30px
;
width
:
100%
;
margin
:
20px
0
;
.addVideo
{
position
:
absolute
;
left
:
0
;
height
:
30px
;
line-height
:
30px
;
border
:
1px
solid
black
;
}
.clearList
{
position
:
absolute
;
left
:
100px
;
height
:
30px
;
line-height
:
30px
;
border
:
1px
solid
black
;
}
.clearWatermark
{
position
:
absolute
;
right
:
0
;
height
:
30px
;
line-height
:
30px
;
border
:
1px
solid
black
;
}
}
.startAll
{
height
:
30px
;
width
:
100px
;
background-color
:
black
;
color
:
#fff
;
line-height
:
30px
;
}
}
</
style
>
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