This commit is contained in:
parent
cbbcc43549
commit
b4268c9961
|
@ -12,11 +12,15 @@
|
||||||
:width="525"
|
:width="525"
|
||||||
:height="275"
|
:height="275"
|
||||||
:fallback="imgSrc"
|
:fallback="imgSrc"
|
||||||
|
:preview="false"
|
||||||
></a-image>
|
></a-image>
|
||||||
|
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ item.name }}</template>
|
<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>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,9 +62,14 @@
|
||||||
})
|
})
|
||||||
return url.value
|
return url.value
|
||||||
}
|
}
|
||||||
|
//跳转详情页
|
||||||
|
const detailFunction = (id) => {
|
||||||
|
window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const algorithmclass = document.querySelector('.algorithm-class')
|
const algorithmclass = document.querySelector('.algorithm-class')
|
||||||
if (dataLength.value) {
|
if (dataLength.value) {
|
||||||
|
//监听滚动事件
|
||||||
algorithmclass.addEventListener('scroll', (e) => {
|
algorithmclass.addEventListener('scroll', (e) => {
|
||||||
var scrollTop = e.currentTarget.scrollTop
|
var scrollTop = e.currentTarget.scrollTop
|
||||||
var windowHeight = e.currentTarget.clientHeight
|
var windowHeight = e.currentTarget.clientHeight
|
||||||
|
@ -118,7 +127,6 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 0.6rem;
|
height: 0.6rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 0.6rem;
|
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 0.22rem;
|
font-size: 0.22rem;
|
||||||
font-family: alibaba;
|
font-family: alibaba;
|
||||||
|
@ -127,11 +135,20 @@
|
||||||
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
|
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
|
||||||
no-repeat;
|
no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
span {
|
||||||
|
line-height: 0.24rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
span:last-child {
|
||||||
|
font-size: 0.14rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.algorithm-class::-webkit-scrollbar-track-piece {
|
.algorithm-class::-webkit-scrollbar-track-piece {
|
||||||
|
|
|
@ -12,11 +12,15 @@
|
||||||
:width="525"
|
:width="525"
|
||||||
:height="275"
|
:height="275"
|
||||||
:fallback="imgSrc"
|
:fallback="imgSrc"
|
||||||
|
:preview="false"
|
||||||
></a-image>
|
></a-image>
|
||||||
|
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template #title>{{ item.name }}</template>
|
<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>
|
</a-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,9 +62,14 @@
|
||||||
})
|
})
|
||||||
return url.value
|
return url.value
|
||||||
}
|
}
|
||||||
|
//跳转详情页
|
||||||
|
const detailFunction = (id) => {
|
||||||
|
window.open(window.SITE_CONFIG.previewUrl + `#/details?id=${id}`)
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const algorithmclass = document.querySelector('.algorithm-class')
|
const algorithmclass = document.querySelector('.algorithm-class')
|
||||||
if (dataLength.value) {
|
if (dataLength.value) {
|
||||||
|
//监听滚动事件
|
||||||
algorithmclass.addEventListener('scroll', (e) => {
|
algorithmclass.addEventListener('scroll', (e) => {
|
||||||
var scrollTop = e.currentTarget.scrollTop
|
var scrollTop = e.currentTarget.scrollTop
|
||||||
var windowHeight = e.currentTarget.clientHeight
|
var windowHeight = e.currentTarget.clientHeight
|
||||||
|
@ -118,7 +127,6 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 0.6rem;
|
height: 0.6rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 0.6rem;
|
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 0.22rem;
|
font-size: 0.22rem;
|
||||||
font-family: alibaba;
|
font-family: alibaba;
|
||||||
|
@ -127,11 +135,20 @@
|
||||||
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
|
background: url('~@/assets/capacitySquare/algorithm-title-bg.png')
|
||||||
no-repeat;
|
no-repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
span {
|
||||||
|
line-height: 0.24rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
span:last-child {
|
||||||
|
font-size: 0.14rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.algorithm-class::-webkit-scrollbar-track-piece {
|
.algorithm-class::-webkit-scrollbar-track-piece {
|
||||||
|
|
Loading…
Reference in New Issue