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

宁波 做网站怎么做自己的网站自建一个页面

宁波 做网站,怎么做自己的网站自建一个页面,微信用网站怎么做,做公司网站客户群体怎么找系列文章目录 一、elementui 导航菜单栏和Breadcrumb 面包屑关联 二、elementui 左侧导航菜单栏与main区域联动 三、elementui 中设置图片的高度并支持PC和手机自适应 四、 elementui 实现一个固定位置的Pagination(分页)组件 文章目录 系列文章目录…

系列文章目录

一、elementui 导航菜单栏和Breadcrumb 面包屑关联

二、elementui 左侧导航菜单栏与main区域联动

三、elementui 中设置图片的高度并支持PC和手机自适应

四、 elementui 实现一个固定位置的Pagination(分页)组件


文章目录

  • 系列文章目录
  • 前言
  • 一、实现效果
  • 二、实现步骤
    • 1.添加Pagination组件
    • 2.CSS样式代码
  • 三、完整代码


前言

在Element UI中,要实现一个固定位置的Pagination(分页)组件,可以使用CSS来固定Pagination的位置,并将Pagination组件包裹在一个固定位置的容器中。


一、实现效果

在该网页的右下角固定位置
在这里插入图片描述

二、实现步骤

PS:针对有一点点vue基础的新手

1.添加Pagination组件

在你的Vue组件中添加Pagination组件

 <!--添加Pagination组件--><div class="pagination-container"><el-pagination@size-change="handleSizeChange"@current-change="handleCurrentChange":current-page="currentPage":page-sizes="[4, 8, 12]":page-size="pageSize"layout="total, sizes, prev, pager, next, jumper":total="total"></el-pagination></div><script>export default {name: "FileView",data() {return {currentPage: 1,pageSize: 8,total: 10,};},computed: {currentPageData() {return this.items.slice((this.currentPage - 1) * this.pageSize, this.currentPage * this.pageSize);}},methods: {handleSizeChange(val) {this.pageSize = val;this.currentPage = 1;},handleCurrentChange(val) {this.currentPage = val;}}};
</script>

2.CSS样式代码

在你的样式文件中(例如

<style scoped>.maindiv {/* 确保.maindiv 是Pagination的父容器 */position: relative;height: 580px; /* 或者其他高度以确保Pagination下方有足够空间 */}.pagination-container {position: absolute; /* 固定位置 */bottom: 10px; /* 距离底部10像素 */right: 10px; /* 距离右侧10像素 */}
</style>

三、完整代码

 <template><div class="maindiv"><el-row><el-col :span="6" v-for="(item, index) in currentPageData" :key="index" style="padding: 3px;"><el-card  :body-style="{ padding: '0px' }"><img v-if="item.image" :src="item.image" class="image"><div style="padding: 14px;"><span>{{ item.title }}</span><div class="bottom clearfix"><time class="time">{{ item.time }}</time><el-button type="text" class="button">操作按钮</el-button></div></div></el-card></el-col></el-row><!--添加Pagination组件--><div class="pagination-container"><el-pagination@size-change="handleSizeChange"@current-change="handleCurrentChange":current-page="currentPage":page-sizes="[4, 8, 12]":page-size="pageSize"layout="total, sizes, prev, pager, next, jumper":total="total"></el-pagination></div></div>
</template><script>export default {name: "FileView",data() {return {currentPage: 1,pageSize: 8,total: 10,items: [{image:"https://img0.baidu.com/it/u=3558402622,3525872153&fm=253&fmt=auto&app=138&f=JPEG?w=718&h=500",title:"好吃的汉堡",time:"2024-03-25"}// 填充你的数据对象,每个对象包含 'image', 'title', 'time' 属性]};},computed: {currentPageData() {return this.items.slice((this.currentPage - 1) * this.pageSize, this.currentPage * this.pageSize);}},methods: {handleSizeChange(val) {this.pageSize = val;this.currentPage = 1;},handleCurrentChange(val) {this.currentPage = val;}}};
</script>
<style scoped>.time {font-size: 13px;color: #999;}.bottom {margin-top: 13px;line-height: 12px;}.button {padding: 0;float: right;}.clearfix:before,.clearfix:after {display: table;content: "";}.clearfix:after {clear: both}.image {width: 100%;display: block;}.maindiv {/* 确保.maindiv 是Pagination的父容器 */position: relative;height: 580px; /* 或者其他高度以确保Pagination下方有足够空间 */}.pagination-container {position: absolute; /* 固定位置 */bottom: 10px; /* 距离底部10像素 */right: 10px; /* 距离右侧10像素 */}
</style>
http://www.yayakq.cn/news/889522/

相关文章:

  • 企业网站模板下载哪家口碑好苏州招聘网站开发
  • 全景图制作平台网站建设简述网站建设基本步骤
  • 网站建设前台后台重庆市区旅游必去景点
  • 网站推广方式组合装饰公司简介
  • 北京南站到故宫最佳路线怎么学习建设网站
  • 深圳网站建设服务便宜自建电商网站销售商品
  • 网站建设需求确认表网推项目
  • 邓州网站优化营销型网站怎么做
  • 网站开发什么语言机关网站建设需求文档
  • 局域网视频网站建设商城县属于哪个市
  • .电子商务网站建设的核心是80后陈某做盗版视频网站
  • 山东平台网站建设多少钱icons8官网
  • 做网站硬件郑州400建站网站建设
  • 阿里巴巴网站建设的功能定位只做鞋子的网站
  • 网站开发公司应该具备怎样的资质ip域名解析查询
  • 为什么wordpress升级无锡百度搜索排名优化
  • 上海网站开发哪里好薇门户网站制作费用
  • 凡科建站官网登互联网设计公司排名
  • 重庆建站模板搭建建筑行业资讯网站
  • 高端企业网站建设制作网站建设流程要多少钱
  • 小企业网站服务器宁波建设网网点
  • 珠海中英文网站建设智联企业登录入口
  • 东莞商贸公司寮步网站建设价格建一个公司网站要多久
  • 《网站开发与应用》试题物联网技术
  • 资中做网站多少钱深圳创业补贴2024
  • 响应式网站一般做几个尺寸网站建设 php 企业网站
  • 网站建设动态实训报告网站重做 影响
  • 网站制作 杭州宁波做外贸网站
  • 广州网站注销备案wordpress 删除主题
  • 网站架构设计师是做什么的wordpress 做论坛