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

cs5怎么做网站电脑培训班附近有吗

cs5怎么做网站,电脑培训班附近有吗,什么公司可以做网站等级保护,深圳app开发哪家专业系列文章目录 一、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.khdw.cn/news/11226.html

相关文章:

  • 新疆网站开发域名解析查询站长工具
  • 郑州网站建设 个人工作室优化大师绿色版
  • h5和网站的区别如何免费制作网站
  • 网站有什么功能合肥网站关键词排名
  • 淘宝刷单网站制作怎样注册网站
  • 濮阳建设银行官方网站关键词数据分析工具有哪些
  • 培训行业门户网站建设方案汕头seo代理商
  • 用html5做的简单的网站百度关键词优化系统
  • 石家庄网络公司哪家靠谱seo怎么优化
  • 南昌建设局网站查询塔吊证脚本外链生成工具
  • 南昌哪里有网站建设百度销售岗位怎么样
  • 做网站的条件seo网站推广培训
  • 廊坊市网站推广深圳seo优化公司哪家好
  • 自己做的网站如何让百度收录百合seo培训
  • 做计量检定的网站天津seo外包团队
  • 各大搜索引擎提交网站入口大全seo优化在线
  • 企业 官网网络营销中的seo与sem
  • seo 网站title世界杯比分
  • 做网站用什么工具郑州seo课程
  • 做行政关注什么类型的网站百度统计网站
  • 深圳网站制作工具百度爱采购推广效果怎么样?
  • 衢州网站建设公司一键优化表格
  • 如何用ip地址做网站长沙做引流推广的公司
  • 有什么网站可以做电台吸引人的微信软文范例
  • 网站策划制作公司 北京google本地搜索
  • 桃浦做网站提高seo排名
  • 天津公司热狗网站关键词优化
  • 北京网站制作百度推广网址大全是ie浏览器吗
  • 外贸网站平台是不是很难做河南制作网站公司
  • 网站维护的基本内容有哪些百度推广如何办理