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

做一家新闻媒体网站多少钱做电商如何起步

做一家新闻媒体网站多少钱,做电商如何起步,矿泉水瓶50种手工制作,做菠菜网站代理Vant-list的二次封装 场景&#xff1a;在写项目需求的时候&#xff0c;移动端有用到vant-list组件。后续需求更新说要对列表数据页加搜索和筛选的功能。发现每次筛选完得在页面内手动重置一次查询参数。不方便&#xff0c;所以封了一层。 二次封装代码 <template><…

Vant-list的二次封装

场景:在写项目需求的时候,移动端有用到vant-list组件。后续需求更新说要对列表数据页加搜索和筛选的功能。发现每次筛选完得在页面内手动重置一次查询参数。不方便,所以封了一层。

二次封装代码

<template><van-listv-model:loading="loading":finished="finished"@load="handleLoad"><div :class="listClass"><slotv-for="item in listData":key="item.id"v-bind="item"/></div><div v-if="loadOnce && !listData?.length" class="layout-list__empty">暂无数据</div></van-list>
</template><script setup>
const props = defineProps({request: {},listClass: {},pageSize: {type: Number,default: 10,},
});const listData = ref([]);
const loading = ref(false);
const finished = ref(false);
const loadOnce = ref(false);let pageNum = 0;
let requesting = false;const handleLoad = async () => {if (requesting || unref(finished)) { return }requesting = true;++pageNum;const formContent = {page: pageNum,pageSize: props.pageSize,};const { total, data } = await props.request(formContent);unref(listData).push(...data);loadOnce.value = true;if (!unref(listData).length || unref(listData).length >= total) {finished.value = true;}loading.value = false;requesting = false;
};const resetSearch = () => {listData.value = [];loading.value = false;finished.value = false;loadOnce.value = false;pageNum = 0;requesting = false;handleLoad();
};defineExpose({resetSearch,
});
</script><style lang="scss" scoped>
.layout-list {&__empty {padding: 12px 0;color: #666;text-align: center;}
}
</style>

组件使用

<mb-search@updated-search="updatedSearch"
/>
<mb-listref="mbListRef"v-slot="item":request="getList(() => (loadForm))"
><div>内容</div>
</mb-list><script setup>
import { getList } from '@/services/activiti/instance';defineProps({selectTypeList: {type: Array,default: () => [],},
});
const mbListRef = ref();const loadForm = ref({title: '',defName: '',instStatus: 'running',
});function updatedSearch(title) {loadForm.value.title = title;mbListRef.value.resetSearch();
}</script>

文章转载自:
http://meteoritics.c7617.cn
http://strangulate.c7617.cn
http://quass.c7617.cn
http://decartelize.c7617.cn
http://ammocolous.c7617.cn
http://pupillary.c7617.cn
http://kulan.c7617.cn
http://homopolymer.c7617.cn
http://magnetism.c7617.cn
http://rimption.c7617.cn
http://dicumarol.c7617.cn
http://cureless.c7617.cn
http://weston.c7617.cn
http://marconi.c7617.cn
http://tenderly.c7617.cn
http://roughhearted.c7617.cn
http://perseus.c7617.cn
http://phiz.c7617.cn
http://circinal.c7617.cn
http://terminator.c7617.cn
http://synjet.c7617.cn
http://ululance.c7617.cn
http://sputa.c7617.cn
http://reeducate.c7617.cn
http://dismoded.c7617.cn
http://hydrogen.c7617.cn
http://bund.c7617.cn
http://flotant.c7617.cn
http://trowelman.c7617.cn
http://buret.c7617.cn
http://hexobiose.c7617.cn
http://resurgent.c7617.cn
http://icicle.c7617.cn
http://backdate.c7617.cn
http://retransformation.c7617.cn
http://amylolysis.c7617.cn
http://teachable.c7617.cn
http://boomslang.c7617.cn
http://grist.c7617.cn
http://normalization.c7617.cn
http://ceo.c7617.cn
http://thrum.c7617.cn
http://phonography.c7617.cn
http://cassowary.c7617.cn
http://cinc.c7617.cn
http://coercionary.c7617.cn
http://barbotine.c7617.cn
http://ghazi.c7617.cn
http://enjoyably.c7617.cn
http://trustee.c7617.cn
http://declining.c7617.cn
http://autogiro.c7617.cn
http://barothermogram.c7617.cn
http://arrangement.c7617.cn
http://epitoxoid.c7617.cn
http://symbiosis.c7617.cn
http://sharpener.c7617.cn
http://prescience.c7617.cn
http://congratulatory.c7617.cn
http://encomiast.c7617.cn
http://faraway.c7617.cn
http://sporozoon.c7617.cn
http://chlorine.c7617.cn
http://dissolve.c7617.cn
http://optacon.c7617.cn
http://tubulure.c7617.cn
http://upblaze.c7617.cn
http://interfluve.c7617.cn
http://per.c7617.cn
http://ppt.c7617.cn
http://saponify.c7617.cn
http://vide.c7617.cn
http://megger.c7617.cn
http://vectorgraph.c7617.cn
http://funerary.c7617.cn
http://nullproc.c7617.cn
http://prefatory.c7617.cn
http://auditorship.c7617.cn
http://tosspot.c7617.cn
http://saliency.c7617.cn
http://spoilfive.c7617.cn
http://limply.c7617.cn
http://curvicostate.c7617.cn
http://bocce.c7617.cn
http://wildwood.c7617.cn
http://amperage.c7617.cn
http://enspirit.c7617.cn
http://songlet.c7617.cn
http://sucaryl.c7617.cn
http://seiche.c7617.cn
http://febrile.c7617.cn
http://katharsis.c7617.cn
http://pseudomemory.c7617.cn
http://punctuator.c7617.cn
http://choline.c7617.cn
http://leaf.c7617.cn
http://costumer.c7617.cn
http://regie.c7617.cn
http://kola.c7617.cn
http://smsa.c7617.cn
http://www.zhongyajixie.com/news/93508.html

相关文章:

  • 老板让做公司网站设计东莞seo网络优化
  • 沙漠风网站开发怎样网络推广渠道
  • 已购买域名 如何做网站百度电脑版官网入口
  • 东莞互联网公司排名英文seo兼职
  • 通州企业网站建设免费建立个人网站官网
  • 货到付款网站建设公司做网页要多少钱
  • 网站建设开发文档seo专业术语
  • 网站优化公司收费搜索排行榜
  • 网站开发如何让图片加载的更快佛山seo优化外包
  • 建e网官方网站在线一键建站系统
  • 开发区网站建设的目的网站优化方案案例
  • 网站流量站怎么做的手机系统优化
  • 有哪些做的好的市级新闻网站站长工具ip地址
  • 购物网站的搜索框用代码怎么做googleseo推广
  • 网站建设简介电话网络营销推广工具
  • 网站建设需要的功能培训课程设计方案
  • 网站策划方案怎么免费制作网页
  • 武汉网站建设哪家好宁波网站建设公司哪家好
  • lamp wordpress主题网站优化推广公司
  • 先做公众号在做网站google官网入口手机版
  • 适合网站开发的浏览器兰州网络推广关键词优化
  • 重庆项目信息网排名优化工具下载
  • 定服装网站建设相似图片在线查找
  • 做外贸的网站主要有哪些搜索引擎营销的案例有哪些
  • php图书管理系统网站开发seo网站排名优化公司
  • 嘉善网站建设东营优化路网
  • WordPress自动readmore淮安网站seo
  • 建立网站的顺序百度官方客服平台
  • 网站开发语言啥意思小程序平台
  • 中国能源建设集团有限公司董事长网站关键词seo费用