当前位置: 首页 > news >正文

自上而下的间隔滚动

页面中(特别是首页)中的类表格或者文档信息类的滚动使用,具体UI需要根据设计图进行代码编写,动效可直接复用。

页面中使用的js为scroll.js,以往的笔记中有记录

组件代码:

<!--* @Author: menxiaojin* @Date: 2023-05-05 15:25:31* @LastEditors: menxiaojin* @LastEditTime: 2023-05-06 17:30:27
-->
<template>
<div class="tableScrollCock"><div class="tableTitle"><div v-for="(item,index) in titleList" :key="index" :class="item.class">{{item.name}}</div></div><div class="tableContent" :id="idOutBox" :style="{height:boxHeight}"><div :id="idNeiBox"><div class="tableBox" v-for="(item,index) in list" :key="index"><div class="titleNum">{{index+1}}<span class="numOne" v-if="index==0"></span><span class="numTwo" v-if="index==1"></span><span class="numThree" v-if="index==2"></span></div><div class="titleName">{{item.partyName}}</div><div class="titleScore scoreOne" v-if="index==0">{{item.score}}</div><div class="titleScore scoreTwo" v-if="index==1">{{item.score}}</div><div class="titleScore scoreThree" v-if="index==2">{{item.score}}</div><div class="titleScore" v-if="index!=0&&index!=1&&index!=2">{{item.score}}</div></div></div></div>
</div>
</template>
<script>
import {scrollCustom} from './scroll'
export default {props:{titleList:{type:Array,default:()=>[{class:'titleNum',name:'排名'},{class:'titleName',name:'党群名称'},{class:'titleScore',name:'活力指数'}]},idOutBox:{type:String,default:'tableScroll'},idNeiBox:{type:String,default:'tabkleContent'},list:{type:Array,default:()=>[{id:'',partyName:'林家村党组织',score:2060},{id:'',partyName:'辛店街道党组织',score:2060},{id:'',partyName:'六户村党组织',score:2060},{id:'',partyName:'牛庄镇东庞社区党',score:2060},{id:'',partyName:'百华石油技术开发',score:2060},{id:'',partyName:'天水社区党组织',score:2060}]},boxHeight:{type:String,default:'175px'}},data() {return {}},created() {},methods: {},mounted() {//滚动scrollCustom(this.idOutBox, this.idNeiBox, 38, 500, 50)},
}
</script><style scoped lang="scss">
/* 活力分数排行榜 */
.tableScrollCock{margin-top: 10px;.tableTitle{width: 100%;height: 32px;display: flex;background: url('~@/assets/cockpit/tableTitle.png') no-repeat;background-size: 100% 100%;line-height: 28px;color: #AFBED8;font-size:14px;font-style: oblique;.titleNum{width: 80px;text-align: center;}.titleName{flex: 1;padding-left: 30px;}.titleScore{width: 100px;text-align: center;}}.tableContent{overflow: hidden;}.tableBox:nth-child(2n){background: url('~@/assets/cockpit/tableBg1.png') no-repeat;background-size: 100% 100%;}.tableBox{width: 100%;height: 28px;display: flex;background: url('~@/assets/cockpit/tableBg2.png') no-repeat;background-size: 100% 100%;line-height: 28px;color: #AFBED8;font-size:14px;font-style: oblique;margin-top: 10px;.titleNum{width: 80px;text-align: center;color: #FFFFFF;font-weight: 550;position: relative;z-index: 1;.numOne{width: 50px;height: 15px;// background: #FC1718;position: absolute;top:7px;left: 50%;margin-left: -25px;z-index: -1;background-image: -webkit-linear-gradient(left,rgba(252, 23, 24, 0) 0%,rgba(252, 23, 24, 0.1) 20%,rgba(252, 23, 24, 1) 50%,rgba(252, 23, 24, 0.1) 80%,rgba(252, 23, 24, 0) 100%);}.numTwo{width: 50px;height: 15px;// background: #FC1718;position: absolute;top:7px;left: 50%;margin-left: -25px;z-index: -1;background-image: -webkit-linear-gradient(left,rgba(167, 191, 212, 0) 0%,rgba(167, 191, 212, 0.1) 20%,rgba(167, 191, 212, 1) 50%,rgba(167, 191, 212, 0.1) 80%,rgba(167, 191, 212, 0) 100%);}.numThree{width: 50px;height: 15px;// background: #FC1718;position: absolute;top:7px;left: 50%;margin-left: -25px;z-index: -1;background-image: -webkit-linear-gradient(left,rgba(232, 140, 59, 0) 0%,rgba(232, 140, 59, 0.1) 20%,rgba(232, 140, 59, 1) 50%,rgba(232, 140, 59, 0.1) 80%,rgba(232, 140, 59, 0) 100%);}}.titleName{flex: 1;padding-left: 30px;}.titleScore{width: 100px;text-align: center;color: #FFFFFF;font-weight: 550;}.scoreOne{color: #FF1800;}.scoreTwo{color: #FFFC00;}.scoreThree{color: #35FFFD;}}
}
</style>
http://www.jsqmd.com/news/316687/

相关文章:

  • 武汉寒假作业印刷厂家价格如何,哪家费用更合理
  • 2026年防水帆布制造厂口碑排名,中帆盛森表现出色
  • 南京贝奇尔机械有限公司 联系方式:核心信息查询指引
  • 选购婚介公司要注意什么,上海绿洲婚介所怎么样?
  • 贵阳市英语雅思培训辅导机构推荐| 2026权威出国雅思课程中心学校口碑排行榜
  • 剖析2铱星模块优质供应商,看哪家产品价格实惠?
  • springboot社区志愿者服务管理系统设计实现
  • 从零开始调用大模型:使用 OpenAI SDK 实现歌词生成,手把手实战指南
  • 不能访问互联网时执行了 yum 如何退出?
  • 义乌雷硕包装制品有限公司 联系方式: 联系前需了解的基本背景信息
  • 间隔滚动使用的js
  • tree组件_自定义类型
  • 2026年评价高的数控内外圆磨床/高速CBN数控磨床厂家最新推荐排行榜
  • 2026年离婚纠纷律师推荐:高净值家庭决策评价,涵盖涉外与股权复杂纠纷场景
  • 2026年质量好的水刺无纺布/全棉水刺无纺布‌行业内口碑厂家排行榜
  • 2026 湖州财税公司 TOP5 推荐榜(工商注册 / 代理记账 / 公司变更 / 注销 / 资质代办 / 商标注册|口碑专业|本土优质服务)
  • 2026苏州市英语雅思培训机构推荐,权威英语雅思课程学校排行榜
  • 2026年离婚纠纷律师电话推荐:高净值家庭纠纷评测,涵盖涉外与股权分割复杂场景
  • 2026年评价高的螺旋电动推进器/水下电动推进器厂家采购参考指南
  • 2026年比较好的冷库感烟火灾探测器/极早期感烟火灾探测器厂家最新权威实力榜
  • Java基于Spring Boot+Vue的充电桩智能管理系统
  • 2026年行业内热门的带钢厂商口碑推荐,带钢推荐排行技术引领与行业解决方案解析
  • 【收藏】GroupRank:RAG系统的“守门员“,基于强化学习的分组重排序新范式
  • 收藏!大模型六大岗位全解析:职责要求+入门到精通路径(附免费资源)
  • 大厂AI 岗面试必看:107 道面经 + 102 道大模型真题,附 2026学习路线图
  • 【收藏】Java 开发转 AI 工程师:全套技能体系 + 精选学习资源(小白 / 程序员专属)
  • 无法读取U盘,OTA升级U盘文件 返回-9
  • 【潮流分析】基于高斯-赛德尔和牛顿-拉夫森方法对三节点系统进行潮流分析附matlab代码
  • 2026年苏州留学机构排名揭秘,选择负责中介的关键
  • 2026年长沙留学机构前十解析,专业选择与服务详情