官方文档地址:DataV

1.安装组件库

  • npm安装

    npm install @jiaminghi/data-view

2.使用

全局引入

// 将自动注册所有组件为全局组件
import dataV from '@jiaminghi/data-view'
Vue.use(dataV)

按需引入

按需引入仅支持基于ES moduletree shaking,按需引入示例如下:

import { borderBox1 } from '@jiaminghi/data-view'
Vue.use(borderBox1)

3.实现

(1)全屏容器

全屏容器可以根据屏幕比例及当前浏览器窗口大小,自动进行缩放处理。浏览器全屏后,全屏容器将充满屏幕。

<dv-full-screen-container>content</dv-full-screen-container>

注意:使用前请注意将bodymargin设为0,否则会引起计算误差,全屏后不能完全充满屏幕。

(2)边框

官方文档中给出了边框的使用以及使用效果。

所有边框均支持自定义颜色及背景色,方法如下

<dv-border-box-1 :color="['#0DFFF1','#0E466C']" backgroundColor="blue">dv-border-box-1</dv-border-box-1>

(3)loading加载

<dv-loading>Loading...</dv-loading>

(4)装饰

 SVG元素绘制,增强视觉效果,官方文档中有使用效果

所有装饰均支持自定义颜色,方法如下

<dv-decoration-1 :color="['red', 'green']" />

(5)图表

图表组件基于Charts封装,只需要将对应图表option数据传入组件即可。

<dv-charts :option="option" />

(6)动态环图

基于Charts封装。

<dv-active-ring-chart :config="config" style="width:300px;height:300px" />

具体属性详见官方文档动态环图 | DataV

(7) 胶囊柱图

<dv-capsule-chart :config="config" style="width:300px;height:200px" />

具体属性详见官方文档胶囊柱图 | DataV

(8) 水位图

<dv-water-level-pond :config="config" style="width:150px;height:200px" />

config数据

export default {data: [66]
}

config数据

export default {data: [66, 45],shape: 'roundRect'
}

config数据

export default {data: [55],shape: 'round'
}

(9) 进度池

<dv-percent-pond :config="config" style="width:200px;height:100px;" />

 具体属性详见官方文档进度池 | DataV

(10)飞线图

设置一个中心点,若干飞线点,即可得到动态飞线图,组件提供的dev模式可以帮你快速配置飞线点位置。

<dv-flyline-chart :config="config" style="width:100%;height:100%;" />

具体开启dev模式及属性详见官方文档飞线图 | DataV

(11)锥形柱图

锥形柱图是特殊的柱状图,他将根据数值大小,降序排列锥形柱,适合排名类数据展示

<dv-conical-column-chart :config="config" style="width:400px;height:200px;" />

 (12)数字翻牌器

<dv-digital-flop :config="config" style="width:200px;height:50px;" />
const config1 = {number: [100],content: '{nt}个'
}const config2 = {number: [999],content: '{nt}个'
}export default [config1,config2
]

具体属性详见官方文档数字翻牌器 | DataV

(13) 轮播表

轮播表可以单条轮播也可以整页轮播,支持点击事件,展示数据使用v-html渲染,因此你可以传递html字符串,定制个性化元素

<dv-scroll-board :config="config" style="width:500px;height:220px" />

具体属性详见官方文档轮播表 | DataV

(14) 排名轮播表

排名轮播表同轮播表类似,也可以选择单条轮播或整页轮播。

<dv-scroll-ranking-board :config="config" style="width:500px;height:300px" />

具体属性详见官方文档排名轮播表 | DataV

4.官方Demo

 

 5.代码

这里简单列举几个。

(1)图表的使用

