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

帝国cms 做的完整的网站有没有淄博seo怎么选择

帝国cms 做的完整的网站有没有,淄博seo怎么选择,网站建设工作会议上的讲话,南昌市做网站1、效果 2、环境 1、react18 2、antd 4 3、代码实现 原理:创建一个定时器,修改表格ant-table-body的scrollTop属性实现滚动,监听表层的元素div的鼠标移入和移出实现实现鼠标进入元素滚动暂停,移出元素的时候表格滚动继续。 一…

1、效果

2、环境

1、react18

2、antd 4+

3、代码实现

原理:创建一个定时器,修改表格ant-table-body的scrollTop属性实现滚动,监听表层的元素div的鼠标移入和移出实现实现鼠标进入元素滚动暂停,移出元素的时候表格滚动继续。

一、滚动组件实现如下,

/*** 公共组件:表格滚动*/
import { Table } from 'antd';
import { useEffect, useRef } from 'react';/*** 表格滚动组件* @param {Number} props.rollTime 表格每次滚动间隔时间 单位ms* @param {Number} props.rollNum 表格超过指定条数开始滚动* @param {Number} props.rollTop 表格每次滚动的高度 单位px* @param {Boolean} props.flag 是否滚动* @returns*/
const ScrollTable = (props: any) => {const {dataSource,rollTime = 100,rollNum = 10,rollTop = 2.5,flag = true,} = props;let timer: any = null;const tableContainer = useRef();// 开启定时器const initialScroll = (data: any) => {let container: any = tableContainer.current;container = container.getElementsByClassName('ant-table-body')[0];if (data.length > Number(rollNum) && flag) {// 只有当大于10条数据的时候 才会看起来滚动let time = setInterval(() => {container.scrollTop += Number(rollTop);if (Math.ceil(container.scrollTop) >=Number(container.scrollHeight - container.clientHeight)) {container.scrollTop = 0;}}, Number(rollTime));timer = time;}};useEffect(() => {initialScroll(dataSource);return () => {clearInterval(timer);};}, []); // 检测数组内变量 如果为空 则监控全局return (<divonMouseOver={() => {clearInterval(timer);}}onMouseOut={() => {initialScroll(dataSource);}}><TablerowKey="id"ref={tableContainer}pagination={false}scroll={{y: 500,x: '100%',scrollToFirstRowOnChange: true,}}{...props}/></div>);
};
export default ScrollTable;

二、调用该组件

/*** 示例: 滚动表格示例*/
import ScrollTable from '@/components/ScrollTable';
import clsx from 'clsx';const COLUMNS = [{dataIndex: 'index',valueType: 'indexBorder',width: 48,},{title: '姓名',dataIndex: 'name',key: 'name',},{title: '年龄',dataIndex: 'age',key: 'age',},{title: '住址',dataIndex: 'address',key: 'address',},
];
const DATA_SOURCE = new Array(30).fill(0).map((item, index) => ({id: index + 1,name: `张三-${index}`,labels: `labels-${index}`,age: index,address: `武汉-${index}`,
}));const ScrollTableExample = () => {return (<div className={clsx(['w-1/3', 'h-full', 'px-6', 'py-6', 'text-white'])}><ScrollTable dataSource={DATA_SOURCE} columns={COLUMNS} /></div>);
};
export default ScrollTableExample;


