Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
boya-demonstration
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
游洋澄
boya-demonstration
Commits
017a3f53
提交
017a3f53
authored
11月 05, 2019
作者:
游洋澄
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
页面更新
上级
9878a41e
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
17 行增加
和
15 行删除
+17
-15
stream.png
public/image/stream.png
+0
-0
Home.vue
src/views/Home.vue
+17
-15
没有找到文件。
public/image/stream.png
查看替换文件 @
9878a41e
浏览文件 @
017a3f53
447.2 KB
|
W:
|
H:
479.5 KB
|
W:
|
H:
2-up
Swipe
Onion skin
src/views/Home.vue
浏览文件 @
017a3f53
<
template
>
<
template
>
<a-layout
id=
"components-layout-demo-responsive"
>
<a-layout
id=
"components-layout-demo-responsive"
>
<a-layout-content
:style=
"
{ margin: '10px 16px 16px 16px',height:'67%',backgroundColor:'rgba(0,0,0,0.1)'}">
<a-layout-content
:style=
"
{ margin: '10px 16px 16px 16px',height:'67%',backgroundColor:'rgba(0,0,0,0.1)'}">
<div
:style=
"
{ padding: '24px',height:'100%'}">
<div
:style=
"
{ padding: '24px',height:'100%'}">
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<a-col
:span=
"10"
>
<a-col
:span=
"10"
>
<a-card
:bordered=
"false"
<a-card
:bordered=
"false"
style=
"height:100%;width:47%;background-color:rgba(100,100,100,0.1);margin-left:20px;"
>
style=
"height:100%;width:47%;background-color:rgba(100,100,100,0.1);margin-left:20px;"
>
<img
style=
"height:100%;"
<img
style=
"height:100%;
maxHeight:200px;
"
alt=
"example"
alt=
"example"
:src=
"currentInfo.url"
:src=
"currentInfo.url"
slot=
"cover"
/>
slot=
"cover"
/>
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
style=
"margin-bottom:10px;background-color:rgba(0,0,0,0);"
style=
"margin-bottom:10px;background-color:rgba(0,0,0,0);"
v-for=
"(item,i) in data1PhotoArray"
v-for=
"(item,i) in data1PhotoArray"
:key=
"i"
>
:key=
"i"
>
<img
style=
"maxHeight:2
4
0px"
<img
style=
"maxHeight:2
0
0px"
:src=
"item"
:src=
"item"
alt=
""
>
alt=
""
>
</a-col>
-->
</a-col>
-->
...
@@ -65,12 +65,12 @@
...
@@ -65,12 +65,12 @@
<div
@
click=
"scrollTo(index)"
<div
@
click=
"scrollTo(index)"
style=
"display:inline-block;padding: 10px;text-align:center;"
>
style=
"display:inline-block;padding: 10px;text-align:center;"
>
<a-card
hoverable
<a-card
hoverable
style=
"height:100%;"
>
style=
"height:100%;
width:80%;
"
>
<img
alt=
"example"
<img
alt=
"example"
style=
"max-height:200px;"
style=
"max-height:200px;"
:src=
"item.url"
:src=
"item.url"
slot=
"cover"
/>
slot=
"cover"
/>
<a-card-meta
title=
"时间戳"
>
<a-card-meta>
<template
slot=
"description"
>
{{
item
.
timestamp
}}
</
template
>
<template
slot=
"description"
>
{{
item
.
timestamp
}}
</
template
>
</a-card-meta>
</a-card-meta>
</a-card>
</a-card>
...
@@ -90,6 +90,7 @@
...
@@ -90,6 +90,7 @@
// @ is an alias to /src
// @ is an alias to /src
import
{
getDemonstrationInfo
}
from
'@/api/demonstrate'
import
{
getDemonstrationInfo
}
from
'@/api/demonstrate'
import
'videojs-flash'
import
'videojs-flash'
import
moment
from
'moment'
const
formatData
=
function
(
data
,
data1PhotoArray
,
_this
,
timestamp
)
{
const
formatData
=
function
(
data
,
data1PhotoArray
,
_this
,
timestamp
)
{
if
(
data
.
mixed
!==
null
)
{
if
(
data
.
mixed
!==
null
)
{
...
@@ -99,13 +100,13 @@ const formatData = function (data, data1PhotoArray, _this, timestamp) {
...
@@ -99,13 +100,13 @@ const formatData = function (data, data1PhotoArray, _this, timestamp) {
formatData
(
item
.
mixed
,
data1PhotoArray
,
_this
,
timestamp
)
formatData
(
item
.
mixed
,
data1PhotoArray
,
_this
,
timestamp
)
// debugger
// debugger
}
else
{
}
else
{
data1PhotoArray
.
push
({
data1PhotoArray
.
unshift
({
url
:
item
.
url
,
url
:
item
.
url
,
timestamp
timestamp
:
moment
.
utc
(
timestamp
).
local
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
})
})
_this
.
currentInfo
=
{
_this
.
currentInfo
=
{
url
:
item
.
url
,
url
:
item
.
url
,
timestamp
timestamp
:
moment
.
utc
(
timestamp
).
local
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
}
// debugger
// debugger
}
}
...
@@ -172,7 +173,7 @@ export default {
...
@@ -172,7 +173,7 @@ export default {
},
},
swiperOption
:
function
()
{
swiperOption
:
function
()
{
return
{
return
{
slidesPerView
:
6
,
slidesPerView
:
10
,
spaceBetween
:
0
,
spaceBetween
:
0
,
freeMode
:
true
,
freeMode
:
true
,
pagination
:
{
pagination
:
{
...
@@ -195,16 +196,17 @@ export default {
...
@@ -195,16 +196,17 @@ export default {
formatData
(
el
.
data
,
this
.
data1PhotoArray
,
this
,
el
.
timestamp
)
formatData
(
el
.
data
,
this
.
data1PhotoArray
,
this
,
el
.
timestamp
)
}
}
console
.
log
(
this
.
data1PhotoArray
)
console
.
log
(
this
.
data1PhotoArray
)
},
data1PhotoArray
(
newValue
,
oldValue
)
{
if
(
newValue
.
length
>
12
)
{
newValue
.
shift
()
this
.
data1PhotoArray
=
newValue
}
}
}
// data1PhotoArray (newValue, oldValue) {
// if (newValue.length > 12) {
// newValue.pop()
// this.data1PhotoArray = newValue
// }
// }
},
},
methods
:
{
methods
:
{
moment
,
start
()
{
start
()
{
const
_this
=
this
const
_this
=
this
const
clock
=
setInterval
(
function
()
{
const
clock
=
setInterval
(
function
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论