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
c70f4cbe
Commit
c70f4cbe
authored
Aug 27, 2020
by
lilei
Browse files
Options
Browse Files
Download
Plain Diff
格式
parents
492c6043
1eba1ab8
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
315 additions
and
67 deletions
+315
-67
.eslintrc.js
.eslintrc.js
+23
-2
App.vue
src/App.vue
+8
-4
index.vue
src/components/header/index.vue
+16
-3
tutorialContent.vue
src/components/misc/tutorialContent.vue
+14
-0
completeContent.vue
src/components/modal/completeContent.vue
+16
-0
completeModal.vue
src/components/modal/completeModal.vue
+23
-0
modalLayer.vue
src/components/modal/modalLayer.vue
+31
-0
selectContent.vue
src/components/modal/selectContent.vue
+26
-0
selectModal.vue
src/components/modal/selectModal.vue
+23
-0
index.vue
src/components/rightPanel/index.vue
+1
-1
index.vue
src/components/sideNav/index.vue
+15
-5
videoChange.vue
src/components/videoCutter/videoChange.vue
+4
-1
videoControl.vue
src/components/videoCutter/videoControl.vue
+21
-12
videoPlayer.vue
src/components/videoCutter/videoPlayer.vue
+8
-5
screenshot.vue
src/views/screenshot.vue
+6
-2
videoConverter.vue
src/views/videoConverter.vue
+64
-24
videoCutter.vue
src/views/videoCutter.vue
+14
-6
vue.config.js
vue.config.js
+2
-2
No files found.
.eslintrc.js
View file @
c70f4cbe
...
@@ -10,7 +10,7 @@ module.exports = {
...
@@ -10,7 +10,7 @@ module.exports = {
// 3: ESLint + Standard config
// 3: ESLint + Standard config
// extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// extends: [ 'plugin:vue/essential', '@vue/airbnb',],
// ESLint + Prettier
// ESLint + Prettier
extends
:
[
'plugin:vue/
essential'
,
'eslint:recommended'
,
'@vue/prettier
'
],
extends
:
[
'plugin:vue/
recommended'
,
'eslint:recommended
'
],
plugins
:
[],
plugins
:
[],
parserOptions
:
{
parserOptions
:
{
parser
:
'babel-eslint'
parser
:
'babel-eslint'
...
@@ -27,6 +27,27 @@ module.exports = {
...
@@ -27,6 +27,27 @@ module.exports = {
// "prettier/prettier": "warn",
// "prettier/prettier": "warn",
// "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
// "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
'no-console'
:
[
0
,
{
llow
:
[
'warn'
,
'error'
]
}],
'no-console'
:
[
0
,
{
llow
:
[
'warn'
,
'error'
]
}],
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
'no-debugger'
:
process
.
env
.
NODE_ENV
===
'production'
?
'warn'
:
'off'
,
indent
:
[
'error'
,
4
,
{
SwitchCase
:
1
,
flatTernaryExpressions
:
true
}
],
'comma-dangle'
:
[
'error'
,
'never'
],
quotes
:
[
'error'
,
'single'
],
'vue/html-indent'
:
[
'error'
,
4
,
{
attribute
:
1
,
baseIndent
:
1
,
closeBracket
:
0
,
alignAttributesVertically
:
true
,
ignores
:
[]
}
]
}
}
}
}
src/App.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<common-header
></common-header
>
<common-header
/
>
<body
class=
"body-container"
>
<body
class=
"body-container"
>
<side-nav
></side-nav
>
<side-nav
/
>
<router-view
style=
"flex:1;border: 1px solid #666;"
></router-view
>
<router-view
style=
"flex:1;border: 1px solid #666;"
/
>
<right-panel
></right-panel
>
<right-panel
/
>
</body>
</body>
<modal-layer
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
CommonHeader
from
'@/components/header/index.vue'
import
CommonHeader
from
'@/components/header/index.vue'
import
ModalLayer
from
'@/components/modal/modalLayer.vue'
export
default
{
export
default
{
components
:
{
components
:
{
CommonHeader
,
CommonHeader
,
ModalLayer
,
SideNav
:
()
=>
import
(
'@/components/sideNav/index.vue'
),
SideNav
:
()
=>
import
(
'@/components/sideNav/index.vue'
),
RightPanel
:
()
=>
import
(
'@/components/rightPanel/index.vue'
)
RightPanel
:
()
=>
import
(
'@/components/rightPanel/index.vue'
)
},
},
...
@@ -37,6 +40,7 @@ export default {
...
@@ -37,6 +40,7 @@ export default {
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100vh
;
height
:
100vh
;
position
:
relative
;
}
}
.body-container
{
.body-container
{
...
...
src/components/header/index.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"comp-commonheader"
>
<div
class=
"comp-commonheader"
>
<h1>
LAIHUA
</h1>
<h1>
LAIHUA
</h1>
<div
class=
"current-page"
>
当前的宝
</div>
<div
class=
"current-page"
>
<tip-panel></tip-panel>
当前的宝
</div>
<tip-panel
/>
<div
class=
"show-modal"
@
click=
"showModal"
>
show-modal
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -15,7 +23,12 @@ export default {
...
@@ -15,7 +23,12 @@ export default {
return
{}
return
{}
},
},
created
()
{},
created
()
{},
mounted
()
{}
mounted
()
{},
methods
:
{
showModal
()
{
this
.
$modal
.
show
(
'selectModal'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/components/misc/tutorialContent.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<div
/>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/modal/completeContent.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<div>
complete content
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/modal/completeModal.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<modal
name=
"completeModal"
:click-to-close=
"false"
>
<complete-content
/>
</modal>
</
template
>
<
script
>
import
CompleteContent
from
'./completeContent'
export
default
{
components
:
{
CompleteContent
},
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/modal/modalLayer.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<div
class=
"modal-layer"
>
<complete-modal
/>
<select-modal
/>
</div>
</
template
>
<
script
>
import
CompleteModal
from
'@/components/modal/completeModal'
import
SelectModal
from
'@/components/modal/selectModal'
export
default
{
components
:
{
CompleteModal
,
SelectModal
},
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.modal-layer
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
0
;
height
:
0
;
}
</
style
>
src/components/modal/selectContent.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<div>
<div
class=
"close-btn"
@
click=
"close"
>
close
</div>
选择视频
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
methods
:
{
close
()
{
this
.
$modal
.
hide
(
'selectModal'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/modal/selectModal.vue
0 → 100644
View file @
c70f4cbe
<
template
>
<modal
name=
"selectModal"
:click-to-close=
"false"
>
<select-content
/>
</modal>
</
template
>
<
script
>
import
SelectContent
from
'./selectContent'
export
default
{
components
:
{
SelectContent
},
data
()
{
return
{}
},
methods
:
{}
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/components/rightPanel/index.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"comp-rightpanel"
>
<div
class=
"comp-rightpanel"
>
<router-view
name=
"panel"
></router-view
>
<router-view
name=
"panel"
/
>
</div>
</div>
</
template
>
</
template
>
...
...
src/components/sideNav/index.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"comp-sidenav"
>
<div
class=
"comp-sidenav"
>
<router-link
to=
"/"
>
Home
</router-link>
<router-link
to=
"/"
>
<router-link
to=
"/about"
>
About
</router-link>
Home
<router-link
to=
"/cutter"
>
cutter
</router-link>
</router-link>
<router-link
to=
"/videoConverter"
>
转换宝
</router-link>
<router-link
to=
"/about"
>
<router-link
to=
"/screenshot"
>
screenshot
</router-link>
About
</router-link>
<router-link
to=
"/cutter"
>
cutter
</router-link>
<router-link
to=
"/videoConverter"
>
转换宝
</router-link>
<router-link
to=
"/screenshot"
>
screenshot
</router-link>
</div>
</div>
</
template
>
</
template
>
...
...
src/components/videoCutter/videoChange.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"video-change"
@
click=
"changeVideo"
>
<div
class=
"video-change"
@
click=
"changeVideo"
>
替换视频
替换视频
</div>
</div>
</
template
>
</
template
>
...
...
src/components/videoCutter/videoControl.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"video-control"
>
<div
class=
"video-control"
>
<div
class=
"video-play-btn"
@
click=
"play()"
>
播放
</div>
<div
class=
"video-play-btn"
@
click=
"play()"
>
播放
</div>
<div
class=
"video-time-content"
>
<div
class=
"video-time-content"
>
<div
class=
"now-time"
>
{{
nowTime
|
formatTime
}}
</div>
<div
class=
"now-time"
>
{{
nowTime
|
formatTime
}}
</div>
<span>
/
</span>
<span>
/
</span>
<div
class=
"total-time"
>
{{
duration
|
formatTime
}}
</div>
<div
class=
"total-time"
>
{{
duration
|
formatTime
}}
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{}
},
props
:
[
'duration'
,
'nowTime'
],
methods
:
{
play
()
{
this
.
$emit
(
'play'
)
}
},
filters
:
{
filters
:
{
formatTime
(
duration
)
{
formatTime
(
duration
)
{
if
(
duration
<=
0
)
return
'00:00'
if
(
duration
<=
0
)
return
'00:00'
...
@@ -31,6 +31,15 @@ export default {
...
@@ -31,6 +31,15 @@ export default {
sec
=
sec
||
'00'
sec
=
sec
||
'00'
return
min
+
':'
+
sec
return
min
+
':'
+
sec
}
}
},
props
:
[
'duration'
,
'nowTime'
],
// eslint-disable-line
data
()
{
return
{}
},
methods
:
{
play
()
{
this
.
$emit
(
'play'
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/components/videoCutter/videoPlayer.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"video-player"
>
<div
class=
"video-player"
>
<video
ref=
"videoDom"
src=
"https://resources.laihua.com/2020-7-27/547adf9b-73b0-4b14-bed6-6ee278a1b2b2.mp4"
></video>
<video
ref=
"videoDom"
src=
"https://resources.laihua.com/2020-7-27/547adf9b-73b0-4b14-bed6-6ee278a1b2b2.mp4"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -33,6 +36,10 @@ export default {
...
@@ -33,6 +36,10 @@ export default {
})
})
})
})
},
},
beforeDestroy
()
{
this
.
$refs
.
videoDom
.
removeEventListener
(
'canplay'
)
this
.
$refs
.
videoDom
.
removeEventListener
(
'ended'
)
},
methods
:
{
methods
:
{
canPlayFunc
()
{
canPlayFunc
()
{
this
.
canPlay
=
true
this
.
canPlay
=
true
...
@@ -51,10 +58,6 @@ export default {
...
@@ -51,10 +58,6 @@ export default {
if
(
!
this
.
canPlay
)
return
if
(
!
this
.
canPlay
)
return
this
.
$refs
.
videoDom
.
currentTime
=
time
this
.
$refs
.
videoDom
.
currentTime
=
time
}
}
},
beforeDestroy
()
{
this
.
$refs
.
videoDom
.
removeEventListener
(
'canplay'
)
this
.
$refs
.
videoDom
.
removeEventListener
(
'ended'
)
}
}
}
}
</
script
>
</
script
>
...
...
src/views/screenshot.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"screenshot"
>
<div
class=
"screenshot"
>
<div
class=
"content"
>
<div
class=
"content"
>
<video
id=
"screenshot-video"
></video
>
<video
id=
"screenshot-video"
/
>
</div>
</div>
<div
class=
"operate-area"
>
<div
class=
"operate-area"
>
<input
id=
"screenshot-input"
type=
"file"
style=
"display:none;"
/>
<input
id=
"screenshot-input"
type=
"file"
style=
"display:none;"
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
src/views/videoConverter.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"videoConverter"
>
<div
class=
"videoConverter"
>
<ul>
<ul>
<li
v-for=
"(item, index) in taskList"
:key=
"index"
>
<li
v-for=
"(item, index) in taskList"
:key=
"index"
>
<div
class=
"info"
>
<div
class=
"info"
>
<div
class=
"cove"
>
视频封面
</div>
<div
class=
"cove"
>
视频封面
</div>
<div>
<div>
<div>
{{
item
.
name
}}
.mp4
</div>
<div>
{{
item
.
name
}}
.mp4
</div>
<div>
时长:
{{
item
.
duration
}}
</div>
<div>
时长:
{{
item
.
duration
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"operationPanel"
>
<div
class=
"operationPanel"
>
<div
class=
"wait"
v-show=
"item.state == 0"
>
<div
v-show=
"item.state == 0"
class=
"wait"
>
<div>
输出格式
</div>
<div>
输出格式
</div>
<div
class=
"selectionFormat"
>
mp4
</div>
<div
class=
"selectionFormat"
>
<div
class=
"delete"
@
click=
"clearTask(item)"
>
删除
</div>
mp4
</div>
<div
class=
"delete"
@
click=
"clearTask(item)"
>
删除
</div>
</div>
</div>
<div
class=
"active"
v-show=
"item.state == 1"
>
<div
v-show=
"item.state == 1"
class=
"active"
>
<div
class=
"progress"
>
<div
class=
"progress"
>
<div>
转换中
{{
item
.
progress
}}
%
</div>
<div>
转换中
{{
item
.
progress
}}
%
</div>
<div
class=
"slide"
>
<div
class=
"slide"
>
<div
></div
>
<div
/
>
</div>
</div>
</div>
</div>
<div
class=
"stop"
@
click=
"stopTask(item)"
>
取消
</div>
<div
class=
"stop"
@
click=
"stopTask(item)"
>
取消
</div>
</div>
</div>
</div>
</div>
</li>
</li>
</ul>
</ul>
<div
class=
"editBar"
>
<div
class=
"editBar"
>
<div
class=
"addVideo"
@
click=
"addVideo"
>
添加视频
</div>
<div
<div
class=
"clearList"
@
click=
"clearAllTasks"
>
清空列表
</div>
class=
"addVideo"
<div
class=
"clearWatermark"
>
去除水印
</div>
@
click=
"addVideo"
>
添加视频
</div>
<div
class=
"clearList"
@
click=
"clearAllTasks"
>
清空列表
</div>
<div
class=
"clearWatermark"
>
去除水印
</div>
</div>
</div>
<div
class=
"startAll"
@
click=
"startAllTasks"
>
开始转换
</div>
<div
class=
"startAll"
@
click=
"startAllTasks"
>
开始转换
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -51,6 +91,18 @@ export default {
...
@@ -51,6 +91,18 @@ export default {
},
},
computed
:
{},
computed
:
{},
watch
:
{},
watch
:
{},
created
()
{
for
(
let
i
=
1
;
i
<
10
;
i
++
)
{
this
.
taskList
.
push
({
cover
:
''
,
name
:
'视频片段'
+
i
,
duration
:
'10:00'
,
state
:
0
,
progress
:
60
,
outputFormat
:
'mp4'
})
}
},
methods
:
{
methods
:
{
addVideo
()
{
addVideo
()
{
this
.
taskList
.
push
({
this
.
taskList
.
push
({
...
@@ -79,18 +131,6 @@ export default {
...
@@ -79,18 +131,6 @@ export default {
task
.
state
=
1
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
>
</
script
>
...
...
src/views/videoCutter.vue
View file @
c70f4cbe
<
template
>
<
template
>
<div
class=
"video-cutter"
>
<div
class=
"video-cutter"
>
<div
class=
"video-content"
>
<div
class=
"video-content"
>
<VideoPlayer
@
currentTime=
"changeTime"
@
end=
"playEnd"
@
timeupdate=
"timeupdate"
/>
<VideoPlayer
@
currentTime=
"changeTime"
@
end=
"playEnd"
@
timeupdate=
"timeupdate"
/>
</div>
</div>
<div
class=
"video-btn"
>
<div
class=
"video-btn"
>
<videoChange
@
changeVideo=
"changeVideo"
/>
<videoChange
@
changeVideo=
"changeVideo"
/>
<videoControl
:duration=
"duration"
:nowTime=
"nowTime"
@
play=
"videoPlay"
/>
<videoControl
<div></div>
:duration=
"duration"
:now-time=
"nowTime"
@
play=
"videoPlay"
/>
<div
/>
</div>
</div>
<div
></div
>
<div
/
>
<div
></div
>
<div
/
>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
name
:
'VideoCutter'
,
components
:
{
components
:
{
VideoPlayer
:
()
=>
import
(
'@/components/videoCutter/videoPlayer.vue'
),
VideoPlayer
:
()
=>
import
(
'@/components/videoCutter/videoPlayer.vue'
),
VideoChange
:
()
=>
import
(
'@/components/videoCutter/videoChange.vue'
),
VideoChange
:
()
=>
import
(
'@/components/videoCutter/videoChange.vue'
),
VideoControl
:
()
=>
import
(
'@/components/videoCutter/videoControl.vue'
)
VideoControl
:
()
=>
import
(
'@/components/videoCutter/videoControl.vue'
)
},
},
name
:
'videoCutter'
,
data
()
{
data
()
{
return
{
return
{
name
:
''
,
name
:
''
,
...
...
vue.config.js
View file @
c70f4cbe
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* @
* @
*/
*/
// console.log(`process.env1:`, process.env);
// console.log(`process.env1:`, process.env);
console
.
log
(
`process.env.NODE_ENV1:`
,
process
.
env
.
NODE_ENV
)
console
.
log
(
'process.env.NODE_ENV1:'
,
process
.
env
.
NODE_ENV
)
module
.
exports
=
{
module
.
exports
=
{
// outputDir: process.env.outputDir,
// outputDir: process.env.outputDir,
...
@@ -43,7 +43,7 @@ module.exports = {
...
@@ -43,7 +43,7 @@ module.exports = {
css
:
{
css
:
{
loaderOptions
:
{
loaderOptions
:
{
sass
:
{
sass
:
{
prependData
:
`@import "@/assets/style/index.scss";`
prependData
:
'@import "@/assets/style/index.scss";'
}
}
}
}
}
}
...
...
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