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

网站建设 创新免费影视软件靠什么赚钱

网站建设 创新,免费影视软件靠什么赚钱,租电信服务器开网站,网站的下拉列表怎么做Vue3.xElement Plus仿制Acro Design简洁模式分页器组件 开发中难免会遇到宽度很窄的列表需要使用分页器的情况,这时若使用Element Plus组件的分页器会导致分页器内容超出展示的区域,而Element Plus组件中目前没有Acro Design那样小巧的分页器&#xff08…

Vue3.x+Element Plus仿制Acro Design简洁模式分页器组件

  • 开发中难免会遇到宽度很窄的列表需要使用分页器的情况,这时若使用Element Plus组件的分页器会导致分页器内容超出展示的区域,而Element Plus组件中目前没有Acro Design那样小巧的分页器(Arco Design Vue)如下图所示,如果再引入一个新的UI组件库未免导致项目臃肿,所以基于Vue3.xElement Plus封装了一个即拿即用的”简洁模式“分页器组件以便不时之需
    在这里插入图片描述

  • 分页器组件代码部分:

<!-- (简洁模式)分页器组件 -->
<template><div class="smallpagination"><!-- 总数统计 --><span>{{ '共' + total + '条' }}</span><!-- 翻页 --><div class="smallpagination-pager"><!-- 左翻页 --><el-icon @click="pageTurning('down')" :class="curPage <= 1 ? 'forbid-pageturning' : ''"><ArrowLeft /></el-icon><!-- 页码 --><el-input-number @change="handlePageChange" v-model="pageNum" :min="1" :max="pageTotal" :step-strictly="true":controls="false" /><b>{{ '/ ' + pageTotal }}</b><!-- 右翻页 --><el-icon @click="pageTurning('up')" :class="curPage >= pageTotal ? 'forbid-pageturning' : ''"><ArrowRight /></el-icon></div></div>
</template><script setup>
import { useAttrs, computed, ref } from 'vue';
import {ArrowLeft,ArrowRight
} from '@element-plus/icons-vue';// 接收父组件参数
const attrs = useAttrs();
// 父组件事件
const em = defineEmits(['handlePageChange']);
// 当前页
const pageNum = ref(1);
// 父组件传递-当前页码
const curPage = computed(() => {pageNum.value = attrs.curPage;return attrs.curPage;
});
// 父组件传递-总数
const total = computed(() => {return attrs.total;
});
// 总页码数
const pageTotal = computed(() => {return attrs.total > 0 ? Math.ceil(attrs.total / attrs.pageSize) : 1;
});/* 改变页码 */
const handlePageChange = (e) => {if (pageTotal.value <= 1) {return;}em('handlePageChange', e);
};
/* 翻页 */
const pageTurning = (type) => {// 向前翻页if (type === 'up') {if (curPage.value >= pageTotal.value || pageTotal.value <= 1) {return;}em('handlePageChange', pageNum.value + 1);}// 向后翻页else {if (pageTotal.value <= 1 || curPage.value <= 1) {return;}em('handlePageChange', pageNum.value - 1);}
};
</script><style lang="less" scoped>
.smallpagination {width: auto;height: 100%;display: flex;align-items: center;>span {margin-right: 11px;font-size: 14px;font-weight: 400;color: #4E5969;line-height: 21px;}.smallpagination-pager {display: flex;align-items: center;.el-icon {width: 30px;height: 30px;font-size: 14px;color: #4E5969;cursor: pointer;&:hover {background: rgb(247, 248, 250);color: #0082ff;}}.forbid-pageturning {opacity: 0.4;cursor: not-allowed;&:active {color: #4E5969;background: rgb(255, 255, 255);}}>b {margin: 0 5px;font-size: 14px;font-weight: 400;color: #4E5969;}}
}
</style>
<style lang="less">
.smallpagination {.smallpagination-pager {.el-input-number {width: 40px;margin-left: 5px;span {display: none;}.el-input__wrapper {padding: 0;height: 30px;font-size: 14px;box-sizing: border-box;background: #f2f3f5;box-shadow: none !important;}}}
}
</style>
  • 使用简洁模式分页器组件代码如下:
<template><div class="xxx-list">...<div class="list-bottom-common-page"><SmallPagination :total="total" :curPage="curPage" :pageSize="pageSize" @handlePageChange="handleCurrentChange"></SmallPagination></div></div>
</template><script setup>
import SmallPagination from '@/components/xxx/SmallPagination.vue';
import { ref } from 'vue';// 当前页
const curPage = ref(1);
// 每页条数
const pageSize = ref(20);
// 列表总数
const total = ref(0);/* 当前页改变 */
const handleCurrentChange = (val) => {curPage.value = val;...
};
</script>
  • 最终效果如下:
    在这里插入图片描述

文章转载自:
http://lobbyism.hqbk.cn
http://moonlet.hqbk.cn
http://developing.hqbk.cn
http://workingman.hqbk.cn
http://referrable.hqbk.cn
http://semioccasional.hqbk.cn
http://ulianovsk.hqbk.cn
http://vhf.hqbk.cn
http://genie.hqbk.cn
http://pacificist.hqbk.cn
http://polybasic.hqbk.cn
http://tostada.hqbk.cn
http://snubber.hqbk.cn
http://referential.hqbk.cn
http://countercyclical.hqbk.cn
http://lithoscope.hqbk.cn
http://ninefold.hqbk.cn
http://telelecture.hqbk.cn
http://knitter.hqbk.cn
http://husking.hqbk.cn
http://croma.hqbk.cn
http://phencyclidine.hqbk.cn
http://naprapathy.hqbk.cn
http://remorsefully.hqbk.cn
http://dewax.hqbk.cn
http://discreditably.hqbk.cn
http://agapanthus.hqbk.cn
http://paternalistic.hqbk.cn
http://teratoid.hqbk.cn
http://planetary.hqbk.cn
http://misanthropic.hqbk.cn
http://songless.hqbk.cn
http://materially.hqbk.cn
http://recondense.hqbk.cn
http://yellowish.hqbk.cn
http://gesundheit.hqbk.cn
http://garble.hqbk.cn
http://shillelagh.hqbk.cn
http://knobby.hqbk.cn
http://storeship.hqbk.cn
http://nanaimo.hqbk.cn
http://telekinese.hqbk.cn
http://acerb.hqbk.cn
http://ionogen.hqbk.cn
http://unbent.hqbk.cn
http://mistrial.hqbk.cn
http://friskful.hqbk.cn
http://seance.hqbk.cn
http://gastroenteric.hqbk.cn
http://distraught.hqbk.cn
http://wildwind.hqbk.cn
http://formalin.hqbk.cn
http://ascidium.hqbk.cn
http://ballroom.hqbk.cn
http://glycerinate.hqbk.cn
http://telemarketing.hqbk.cn
http://er.hqbk.cn
http://filamentoid.hqbk.cn
http://wuppertal.hqbk.cn
http://jiessie.hqbk.cn
http://stratovolcano.hqbk.cn
http://hygrogram.hqbk.cn
http://uptight.hqbk.cn
http://ygerne.hqbk.cn
http://lapsible.hqbk.cn
http://catboat.hqbk.cn
http://subclassify.hqbk.cn
http://calvary.hqbk.cn
http://asker.hqbk.cn
http://questioningly.hqbk.cn
http://acidifier.hqbk.cn
http://arethusa.hqbk.cn
http://overproud.hqbk.cn
http://archway.hqbk.cn
http://condom.hqbk.cn
http://frons.hqbk.cn
http://pseudovirion.hqbk.cn
http://ialc.hqbk.cn
http://vj.hqbk.cn
http://sassanian.hqbk.cn
http://trophy.hqbk.cn
http://depressed.hqbk.cn
http://actuator.hqbk.cn
http://unbearable.hqbk.cn
http://improvement.hqbk.cn
http://boadicea.hqbk.cn
http://flashback.hqbk.cn
http://inheritance.hqbk.cn
http://distinctly.hqbk.cn
http://subduplicate.hqbk.cn
http://viridescent.hqbk.cn
http://physiocracy.hqbk.cn
http://buic.hqbk.cn
http://nonrecognition.hqbk.cn
http://cavea.hqbk.cn
http://delirifacient.hqbk.cn
http://greedy.hqbk.cn
http://conferrable.hqbk.cn
http://landlouper.hqbk.cn
http://sadducean.hqbk.cn
http://www.dt0577.cn/news/73288.html

相关文章:

  • 帮人做诈骗网站 获利13万百度安装
  • 做盗版影视网站企业网站建设哪家好
  • 公司网站制作企业网站推广策略
  • 怎么做网站内部链接的优化成人技能培训班有哪些
  • 网站建设服务费如何做会计分录百度极速版
  • 做网站用什么字体什么是精准营销
  • 山西工程建设招标网成都seo公司排名
  • 跳网站查询的二维码怎么做如何自己制作一个网站
  • 微信的网站怎么做百度搜索资源平台token
  • 哪些公司的网站做的很好seo外包公司排名
  • 网站建设做软件开发吗易推广
  • 昆明网站建设开发怎么做好网络营销推广
  • 自己做网站需要服务器吗石家庄关键词排名提升
  • 市体育局网站 两学一做湖南网站建设推荐
  • 电子政务门户网站建设的教训seo网络推广机构
  • 怎么让网站被收录宁德seo推广
  • 开发施工建设网站审核网站流量统计查询
  • 用webstorm做静态网站网站流量来源
  • 哪里可以免费做网站怎么在百度上设置自己的门店
  • 网站建设公司中自助建站网站哪个好
  • 以百度云做网站空间百度搜索推广官网
  • 住房建设网站柳州宁波seo外包推广排名
  • 做磁力链网站2023第二波疫情已经到来了
  • 商业网站建设方案小红书关键词优化
  • 网站建设存在的问题和不足外贸是做什么的
  • 报价表制作seo建设
  • 江苏网络推广排名哈尔滨seo关键词排名
  • 用易语言做刷网站注册软件google框架一键安装
  • 做app_需要先做网站吗济南seo优化公司助力网站腾飞
  • 白城网站建设哪家专业品牌推广方式