提交 8231d584 authored 作者: 朱政's avatar 朱政

feat:智库样式修改

上级 59089e47
流水线 #594 已通过 于阶段
in 1 分 51 秒
<template>
<div class="wrap">
<div class="scroll-inner">
<div class="scroll-inner" ref="pageScrollRef">
<div class="header">
<div class="header-top">
<div class="header-top-left">
......@@ -231,7 +231,7 @@ import DefaultIcon1 from '@/assets/icons/default-icon1.png'
import WarningPane from "@/components/base/WarningPane/index.vue"
import WordCloudChart from "@/components/base/WordCloundChart/index.vue"
import SearchContainer from "@/components/SearchContainer.vue";
import { ref, onMounted, computed, defineProps } from "vue";
import { ref, onMounted, computed, defineProps, nextTick } from "vue";
import { ElMessage } from "element-plus";
import {
getThinkTankReportAbstract,
......@@ -592,8 +592,30 @@ const switchTab = name => {
const currentPage = ref(1);
const pageSize = ref(10);
const total = ref(0);
const pageScrollRef = ref(null);
const getScrollableParent = (el) => {
let cur = el;
while (cur && cur !== document.body && cur !== document.documentElement) {
const style = window.getComputedStyle(cur);
const overflowY = style?.overflowY;
const isScrollable = overflowY === "auto" || overflowY === "scroll";
if (isScrollable && cur.scrollHeight > cur.clientHeight + 1) {
return cur;
}
cur = cur.parentElement;
}
return null;
};
const scrollToTop = async () => {
await nextTick();
const anchor = pageScrollRef.value;
if (!anchor) return;
const scrollEl = getScrollableParent(anchor) || anchor;
scrollEl.scrollTop = 0;
};
const handleCurrentChange = page => {
currentPage.value = page;
scrollToTop();
handleGetThinkTankReportViewpoint();
};
......@@ -749,9 +771,6 @@ onMounted(() => {
border-bottom: 1px solid rgba(234, 236, 238, 1);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1);
position: sticky;
top: 0;
z-index: 99999;
overflow: hidden;
.header-top {
......
......@@ -636,9 +636,6 @@ onMounted(() => {
border-bottom: 1px solid rgba(234, 236, 238, 1);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1);
position: sticky;
top: 0;
z-index: 99999;
overflow: hidden;
.header-top {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论