提交 017a3f53 authored 作者: 游洋澄's avatar 游洋澄

页面更新

上级 9878a41e
public/image/stream.png

447.2 KB | W: | H:

public/image/stream.png

479.5 KB | W: | H:

public/image/stream.png
public/image/stream.png
public/image/stream.png
public/image/stream.png
  • 2-up
  • Swipe
  • Onion skin
<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:240px" <img style="maxHeight:200px"
:src="item" :src="item"
alt=""> alt="">
</a-col> --> </a-col> -->
...@@ -65,13 +65,13 @@ ...@@ -65,13 +65,13 @@
<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>
</div> </div>
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论