Browse Source

禁止手机飘屏停止

hxl
no99 2 months ago
parent
commit
fa99461b84
  1. 25
      src/views/AIchat.vue

25
src/views/AIchat.vue

@ -64,21 +64,46 @@ const showQuestions = async (questions) => {
//
const floatingTopMouseEnter = function () {
const userAgent = navigator.userAgent.toLowerCase();
const mobileKeywords = ['mobile', 'android', 'iphone', 'ipad', 'ipod'];
const isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
if (isMobile) {
return
}
console.log("鼠标指上去");
const floatTop = document.getElementById("top");
floatTop.style.animationPlayState = "paused";
}
const floatingTopMouseLeave = function () {
const userAgent = navigator.userAgent.toLowerCase();
const mobileKeywords = ['mobile', 'android', 'iphone', 'ipad', 'ipod'];
const isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
if (isMobile) {
return
}
console.log("鼠标指下去");
const floatTop = document.getElementById("top");
floatTop.style.animationPlayState = "running"
}
const floatingBottomMouseEnter = function () {
const userAgent = navigator.userAgent.toLowerCase();
const mobileKeywords = ['mobile', 'android', 'iphone', 'ipad', 'ipod'];
const isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
if (isMobile) {
return
}
console.log("鼠标指上去");
const floatBottom = document.getElementById("bottom");
floatBottom.style.animationPlayState = "paused";
}
const floatingBottomMouseLeave = function () {
const userAgent = navigator.userAgent.toLowerCase();
const mobileKeywords = ['mobile', 'android', 'iphone', 'ipad', 'ipod'];
const isMobile = mobileKeywords.some(keyword => userAgent.includes(keyword));
if (isMobile) {
return
}
console.log("鼠标指下去");
const floatBottom = document.getElementById("bottom");
floatBottom.style.animationPlayState = "running"

Loading…
Cancel
Save