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

靖江市建设局网站山东济南网站建设优化

靖江市建设局网站,山东济南网站建设优化,百度收录排名,ui设计招聘全网都找了一遍没有找到符合UI需求的分页动画#xff0c;于是就主动上手了 需求#xff1a; 1、分页最多显示9页#xff0c;总页数最多显示无上限#xff1b; 2、点击下一页的时候需要有动画效果过度#xff0c;如果当前页数是当前显示最后的一页#xff0c;则停了当前…全网都找了一遍没有找到符合UI需求的分页动画于是就主动上手了 需求 1、分页最多显示9页总页数最多显示无上限 2、点击下一页的时候需要有动画效果过度如果当前页数是当前显示最后的一页则停了当前显示最后的位置但是点击下一页的时候需要用户感知 效果如图所示 1、代码如下 templatedivbr当前显示页面{{current}}div classpaginationdiv clickprevPage上一页/divdiv v-for(item, index) in totalPages :keyindex :class{ active: current item }div v-ifnode.indexOf(item) ! -1 classpoint/div/divdiv clicknextPage下一页/div/div/div /templatescript export default {name: Pagination,props: {totalPages: {type: Number,required: true},pageSize: {type: Number}},data() {return {current: 1, // 当前选中页node: [], // 当前显示的页数组}},methods: {prevPage() {if (this.current 1) {return}this.current - 1let noedeIndex this.node[this.node.length - 1]this.$emit(pageChange, this.current)if ((noedeIndex - (this.current - 1)) this.pageSize) {this.node.pop() // 删除最后一个this.node.unshift(this.current) // 开头插入一个}},nextPage() {if (this.current this.totalPages) {return}this.current 1this.$emit(pageChange, this.current)let noedeIndex this.node[this.node.length - 1]// 当前页不等于最后一页当前页大于等于展示页当前页大于缓存数组的最后一页确保重复加入if (this.current this.pageSize (this.current noedeIndex)) {this.node.shift() // 删除第一个this.node.push(this.current) // 最近最新一个}},},mounted() {for (let i 1; i this.pageSize; i) {this.node.push(i)}}, } /scriptstyle langless scoped .pagination {display: flex;width: 100%;justify-content: center; }.point {margin: 0 5px;width: 8px;height: 8px;// margin: -5px 0 0 0;border-radius: 50%;background: #B5AC97;transition: transform 0.3s, background 0.3s;}.active .point {-webkit-transform: scale3d(1.5, 1.5, 1);transform: scale3d(1.5, 1.5, 1);// width: 10px;// height: 10px;background: #FFE6AD;box-shadow: 0 0 4px 0 #FFE990;animation: 0.3s linear 0s 1 alternate example;}keyframes example {0% {transform: scale3d(1, 1, 1);}25% {transform: scale3d(1, 1, 1);}50% {transform: scale3d(1.5, 1.5, 1);}100% {transform: scale3d(1.5, 1.5, 1);} } /style2、引用方式 templatedivpagination :total-pagestotalPages :page-size9 pageChangehandlePageChange //div /templatescript import Pagination from ./views/Pagination.vueexport default {components: {Pagination},data() {return {totalPages: 25,}},computed: {},methods: {handlePageChange(page) {console.log(page: , page);}} } /script
http://www.pierceye.com/news/244752/

相关文章:

  • 手机网站开发+图库类13岁开网络科技公司
  • 网站上的产品板块广州展厅设计公司有哪些
  • 网站建设源代码交付网站系统制作教程视频教程
  • 做网站刷赞qq怎么赚钱网站特效js代码
  • 电子商务网站开发进什么科目网络推广怎么学
  • 网站做百度推广要多少钱电商网站制作
  • 交互设计网站推荐网上推广公司
  • 网站建设数据库搭建网站开发外包维护合同
  • 大网站怎样选域名ui设计的就业前景
  • 青岛网站推广外包推广平台怎么做
  • 陇南建设网站网站建设大作业选题
  • 外包做的网站 需要要源代码吗福建省法冶建设知识有奖网站
  • 设计网站价格表dns解析失败登录不了网站
  • 代理网址网站与做机器人有关的网站
  • 优惠卷网站怎么做推广歌手网站建设
  • 网站服务器开发西安app软件开发公司
  • 化妆品产品的自建网站哟哪些怎么做提升网站转化率
  • 上海餐饮网站建设百度本地推广
  • 全返网站建设做pc端网站信息
  • 做团购网站需要什么网站建设与管理好处
  • 厦门seo优泰安网站seo推广
  • 做网站如何盈利建站优化信息推广
  • 大气的网站首页网络推广公司优化客
  • 网站建设要经历哪些步骤电商仓储代发招商合作
  • 网站开发如何搭建框架潍坊网站建设公司
  • 免费网页制作网站建设2015年做啥网站致富
  • 个人网站制作基本步骤江阴网站的建设
  • 英文网站名需要斜体吗宁波seo外包费用
  • 网站设计价格公司门户网站建设
  • wordpress如何修改文章路径哈尔滨个人优化排名