基于vue的可视化大屏开发

# 简介

# 业界解决方案

## 百度的 sugar 可视化解决方案

https://sugar.baidu.com/home

## 阿里datav

https://data.aliyun.com/visual/datav

## 腾讯云图

https://cloud.tencent.com/product/yuntu

# 尺寸

现在一般的大屏设计基本都是16:9 或者是 32:9的尺寸

# 设计稿

设计稿给出来的图也基本是16:9的图,1920*1080

# 自适应尺寸

按照设计稿来说1920*1080切图展示是没有问题的,但是一个还是需要兜底方案的,就是需要兼容其他尺寸的页面,所以需要一个自适应的方案

## scale + margin 方案

就是dashboard 大屏的页面 设置 `style="width: 1920px;height: 1080px;"`

属性,然后通过 `scale` 缩放 来自适应。

外层通过 `margin: 0 xxpx` 实现居中展示。

```html

<div class="wrapper">

    <div class="container">

        <div class="dashboard-bg-image"></div>

        <div :style="marginStyle">

            <div style="position: relative;">

                <div class="dashboard-container" style="width: 1920px;height: 1080px;" :style="transformStyle">

                    <top-title :title.sync="title"></top-title>

                    <!-- left -->

                    <dashboard1></dashboard1>

                    <!-- right -->

                    <dashboard2></dashboard2>

                    <!-- right -->

                    <dashboard3></dashboard3>

                    <!-- right -->

                    <dashboard4></dashboard4>

                </div>

            </div>

        </div>

    </div>

</div>

```

```css

.wrapper {

    height: 100%;

    width: 100%;

    position: relative;

}

.container {

    background-color: rgb(3, 12, 59);

    overflow: hidden;

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    bottom: 0;

}

.dashboard-bg-image {

    width: 100%;

    height: 100%;

    position: absolute;

    background: url('../assets/bg2.jpg');

}

.dashboard-container {

    position: relative;

    user-select: none;

    width: 100%;

    height: 100%;

    transform-origin: 0 0;

    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5);

    transition: all .3s linear;

    overflow: hidden;

}

```

# github

https://github.com/bosscheng/big-dashboard

https://bosscheng.github.io/big-dashboard/

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 各种纯css图标 CSS3可以实现很多漂亮的图形,我收集了32种图形,在下面列出。直接用CSS3画出这些图形,要比...
    剑残阅读 13,301评论 0 8
  • 1. tab列表折叠效果 html: 能源系统事业部 岗位名称: 工作地点 岗位名...
    lilyping阅读 5,910评论 0 1
  • 不会用代码框,所以看着有些乱套,,,,html部分 <!DOCTYPE html> 迅雷看看 ...
    这就是个帅气的名字阅读 5,640评论 0 0
  • public class ImageProcessHelper { ///////////////////////...
    学习不断阅读 7,566评论 0 1
  • 本书介绍 你是不是对Django的学习感到迷茫?是不是对网上零星的教程感到绝望?是不是苦于没有可以迅速上手的实例而...
    阡陌3536阅读 5,133评论 0 0

友情链接更多精彩内容