|
|
@ -62,6 +62,28 @@ const showQuestions = async (questions) => { |
|
|
|
// emit("sendMessage"); |
|
|
|
}; |
|
|
|
|
|
|
|
// 飘屏控制 |
|
|
|
const floatingTopMouseEnter = function () { |
|
|
|
console.log("鼠标指上去"); |
|
|
|
const floatTop = document.getElementById("top"); |
|
|
|
floatTop.style.animationPlayState = "paused"; |
|
|
|
} |
|
|
|
const floatingTopMouseLeave = function () { |
|
|
|
console.log("鼠标指下去"); |
|
|
|
const floatTop = document.getElementById("top"); |
|
|
|
floatTop.style.animationPlayState = "running" |
|
|
|
} |
|
|
|
const floatingBottomMouseEnter = function () { |
|
|
|
console.log("鼠标指上去"); |
|
|
|
const floatBottom = document.getElementById("bottom"); |
|
|
|
floatBottom.style.animationPlayState = "paused"; |
|
|
|
} |
|
|
|
const floatingBottomMouseLeave = function () { |
|
|
|
console.log("鼠标指下去"); |
|
|
|
const floatBottom = document.getElementById("bottom"); |
|
|
|
floatBottom.style.animationPlayState = "running" |
|
|
|
} |
|
|
|
|
|
|
|
// 音频播放方法 |
|
|
|
const playAudio = (url) => { |
|
|
|
|
|
|
@ -944,13 +966,13 @@ onUnmounted(() => { |
|
|
|
<img :src="currentGif" alt="AI动画" /> |
|
|
|
|
|
|
|
<div class="marquee-container"> |
|
|
|
<div class="marquee-row top"> |
|
|
|
<div id="top" class="marquee-row top" @mouseenter="floatingTopMouseEnter" @mouseleave="floatingTopMouseLeave"> |
|
|
|
<div v-for="(questions, index) in questionsList.slice(0, 5)" :key="'top' + index" class="marquee-item" |
|
|
|
@click="showQuestions(questions)"> |
|
|
|
{{ questions.title }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="marquee-row bottom"> |
|
|
|
<div id="bottom" class="marquee-row bottom" @mouseenter="floatingBottomMouseEnter" @mouseleave="floatingBottomMouseLeave"> |
|
|
|
<div v-for="(questions, index) in questionsList.slice(5, 10)" :key="'bottom' + index" class="marquee-item" |
|
|
|
@click="showQuestions(questions)"> |
|
|
|
{{ questions.title }} |
|
|
@ -1065,10 +1087,14 @@ onUnmounted(() => { |
|
|
|
|
|
|
|
.top { |
|
|
|
animation: marquee 25s linear infinite; |
|
|
|
/* 默认动画是运行状态 */ |
|
|
|
animation-play-state: running; |
|
|
|
} |
|
|
|
|
|
|
|
.bottom { |
|
|
|
animation: marquee 15s linear infinite reverse; |
|
|
|
/* 默认动画是运行状态 */ |
|
|
|
animation-play-state: running; |
|
|
|
} |
|
|
|
|
|
|
|
/* 添加PC端专用速度 */ |
|
|
|