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

做有趣的网站管理微信软件

做有趣的网站,管理微信软件,枣庄高端网站建设,常德政府采购网官网效果展示 一、需求背景: # vue3 项目涉及很多图表加载、表格加载 #考虑手写一个动态加载组件 二、实现思路 通过一个加载状态变量,通过v-if判断,加载状态的变量等于哪一个,动态加载组件内部就显示的哪一块组件。 三、实现效果…

效果展示

一、需求背景:

# vue3 项目涉及很多图表加载、表格加载 #考虑手写一个动态加载组件

二、实现思路

通过一个加载状态变量,通过v-if判断,加载状态的变量等于哪一个,动态加载组件内部就显示的哪一块组件。

三、实现效果

四、代码

(一)、封装组件

<template><view class="loadding_contaniers" v-if="loadState == 1"><view class="loading_img"><image src="@/static/images/smartCabin/loadingImg/isLoading_bg.png" /></view><view class="imgTitle">加载中<text id="dot">...</text></view></view><view class="loadding_contaniers" v-else-if="loadState == 2"><view class="loading_img"><image src="@/static/images/smartCabin/loadingImg/isErr_bg.png" /></view><view class="imgTitle">请求失败,请重新加载!</view></view><view class="loadding_contaniers" v-else-if="loadState == 3"><view class="loading_img"><image src="@/static/images/smartCabin/loadingImg/isNone_bg.png" /><!-- <image:src="getAssetsFile(props.noticeTip == '暂无数据'? `smartCabin/loadingImg/isNone_bg.png`: `smartCabin/loadingImg/isErr_bg2.png`)"/> --></view><view class="imgTitle">{{ noticeTip }}</view></view><view class="loadding_sucess" v-else><slot> </slot></view>
</template><script>
export default {props: {// 1:加载中 2:加载失败 3:暂无数据 4:加载成功loadState: Number,noticeTip: {type: String,default: "暂无数据",},},
};
</script><style lang="scss">
.loadding_contaniers {width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;.loading_img {image {width: 260rpx;height: 260rpx;}}.imgTitle {flex: 1;height: 0;color: #757575;#dot {display: inline-block;width: 1.5em;vertical-align: bottom;overflow: hidden;animation: dotting 0.5s infinite step-start;}@keyframes dotting {0% {width: 0;margin-right: 1.5em;}33% {width: 0.5em;margin-right: 1em;}66% {width: 1em;margin-right: 0.5em;}100% {width: 1.5em;margin-right: 0;}}}
}
.loadding_sucess {width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;
}
</style>

 (二)、组件传参

h5使用

<LoaddING :loadState="4" :noticeTip="'当loadState是成功的时候'"><view class="myContent"><imagesrc="@/static/images/energy/elePower/receiving_power.png"/></view>
</LoaddING>

web端使用 

<LoaddING :loadState="data.isFinish" :noticeTip="data.isTips"><!-- 插槽组件 --><ewClickLine:yAxisUnit="echartData2.unit":seriesColor="echartData2.color":legend="{ show: true, x: '80%' }":seriesName="echartData2.name":seriesType="echartData2.chartSeriesType":xAxisValue="echartData2.lineXAxisValue":nums="echartData2.lineNums"></ewClickLine>
</LoaddING>

http://www.hkea.cn/news/767089/

相关文章:

  • 哪里有网站设计公司长沙网络公司最新消息
  • 试描述一下网站建设的基本流程百度怎么发布短视频
  • 我现在有域名怎么做网站搜索关键词热度
  • 海外如何 淘宝网站建设快速seo整站优化排行
  • 代还信用卡网站建设赣州seo顾问
  • 响应式网站建设推广开网店
  • 成都专业网站推广公司优化大师优化项目有
  • 怎么用wordpress搭建网站百度关键词排名点
  • 外挂网站模板域名搜索引擎入口
  • 手机网站开发 pdfseo搜索引擎优化工作内容
  • 上海中小网站建设洛阳seo博客
  • 南宁网站建设公司哪家专业搜索引擎优化包括
  • 新疆住房与建设厅网站新产品推广方式有哪些
  • 做网站站怎么赚钱网络营销模式有哪些?
  • 南通城市建设集团有限公司网站南京谷歌推广
  • 南通网站定制方案怎么查找关键词排名
  • 权大师的网站是哪个公司做的百度做个人简介多少钱
  • 烟台网站建设设计软文广告经典案例100字
  • 做微信用什么网站广州百度seo代理
  • 网站建设目标 优帮云跨境电商营销推广
  • 郑州华恩科技做网站怎么样竞价排名适合百度吗
  • flask做大型网站开发深圳seo博客
  • 合肥网站建设平台小程序怎么引流推广
  • 做网站被拘留免费找客源软件
  • 门户型网站建设百度seo快速提升排名
  • 印度做杂质的网站如何进行网络推广
  • 建设厅八大员兴安盟新百度县seo快速排名
  • 南京网站建设索q.479185700小说排行榜百度
  • 幼儿做爰网站seo工程师是什么职业
  • 申请空间 建立网站吗西安百度推广运营