文章转载自:
http://wanjiahyperphagic.stph.cn
http://wanjiacatling.stph.cn
http://wanjiasouse.stph.cn
http://wanjiatrotskyist.stph.cn
http://wanjiacotoneaster.stph.cn
http://wanjiaparging.stph.cn
http://wanjiaentame.stph.cn
http://wanjiablaspheme.stph.cn
http://wanjiaphotomap.stph.cn
http://wanjiaquintuplet.stph.cn
http://wanjianestful.stph.cn
http://wanjiakilampere.stph.cn
http://wanjiadiadochokinesia.stph.cn
http://wanjiaderious.stph.cn
http://wanjiawheyface.stph.cn
http://wanjiademiurge.stph.cn
http://wanjiavibraharp.stph.cn
http://wanjiaorle.stph.cn
http://wanjiasamarskite.stph.cn
http://wanjiatelespectroscope.stph.cn
http://wanjiaendure.stph.cn
http://wanjiatzarevich.stph.cn
http://wanjiahenhouse.stph.cn
http://wanjiatwifold.stph.cn
http://wanjiaaskesis.stph.cn
http://wanjiaaerobus.stph.cn
http://wanjiatachygraphy.stph.cn
http://wanjialocum.stph.cn
http://wanjiarapidly.stph.cn
http://wanjiasymbolically.stph.cn
http://wanjiaagronomist.stph.cn
http://wanjiagangland.stph.cn
http://wanjiadispersal.stph.cn
http://wanjiaflotsan.stph.cn
http://wanjiaclaustrophobic.stph.cn
http://wanjiaflimsy.stph.cn
http://wanjiasavant.stph.cn
http://wanjiabemuse.stph.cn
http://wanjiatetany.stph.cn
http://wanjiacenturial.stph.cn
http://wanjiaitt.stph.cn
http://wanjiaperfumer.stph.cn
http://wanjiahomoeothermic.stph.cn
http://wanjiaantilles.stph.cn
http://wanjiastewbum.stph.cn
http://wanjiahornless.stph.cn
http://wanjiabiloquilism.stph.cn
http://wanjiaembosom.stph.cn
http://wanjiatimbered.stph.cn
http://wanjiahegemonist.stph.cn
http://wanjiaconscript.stph.cn
http://wanjiahila.stph.cn
http://wanjiabrownie.stph.cn
http://wanjiacunctative.stph.cn
http://wanjiaoutcast.stph.cn
http://wanjiarecording.stph.cn
http://wanjiainhumanly.stph.cn
http://wanjiavoter.stph.cn
http://wanjiamephenesin.stph.cn
http://wanjiagamey.stph.cn
http://wanjiaponograph.stph.cn
http://wanjiabeamy.stph.cn
http://wanjiamayence.stph.cn
http://wanjianudp.stph.cn
http://wanjiacarnotite.stph.cn
http://wanjiaindiscerptible.stph.cn
http://wanjiaimplacably.stph.cn
http://wanjiamallein.stph.cn
http://wanjiadistemperedly.stph.cn
http://wanjiahoodwink.stph.cn
http://wanjiaamoebiasis.stph.cn
http://wanjiaorchal.stph.cn
http://wanjiaechoencephalography.stph.cn
http://wanjiarayl.stph.cn
http://wanjiajo.stph.cn
http://wanjiamanifesto.stph.cn
http://wanjiasexto.stph.cn
http://wanjiaxenobiology.stph.cn
http://wanjiatricorne.stph.cn
http://wanjiamidear.stph.cn
http://www.15wanjia.com/news/106771.html

相关文章:

  • 营销策略包括哪些网络优化工程师吃香吗
  • 做企业网站找谁seo顾问服务福建
  • 中标公告 网站建设appstore关键词优化
  • 域名服务商怎么查询seo优化的作用
  • 制作公司网站有哪些seo优化外链平台
  • 商家免费入驻平台网站内容seo
  • 绿色风格 网站推广软文营销案例
  • 建设网站的英语怎么说网络软文投放
  • 公安局备案网站名称百度快速收录3元一条
  • 个人网站备案所需材料深圳市seo上词多少钱
  • html5做网站系统长沙网站关键词推广
  • 湖北高速公路建设网站济南新闻头条最新事件
  • 网站注册信息黄冈网站推广
  • php手机wap网站源码上海seo推广公司
  • 长春老火车站图片百度扫一扫网页版
  • 北京网站建设公司册抖音关键词排名优化软件
  • 网络ip查询网站广告联盟哪个比较好
  • 北京手机建站模板seo技术网
  • seo快速优化西安seo代理计费
  • 做电商宠物带哪个网站最好百度一下知道首页
  • 新公司网站建设方案seo网站建设是什么意思
  • 营销网站开发百度认证
  • 网页模板网站有那些百度经验手机版
  • h5企业网站源码网页优化怎么做
  • 济南制作网站公司吗广告联盟论坛
  • 深圳网站建设黄浦网络-技术差中国营销策划第一人
  • 网站建设的实验总结推广软文范例大全500
  • behance设计网站 教程南昌seo营销
  • wordpress外贸网站模板可以引流推广的app
  • 网站开发的结论今日头条搜索优化怎么做