<template><div class="bottom-left-chart-1"><div class="header-name">机电设备完好率</div><div class="details-value"><span>99.01</span>%</div><dv-charts :option="option" /></div>
</template><script>
export default {name: 'BottomLeftChart1',data () {return {option: {series: [{type: 'pie',data: [{ name: '监控系统', value: 93, radius: ['30%', '33%'] },{ name: '收费系统', value: 65, radius: ['32%', '35%'] },{ name: '通信系统', value: 32, radius: ['31%', '37%'] },{ name: '供配电系统', value: 44, radius: ['31%', '32%'] },{ name: '其它', value: 52, radius: ['32%', '35%'] }],outsideLabel: { // 饼状图外部标签配置labelLineEndLength: 20, // 标签线末端长度formatter: '{percent}%\n{name}',style: {fill: '#fff'}}},{name: 'decoration ring',type: 'pie',data: [{ value: 10, radius: ['50%', '53%'] }],outsideLabel: { // 饼状图外部标签配置show: false},pieStyle: {fill: 'rgba(255, 255, 255, 0.2)'}},{name: 'decoration ring',type: 'pie',data: [{ value: 10, radius: ['45%', '46%'] }],outsideLabel: {show: false},pieStyle: {fill: 'rgba(255, 255, 255, 0.2)'}}],color: ['#00c0ff', '#3de7c9', '#fff', '#00c0ff', '#3de7c9', '#fff']}}}
}
</script><style lang="less">
.bottom-left-chart-1 {position: relative;.header-name {height: 150px;line-height: 150px;font-size: 20px;text-align: center;}.details-value {height: 40px;font-size: 30px;font-weight: bold;text-align: center;span {color: #00c0ff;font-size: 45px;}}.dv-charts-container {height: calc(~"100% - 190px");}.decoration-ring {position: absolute;width: 200px;height: 200px;border-radius: 50%;border: 5px solid fade(#fefefe, 30);top: 190px;left: 50%;transform: translateX(-50%);}
}
</style>

实现效果

(2)边框的使用

<template><div class="top-left-cmp"><div class="dc-left"><dv-border-box-5><div class="main-value"><span>0</span>件</div><div class="compare-value"><span>同比</span>81</div><div class="compare-value"><span>环比</span>15</div></dv-border-box-5><div class="dc-text">运维人均工作量<dv-decoration-3 style="width:200px;height:20px;" /></div></div><div class="dc-right"><div class="dc-text">当月维修任务量<dv-decoration-3 style="width:200px;height:20px;" /></div><dv-border-box-5 :reverse="true"><div class="main-value"><span>0.1</span>件 / 日</div><div class="compare-value"><span>同比</span>66</div><div class="compare-value"><span>环比</span>9</div></dv-border-box-5></div></div>
</template><script>
export default {name: 'TopLeftCmp'
}
</script><style lang="less">
.top-left-cmp {display: flex;.dc-left, .dc-right {width: 50%;}.dv-border-box-5 {height: 60%;}.dc-text {display: flex;flex-direction: column;height: 40%;font-size: 20px;padding: 20px;box-sizing: border-box;}.dc-left .dc-text {align-items: flex-end;justify-content: center;}.dc-right .dc-text {justify-content: flex-start;padding-top: 20px;}.dc-left .dv-border-box-5 {padding: 30px;box-sizing: border-box;}.dc-right .dv-border-box-5 {padding: 40px;padding-left: 75px;box-sizing: border-box;}.main-value {font-weight: bold;font-size: 22px;span {font-size: 30px;color: #00c0ff;margin-right: 15px;}}.compare-value {height: 35px;line-height: 35px;font-size: 18px;span {margin-right: 30px;}}
}
</style>

实现效果

(3)轮播表

<template><div class="bottom-right-table-1"><dv-border-box-6><div class="table-name"><img src="./img/icon1.png" />人员贡献排行榜</div><dv-scroll-board :config="config" /></dv-border-box-6></div>
</template><script>
export default {name: 'BottomRightTable1',data () {return {config: {data: [['张三', '月累计排除故障:4起'],['李四', '月累计排除故障:3起'],['王五', '月累计排除故障:3起'],['赵六', '月累计排除故障:3起'],['钱七', '月累计排除故障:2起'],['孙八', '月累计排除故障:2起'],['杨九', '月累计排除故障:2起'],['吴十', '月累计排除故障:2起'],['李雷', '月累计排除故障:2起'],['韩梅梅', '月累计排除故障:2起']],index: true,columnWidth: [40, 70], //列宽度align: ['center'],oddRowBGC: 'rgba(9, 37, 50, 0.4)', //奇数行背景色evenRowBGC: 'rgba(10, 32, 50, 0.3)' //偶数行背景色}}}
}
</script><style lang="less">
.bottom-right-table-1 {width: calc(~"25% + 10px");height: 100%;margin: 0 -5px;.border-box-content {padding: 20px;box-sizing: border-box;}.table-name {height: 45px;display: flex;justify-content: center;align-items: center;margin-bottom: 15px;img {width: 40px;height: 40px;margin-right: 5px;}}.dv-scroll-board {height: calc(~"100% - 60px");}
}
</style>

实现效果

DataV构建大屏(全屏)数据展示页面相关推荐

  1. 大屏幕-全屏、退出全屏

    <Button type="primary" @click="screenfullToggle">{{isFullScreen ? "退出 ...

  2. vue怎么取消按回车下拉框自动下拉_八月更新第二版,小视频自动竖屏全屏播放,失效校验再次升级!...

    新方圆小棉袄,传说中的贴心小棉袄,宇宙无敌超级厉害. 记住我们的付费群(大佬众多):978260150,免费群:1101359539 1.方圆和海阔的规则导入和支付宝口令类似,将口令全部复制打开最新版 ...

  3. web全屏_当前的Web设计趋势:全屏全屏主页

    web全屏 全屏启动是当前网络上最常见的模式之一. 有些人喜欢它,有些人讨厌它,但是无论您有什么感觉,我们都可以看看一些值得注意的例子,并在讨论过程中谈论最佳实践. 关于设计融合的注意事项 术语&qu ...

  4. vue+element ui 设置页面全屏 全屏和退出全屏的切换

    vue+element ui 设置页面全屏 全屏和退出全屏的切换 方式1 screenfull 插件 // 属性 screenfull.isFullscreen; // 判断当前页是否全屏 返回类型 ...

  5. 横屏视频怎么变成竖屏全屏,怎么把竖屏的视频变成横屏

    横屏视频怎么变成竖屏全屏,怎么把竖屏的视频变成横屏呢? 我们制作短视频一般是竖屏的比例是9:16,而横屏的比例是16:9,这是各大平台推荐的最佳高宽比例.如果我们的视频不是这些比例,可以使用王者剪辑里 ...

  6. 远程桌面退出全屏/不能全屏/全屏切换的技巧

    远程桌面退出全屏/不能全屏/全屏切换的技巧退出全屏 问:我的电脑远程登录到服务器上并且切换到了全屏状态,全屏后发现桌面顶部没有浮动工具栏了,想退出全屏状态,不知如何退出了,最后,只有重启电脑.想知道如 ...

  7. win11用外接屏全屏玩游戏

    目录 前言 操作系统 过程 方法一 方法二 总结 前言 今天在玩全屏游戏时,因为主显示屏是笔记本,所以游戏整个界面都显示在笔记本上,而我想把游戏显示在外接显示屏上,记录一下过程. 操作系统 win11 ...

  8. Unity三屏全屏方法

    打开NVIDIA控制面板,打开3D设置→配置Surround.PhysX,勾选"使用Surround跨越多个显示器".点击下方的"配置(C)-",勾选三个显示器 ...

  9. WebView视屏全屏切换,完美实现

    在日常的开发过程中,很多时候需要加h5界面,界面中有视屏播放,但是怎么才能使得webView里面的视屏全屏播放呢?????? ?????? 首先,webView是不能讲视频播放的区域全屏的,所以,需要 ...

  10. 怎么网站服务器退出全屏,远程桌面退出全屏/不能全屏/全屏切换的技巧

    远程桌面退出全屏/不能全屏/全屏切换的技巧退出全屏 问:我的电脑远程登录到服务器上并且切换到了全屏状态,全屏后发现桌面顶部没有浮动工具栏了,想退出全屏状态,不知如何退出了,最后,只有重启电脑.想知道如 ...

最新文章

  1. SAP MM 初阶之Movement Reason
  2. VC++ 坐标问题总结,控件大小随窗口变化
  3. Python爬虫基础:简单的爬虫入门示例(urllib库)
  4. 1038. Recover the Smallest Number (30)
  5. Powershell管理系列(三十一)PowerShell操作之批量创建邮箱
  6. Application log save debug - how log data is persisted to database table
  7. 5.1数组的定义5.2数组的顺序表示和实现
  8. OC中字符串的提取与替换-四种不同方法实现
  9. 操作系统课程设计之二级文件系统演示
  10. mapstd matlab详解,Matlab自带的数据标准化方法(mapminmax和mapstd)详细解析
  11. java POI为excel添加水印
  12. [渝粤教育] 西南科技大学 行政法学与行政诉讼法学 在线考试复习资料
  13. win10桌面右键一直转圈_吐血推荐:掌握这些技巧,win10工作效率提升9999%
  14. 复杂性研究简介——从西蒙到霍兰
  15. 前端利用正则对手机号码,身份证号,姓名进行脱敏处理
  16. web项目 在线预览doc文档
  17. 第九届大唐杯国赛获奖名单
  18. R语言笔记1:t检验和Wilcoxon检验
  19. 用c语言给8051编程,8051单片机的C语言编程
  20. 4002 构造数组(可重复组合数问题--隔板法)

热门文章

  1. MTU、MSS、TCP首部、IP首部
  2. 搜索时输入关键词进行匹配
  3. (转)屈子:独立人格可与日月争光
  4. git 裁切_Croppic图片裁切插件中文API帮助文档
  5. 安卓双摄像头录像_USB双摄像头app手机版下载-USB双摄像头apk安卓版下载 - 口袋手机站...
  6. pytorch pack_padded_sequence和pad_packed_sequence
  7. Win10创建文件不显示,Windows任务栏idea图标变白
  8. 星际迷航4之抢救未来
  9. cocos creator3.x 触控方向键实现
  10. 什么是localhost(127.0.0.1)?