修改首页

This commit is contained in:
xhf 2025-03-05 10:02:47 +08:00
parent 7714526705
commit 5047b212b7

View File

@ -1,4 +1,5 @@
<template> <template>
<!-- <span @click="test">11111111</span> -->
<div <div
class="affix-container" class="affix-container"
id="indexpage-container" id="indexpage-container"
@ -829,7 +830,23 @@ const linkWebSocket = (url) => {
}) })
} }
} }
const test = () => {
ElMessage({
message: () =>
h(
'div',
{
onClick: () => lookError(),
style: { cursor: 'pointer' }
},
),
dangerouslyUseHTMLString: true,
showClose: false,
duration: 2000, //
message:`<span>${111111}</span>`
})
}
const lookError = () => { const lookError = () => {
console.log('点击了') console.log('点击了')
} }
@ -896,10 +913,10 @@ const computedRatio = () => {
let width = getElementWidthByClass('indexpage-container') let width = getElementWidthByClass('indexpage-container')
getImageWidth(imgUrl.value, 'width').then((res) => { getImageWidth(imgUrl.value, 'width').then((res) => {
// console.log(res) console.log(res)
let ratioVal = width / res let ratioVal = width / res
radio.value = ratioVal radio.value = ratioVal
widthVal.value = res widthVal.value = res * radio.value
if (pointList.value.length) { if (pointList.value.length) {
pointList.value.forEach((item) => { pointList.value.forEach((item) => {
item.radio = radio.value item.radio = radio.value
@ -913,7 +930,7 @@ const computedRatio = () => {
}) })
getImageWidth(imgUrl.value, 'height').then((res) => { getImageWidth(imgUrl.value, 'height').then((res) => {
// console.log('', res) // console.log('', res)
heightVal.value = res heightVal.value = res * radio.value
}) })
// console.log(width) // console.log(width)
} }