升级大屏组件
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="headerCenter">
|
<div class="headerCenter">
|
||||||
<div class="headerZone">
|
<div class="headerZone">
|
||||||
<div ref="fly" class="fly"/>
|
<div id="fly" class="fly"/>
|
||||||
<span>{{ title }}</span>
|
<span>{{ title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,10 +55,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {fullScreenContainer} from '@jiaminghi/data-view'
|
import {fullScreenContainer} from '@jiaminghi/data-view'
|
||||||
import {gsap} from 'gsap'
|
|
||||||
import {MotionPathPlugin} from "gsap/MotionPathPlugin.js"
|
|
||||||
import Vue from "vue";
|
import Vue from "vue";
|
||||||
import RightTopBorder from "./rightTopBorder";
|
import RightTopBorder from "./rightTopBorder";
|
||||||
|
import {Arc, Scene} from 'spritejs'
|
||||||
|
|
||||||
Vue.use(fullScreenContainer)
|
Vue.use(fullScreenContainer)
|
||||||
|
|
||||||
@@ -126,43 +125,44 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initFly() {
|
initFly() {
|
||||||
gsap.registerPlugin(MotionPathPlugin);
|
const rand = (min, max) => min + (max - min) * Math.random()
|
||||||
const rand = (min, max) => min + (max - min) * Math.random(),
|
const initScene = (count = 0) => {
|
||||||
startFly = (p) => {
|
const container = document.querySelector('#fly')
|
||||||
gsap.timeline()
|
if (container) {
|
||||||
.fromTo(p, {
|
const scene = new Scene({container, width: 600, height: 90}),
|
||||||
x: rand(0, 600),
|
layer = scene.layer()
|
||||||
y: 90 - rand(8, 50),
|
const startFly = (p) => {
|
||||||
scale: rand(1, 3),
|
let scaleNum = rand(1, 3)
|
||||||
}, {
|
const pos = [rand(0, 600), 90 - rand(8, 50)]
|
||||||
y: 0,
|
p.attr({
|
||||||
ease: 'elastic.easeInOut',
|
pos,
|
||||||
duration: rand(2, 6),
|
scale: [scaleNum, scaleNum],
|
||||||
onComplete: () => {
|
radius: 1,
|
||||||
startFly(p, true);
|
fillColor: '#0aa5ff',
|
||||||
}
|
filter: 'drop-shadow( 0, 2px, 2px, #0aa5ff)'
|
||||||
}, 0)
|
})
|
||||||
.fromTo(p, {
|
p.animate([
|
||||||
opacity: 1
|
pos,
|
||||||
}, {
|
{y: 0}
|
||||||
|
], {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
duration: rand(1, 1.5),
|
duration: rand(1, 1.5) * 1000,
|
||||||
yoyo: true,
|
iterations: Infinity,
|
||||||
repeat: -1,
|
easing: 'ease-out'
|
||||||
ease: 'power4.in'
|
})
|
||||||
}, 0)
|
setTimeout(() => layer.append(p), rand(1, 5) * 1000)
|
||||||
}
|
}
|
||||||
|
//初始化标题萤火效果
|
||||||
|
let numP = 70;
|
||||||
|
for (let i = 0; i <= numP; i++) {
|
||||||
|
const p = new Arc()
|
||||||
|
startFly(p)
|
||||||
|
}
|
||||||
|
} else if (count == 20) {
|
||||||
|
|
||||||
setTimeout(() => {
|
} else setTimeout(() => initScene(++count), 500)
|
||||||
//初始化标题萤火效果
|
}
|
||||||
let numP = 70;
|
initScene()
|
||||||
for (let i = 0; i <= numP; i++) {
|
|
||||||
let p = document.createElement('div');
|
|
||||||
p.id = "p" + i;
|
|
||||||
this.$refs.fly?.appendChild(p)
|
|
||||||
setTimeout(() => startFly(p), 1000)
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
},
|
||||||
handleSetting() {
|
handleSetting() {
|
||||||
if (this.setting.timer) clearInterval(this.setting.timer)
|
if (this.setting.timer) clearInterval(this.setting.timer)
|
||||||
@@ -533,6 +533,7 @@ export default {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerPane {
|
.headerPane {
|
||||||
align-items: initial;
|
align-items: initial;
|
||||||
z-index: 11;
|
z-index: 11;
|
||||||
@@ -542,8 +543,9 @@ export default {
|
|||||||
// background-size: 100% 88px;
|
// background-size: 100% 88px;
|
||||||
background-position-x: -8px;
|
background-position-x: -8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breatheLights {
|
.breatheLights {
|
||||||
display: none!important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerPane .headerCenter {
|
.headerPane .headerCenter {
|
||||||
@@ -561,10 +563,8 @@ export default {
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
top: 45%;
|
top: 45%;
|
||||||
line-height: 1;
|
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-family: FZZZHONGJW--GB1-0, FZZZHONGJW--GB1;
|
font-family: FZZZHONGJW--GB1-0, FZZZHONGJW--GB1;
|
||||||
font-weight: normal;
|
|
||||||
color: #CEE1FF;
|
color: #CEE1FF;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
@@ -580,13 +580,13 @@ export default {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rightTopBorder {
|
.rightTopBorder {
|
||||||
background: none;
|
background: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
::v-deep .corner {
|
::v-deep .corner {
|
||||||
display: none!important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,14 +603,14 @@ export default {
|
|||||||
|
|
||||||
.setting {
|
.setting {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-image: url("https://cdn.cunwuyun.cn/dvcp/dv/img/setting.svg")!important;
|
background-image: url("https://cdn.cunwuyun.cn/dvcp/dv/img/setting.svg") !important;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen {
|
.fullscreen {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-image: url("https://cdn.cunwuyun.cn/dvcp/dv/img/fullscreen.svg")!important;
|
background-image: url("https://cdn.cunwuyun.cn/dvcp/dv/img/fullscreen.svg") !important;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
"dvcp-ui": "^1.42.2",
|
"dvcp-ui": "^1.42.2",
|
||||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||||
"@jiaminghi/data-view": "^2.10.0",
|
"@jiaminghi/data-view": "^2.10.0",
|
||||||
"gsap": "^3.7.1",
|
|
||||||
"video.js": "^6.13.0",
|
"video.js": "^6.13.0",
|
||||||
"videojs-contrib-hls": "^5.15.0"
|
"videojs-contrib-hls": "^5.15.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user