This commit is contained in:
851673013@qq.com 2022-08-09 16:27:04 +08:00
parent cbbcc43549
commit b4268c9961
2 changed files with 46 additions and 12 deletions

View File

@ -12,11 +12,15 @@
:width="525"
:height="275"
:fallback="imgSrc"
:preview="false"
></a-image>
<a-tooltip>
<template #title>{{ item.name }}</template>
<div class="algorithm-card-title">{{ item.name }}</div>
<div class="algorithm-card-title" @click="detailFunction(item.id)">
<span>{{ item.name }}</span>
<span>{{ item.deptName }}</span>
</div>
</a-tooltip>
</div>
</div>
@ -58,9 +62,14 @@
})
return url.value
}
//
const detailFunction = (id) => {
window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
}
onMounted(() => {
const algorithmclass = document.querySelector('.algorithm-class')
if (dataLength.value) {
//
algorithmclass.addEventListener('scroll', (e) => {
var scrollTop = e.currentTarget.scrollTop
var windowHeight = e.currentTarget.clientHeight
@ -118,7 +127,6 @@
position: absolute;
height: 0.6rem;
width: 100%;
line-height: 0.6rem;
color: #ffffff;
font-size: 0.22rem;
font-family: alibaba;
@ -127,10 +135,19 @@
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
no-repeat;
background-size: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
span {
line-height: 0.24rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
span:last-child {
font-size: 0.14rem;
}
}
}
}

View File

@ -12,11 +12,15 @@
:width="525"
:height="275"
:fallback="imgSrc"
:preview="false"
></a-image>
<a-tooltip>
<template #title>{{ item.name }}</template>
<div class="algorithm-card-title">{{ item.name }}</div>
<div class="algorithm-card-title" @click="detailFunction(item.id)">
<span>{{ item.name }}</span>
<span>{{ item.deptName }}</span>
</div>
</a-tooltip>
</div>
</div>
@ -58,9 +62,14 @@
})
return url.value
}
//
const detailFunction = (id) => {
window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
}
onMounted(() => {
const algorithmclass = document.querySelector('.algorithm-class')
if (dataLength.value) {
//
algorithmclass.addEventListener('scroll', (e) => {
var scrollTop = e.currentTarget.scrollTop
var windowHeight = e.currentTarget.clientHeight
@ -118,7 +127,6 @@
position: absolute;
height: 0.6rem;
width: 100%;
line-height: 0.6rem;
color: #ffffff;
font-size: 0.22rem;
font-family: alibaba;
@ -127,10 +135,19 @@
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
no-repeat;
background-size: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
span {
line-height: 0.24rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
span:last-child {
font-size: 0.14rem;
}
}
}
}