【前端可视化】 大屏可视化项目二 scale适配方案 g6流程图 更复杂的图表

项目介绍

第二个大屏可视化,整个项目利用scale进行按比例适配。 图表更加复杂,涉及到图表的叠加,mark,地图,g6流程图的能等

始终保持比例适配(本项目方案),始终满屏适配(项目一).
echarts绘制较为复杂图表,更深入锻炼echarts.

按比例用scale适配思路

  1. 开发项目直接使用设计图量出的尺寸填写大小
  2. 页面打开,读取当前屏幕宽,高
  3. 按当前屏幕宽高,通过scale缩放整个项目
  4. 让项目高度,横向竖向始终居中

请添加图片描述

请添加图片描述

最终实现效果

请添加图片描述

使用vite搭建vue项目

然后在项目根目录下 index.html

<body><div id="app"></div><script>function setScale(){const designWidth=4352;const designHeight=1536;const nowWidth=document.documentElement.clientWidth //window.screnn.widthconst nowHeight=document.documentElement.clientHeightconst designRatio=designWidth/designHeight;const nowRatio=nowWidth/nowHeight;const app=document.getElementById("app");//根据宽高比,决定按宽度进行scale还是高度进行scaleconst scale=nowRatio<designRatio?nowWidth/designWidth:nowHeight/designHeightapp.style.transform=`scale(${scale}) translate(-50%,-50%)`}setScale();window.addEventListener("resize",setScale)</script><script type="module" src="/src/main.js"></script></body>

在assets静态目录下创建main.css 并在main.js中引入

#app{transform-origin: 0 0;width: 4352px;height: 1536px;background: url('./backf.jpg');background-size: 100% 100%;/* 让他居中 */position: fixed;top:50%;left:50%}

整体布局和基本组件

//App.vue
<script setup>import { onMounted } from 'vue';import produceChart from "@/components/chartComponent/produceChart.vue"import monthPlanChart from "@/components/chartComponent/monthPlanChart.vue"import mapChart from "@/components/chartComponent/mapChart.vue"import qualityChart from "@/components/chartComponent/qualityChart.vue"import carType from "@/components/chartComponent/carType.vue"import complaintTable from "@/components/chartComponent/complaintTable.vue"import majorChart from "@/components/chartComponent/majorChart.vue"import g6chart from "@/components/chartComponent/g6chart.vue"</script><template><div class="container"><div class="title">作战指挥室</div><div class="column-one"><produceChart></produceChart><monthPlanChart></monthPlanChart></div><div class="column-two"><mapChart></mapChart><qualityChart></qualityChart></div><div class="column-three"><carType></carType><complaintTable></complaintTable></div><div class="column-four"><majorChart></majorChart><g6chart></g6chart></div></div></template><style scoped lang="less">.container {padding: 24px 55px;width: 100%;height: 100%;box-sizing: border-box;display: flex;justify-content: space-between;position: relative;.title {position: absolute;left: 50%;top: 20;font-size: 48px;color: red;font-weight: 800;transform: translateX(-50%);}.column-one,.column-four,.column-two,.column-three {display: flex;flex-direction: column;justify-content: space-between;}.column-one,.column-four {width: 1005px;height: 100%;}.column-two,.column-three {width: 1036px;height: 100%;}}</style>
将布局容器作为基础组件
// src/components/baseComponent/bottomChartContent.vue
<script setup>const { title } = defineProps(['title'])</script><template><div class="bottomChartContent"><div class="title"> {{ title }}</div><div class="soltContainer"><slot></slot></div></div></template><style scoped lang="less">.bottomChartContent {width: 100%;height: 558px;background: url('../../assets/backpart2.png');background-size: 100% 100%;display: flex;flex-direction: column;.title {font-size: 32px;color: white;width: 100%;text-align: center;}.soltContainer {width: 100%;flex: 1}}</style>
//components/baseComponent/topChartContent.vue
<script setup>const { title } = defineProps(['title'])</script><template><div class="topChartContainer"><div class="title"> {{ title }}</div><div class="soltContainer"><slot></slot></div></div></template><style scoped lang="less">.topChartContainer {width: 100%;height: 878px;background: url('../../assets/backpart1.png');background-size: 100% 100%;display: flex;flex-direction: column;.title {font-size: 32px;color: white;width: 100%;text-align: center;padding-top: 78px;}.soltContainer {width: 100%;flex: 1}}</style>

请求封装

// request/index.js
import axios from "axios";const request = axios.create({timeout: 3000,baseURL: import.meta.env.VITE_BASE_URL,})request.interceptors.request.use((config) => {const token = localStorage.getItem("token");if (token) {config.auth = token;}return config})request.interceptors.response.use((res) => {if (res.data.code !== 200) {alert(res.data.msg || '请求失败')}return res;}, () => {alert("请求失败")})export default request// api/index.js
import request from "@/request";export function getProduceStatus() {return request("/produceStatus");}export function getPlanData() {return request("/planData");}export function getMapData() {return request("/mapData");}export function getQualityData() {return request("/qualityData");}export function getCarSaleData() {return request("/carSaleData");}export function getComplainData() {return request("/complainData");}export function getMajorData() {return request("/majorData");}

几个echarts最基本的属性

import * as echarts from 'echarts';// 基于准备好的dom,初始化echarts实例 需要一个容器
var myChart = echarts.init(document.getElementById('main'));// 绘制图表
myChart.setOption({//标题title: {text: 'ECharts 入门示例'},//图例,说明legend: {top: '5%',left: 'center'},//提示tooltip: {trigger: 'item'},//x轴数据xAxis: {data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']},//y轴数据yAxis: {},//内容series: [{name: '销量',type: 'bar',data: [5, 20, 36, 10, 10, 20]}]
});

复杂的嵌套圆环图

<script setup>import topChartContent from '../baseComponent/topChartContent.vue';import { getProduceStatus } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"const ringnameArr = ['计划生产', '已接订单', '已经完成']function drawRing(data, dom, name) {//已完成const finish = data.finish;//未完成就是总数处以完成const unfinish = data.total - data.finish;const opt = {title: {text: name + '\n' + data.finish,left: 'center',top: 'center',textStyle: {color: "white",fontSize: 32}},series: [{type: "pie",left: 20,right: 20,radius: ['60%', '80%'],label: {show: false},data: [{value: finish,itemStyle: {color: "#017ed8"}}, {value: unfinish,itemStyle: {color: "rgba(6,34,73,0.8)"}}]},{name: "out",type: "pie",radius: ['75%', '78%'],label: {show: false,},data: [100],itemStyle: {color: "rgba(8,67,120,0.5)"}},{name: "out",type: "pie",radius: ['48%', '50%'],label: {show: false,},data: [100],itemStyle: {color: "rgba(8,67,120,0.5)"}}]}const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getProduceStatus().then((res) => {const data = res.data.data;data.forEach((ringData, index) => {drawRing(ringData, document.getElementById('ring' + index), ringnameArr[index])})})})</script><template><topChartContent title="生产销售完成情况"><div class="produceChart"><div class="ring" v-for="(item, index) in ringnameArr" :id="'ring' + index"></div></div></topChartContent></template><style scoped lang="less">.produceChart {width: 100%;height: 100%;display: flex;.ring {flex: 1}}</style>

复杂的折线图

<script setup>import bottomChartContent from '../baseComponent/bottomChartContent.vue';import { getPlanData } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"import { axisBaseStyle } from '@/chartConfig.js'const commonLineStyle = {type: "line",smooth: true,lineStyle: {width: 5}}function drawLine(data, dom) {const finishArr = [];const targetArr = [];const xAxisData = [];const markLine = []data.forEach((month) => {xAxisData.push(month.month);finishArr.push(month.finish);targetArr.push(month.target);markLine.push({type: "line",lineStyle: {color: '#537598',width: 5},data: [[month.month, month.target],[month.month, month.finish]]})})const opt = {color: ["#2499f8", "#ff9900"],tooltip: {formatter(obj) {const month = obj.data[0];const dataitem = data.find((item) => {if (item.month === month) {return item;}})let _target = dataitem.target;let _finish = dataitem.finish;let percent = (_finish / _target) * 100return `${month} 完成率 ${percent.toFixed(0)}%`},textStyle: {fontSize: 26}},grid: {top: "20%",bottom: "30%",left: '15%'},legend: {top: '35px',textStyle: {color: "white",fontSize: 26}},yAxis: {...axisBaseStyle,splitLine: {lineStyle: {color: "#045597",width: 4}}},xAxis: {...axisBaseStyle,type: "category",data: xAxisData},series: [{...commonLineStyle,name: "计划生产",data: targetArr,},{...commonLineStyle,name: "实际生产",data: finishArr,},...markLine]}const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getPlanData().then((res) => {drawLine(res.data.data, document.getElementById('monthPlan'))})})</script><template><bottomChartContent title="月计划完成情况"><div id="monthPlan"></div></bottomChartContent></template><style scoped lang="less">#monthPlan {width: 100%;height: 100%;}</style>

echart绘制地图效果

拿到数据。 搜索阿里云datav https://datav.aliyun.com/portal/school/atlas/area_selector?spm=a2crr.23498931.0.0.176a15ddAwYvpV点击可视化学院复制数据

<script setup>import { getMapData } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"import chinajson from "../../assets/china.json"echarts.registerMap("china", chinajson)function drawMap(data, dom) {let _sortData = data.sort((pre, now) => {return now.value - pre.value;})_sortData = _sortData.map((item) => {return [...item.position,item.value,item.name]})const top5Arr = _sortData.splice(0, 5);const top5Marker = top5Arr.map((item, index) => {return {name: item[3],coord: [item[0], item[1]],value: index}})const opt = {geo: {top: "25%",map: "china",scaleLimit: {min: 1.5,max: 10},emphasis: {itemStyle: {areaColor: "#016bb5"},label: {show: false}},itemStyle: {areaColor: "#016bb5"},roam: true,},series: [{type: "scatter",coordinateSystem: "geo",symbolSize: (dataItem) => {const value = Number(dataItem[2]);return value / 30;},itemStyle: {color: 'rgba(255,255,0,0.8)',},data: _sortData},{type: "effectScatter",coordinateSystem: "geo",markPoint: {symbol: "pin",itemStyle: {color: "red"},symbolSize: 60,label: {fontSize: 26,formatter(val) {return val.data.value + 1;}},data: top5Marker},symbolSize: 30,itemStyle: {color: 'white',},data: top5Arr}]}const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getMapData().then((res) => {drawMap(res.data.data, document.getElementById("mapContent"))})})</script><template><div id="mapContent"></div></template><style scoped lang="less">#mapContent {width: 100%;height: 878px;padding-top: 88px;box-sizing: border-box;}</style>

echarts绘制等高堆叠柱状图

<script setup>import bottomChartContent from '../baseComponent/bottomChartContent.vue';import { getQualityData } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"import { axisBaseStyle } from '@/chartConfig.js'function drawBar(data, dom) {const goodArr = [];const badArr = []const xAxisData = [];data.forEach((item) => {xAxisData.push(item.month);const total = item.good + item.bad;goodArr.push(item.good / total);badArr.push(item.bad / total)})const opt = {color: ["#2499f8", '#fe9901'],grid: {bottom: "30%"},xAxis: {...axisBaseStyle,type: "category",data: xAxisData},yAxis: {...axisBaseStyle,splitLine: {show: false},axisLabel: {fontSize: 28,color: "white",formatter(val) {return val * 1000}}},series: [{type: "bar",stack: "total",data: goodArr,label: {show: true,color: "white",fontSize: 26,formatter(value) {const originData = data.find((item) => {if (item.month === value.name) {return item;}})return originData.good}}},{type: 'bar',stack: "total",data: badArr,label: {show: true,fontSize: 26,color: "red",formatter(value) {const originData = data.find((item) => {if (item.month === value.name) {return item;}})return originData.bad}}}]}const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getQualityData().then((res) => {drawBar(res.data.data, document.getElementById('quality'))})})</script><template><bottomChartContent title="质量指标分析"><div id="quality"></div></bottomChartContent></template><style scoped lang="less">#quality {width: 100%;height: 100%;}</style>

echarts旭日图和表格

<script setup>import { getCarSaleData } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"import chinajson from "../../assets/china.json"echarts.registerMap("china", chinajson)function drawCarType(data, dom) {let _data = [];_data = data.map((item) => {return {name: item.carType,value: item.value,children: item.children}})const opt = {color: ['#ff9900', '#99cc66', '#0066ff'],series: [{type: "sunburst",radius: ['40%', '80%'],label: {rotate: 'tangential',color: "white",fontSize: 24},data: _data}]}const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getCarSaleData().then((res) => {drawCarType(res.data.data, document.getElementById("carType"))})})</script><template><div id="carType"></div></template><style scoped lang="less">#carType {width: 100%;height: 878px;padding-top: 88px;box-sizing: border-box;}</style>

横向进度图

<script setup>import topChartContent from '../baseComponent/topChartContent.vue';import { getMajorData } from '@/api'import { onMounted } from 'vue';import * as echarts from "echarts"import { axisBaseStyle } from '@/chartConfig.js'function drawMajor(data, dom) {const yAxisData = [];const arr1 = [];const arr2 = [];const arr3 = [];const arr4 = [];const allArr = [arr1, arr2, arr3, arr4]const nameArr = ['项目投标', '投标进度', '项目进行', '项目交付']data.forEach((item) => {const process = item.processState;yAxisData.push(item.name);process.forEach((processItem) => {const category = {"项目投标": (val) => {arr1.push({value: val,label: {show: val > 0}})},"投标进度": (val) => {arr2.push({value: val,label: {show: val > 0}})},"项目进行": (val) => {arr3.push({value: val,label: {show: val > 0}})},"项目交付": (val) => {arr4.push({value: val,label: {show: val > 0}})}}category[processItem.stepName](processItem.finishPercent)})})const opt = {legend: {bottom: 120,textStyle: {color: 'white',fontSize: 32},itemHeight: 30,itemWidth: 50,itemGap: 50},grid: {left: "15%",bottom: '25%'},yAxis: {...axisBaseStyle,type: "category",data: yAxisData},xAxis: {splitLine: {show: false},axisLabel: {show: false}},series: []}for (let i = 0; i < 4; i++) {opt.series.push({type: "bar",name: nameArr[i],label: {show: true,formatter(val) {if (val.value !== 0) {return val.value + "%"}},fontSize: 28,color: 'white'},stack: 'total',data: allArr[i]})}console.log(opt);const echartobj = echarts.init(dom);echartobj.setOption(opt)}onMounted(() => {getMajorData().then((res) => {drawMajor(res.data.data, document.getElementById("majorContainer"))})})</script><template><topChartContent title="重大业务进度"><div id="majorContainer"></div></topChartContent></template><style scoped lang="less">#majorContainer {width: 100%;height: 100%;}</style>

g6关系图绘制

<script setup>import bottomChartContent from '../baseComponent/bottomChartContent.vue';import { onMounted } from 'vue';import g6 from "@antv/g6"const baseNodeConfig = {type: "rect",labelCfg: {style: {fill: "white",fontSize: 24}},style: {fill: '#1967af'},size: [120, 50]}const lineStyle = {stroke: '#ff9900',lineWidth: 5,endArrow: {path: g6.Arrow.vee(10, 10, 10),d: 10}}onMounted(() => {const data = {nodes: [{...baseNodeConfig,x: 100,y: 100,type: "rect",id: "接单",label: "接单"},{...baseNodeConfig,x: 300,y: 100,type: "rect",id: '生产',label: "生产",anchorPoints: [[1, 0.5],[1, 1],[0, 0.5]],},{...baseNodeConfig,x: 500,y: 100,type: "rect",id: '检测',label: "检测"},{...baseNodeConfig,x: 700,y: 100,type: "rect",id: '销售',label: "销售"},{...baseNodeConfig,x: 900,y: 100,type: "rect",id: '售后',label: "售后",anchorPoints: [[0, 0.5],[1, 0.5]],},{...baseNodeConfig,x: 800,y: 300,type: "rect",anchorPoints: [[1, 0],[0, 0]],id: '回厂',label: "回厂"},],edges: [{source: "接单",target: '生产',style: {...lineStyle}},{source: "生产",target: '检测',style: {...lineStyle}},{source: "检测",target: '销售',style: {...lineStyle}},{source: "销售",target: '售后',style: {...lineStyle}},{source: "售后",target: '回厂',sourceAnchor: 1,targetAnchor: 0,type: "arc",style: {...lineStyle,endArrow: {path: g6.Arrow.vee(10, -10, 2)}}},{source: "回厂",target: '生产',sourceAnchor: 1,targetAnchor: 1,type: "arc",style: {...lineStyle,endArrow: {path: g6.Arrow.vee(10, -4, 2)}}}]}const graph = new g6.Graph({container: 'g6container'})graph.data(data);graph.render();})</script><template><bottomChartContent title="产线示意图"><div id="g6container"></div></bottomChartContent></template><style scoped lang="less">#g6container {width: 100%;height: 100%;}</style>

如果对你有所帮助 就点个关注吧

本篇文章是https://www.bilibili.com/video/BV1PE421w7iJ/?p=7&spm_id_from=pageDriver&vd_source=e73709c9a1618b4c6dfd58c6c40d8986的笔记

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/397353.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

mysql导入jdbc

每次创建项目都要导入jar包 版本对应 mysql是5xxjdbc也用5xx 下载jdbc.jar包 maven仓库搜索mysql&#xff1a;maven官网 导入jar包 创建lib目录&#xff0c;复制jar包&#xff0c;粘贴到lib当中 导入成功

Android Basis - 密钥和ID认证

书读百遍其义自现&#xff0c;知识点多复习&#xff0c;看到的越多&#xff0c;理解的也越是深刻。也许此时我看到的点是点&#xff0c;十天半个月之后回头看时可能就是新的点或者线了&#xff0c;写博客也是&#xff0c;越写越深刻。 遇到KeyAttestation在gms中的错误 在cts…

Nest.js 实战 (八):基于 JWT 的路由身份认证鉴权

身份验证 身份认证是大多数应用程序的重要组成部分&#xff0c;有很多不同的方法和策略来处理身份认证。 当前比较流程的是JWT 认证&#xff0c;也叫令牌认证&#xff0c;今天我们探讨一下在 Nest.js 中如何实现。 认证流程 客户端将首先使用用户名和密码进行身份认证认证成…

Sql与Rce注入相关漏洞复现

目录 sqli-labs注入第38&#xff0c;48关 第38关&#xff08;单引号闭合&#xff09; ​编辑 第48关 (GET请求-基于错误-盲注-数字型-order by 排序 ​编辑 贷齐乐系统多处Sql注入漏洞 环境搭建 将贷齐乐源码放入phpstudy中的www目录下 在phpstudy上创建网站&#xff1…

ESP8266与阿里云物联网平台连接

前言 最近折腾项目&#xff0c;需要用到ESP8266模块对接阿里云物联网平台&#xff0c;网上感觉十分完善的教程少了一点点&#xff0c;比较折腾我哈哈哈&#xff0c;所以打算自己写一篇。 材料准备 1、ESP8266 WiFi模块 数据线 网上随便买一个就好&#xff0c;十块钱左右一个…

C# winform 三层架构增删改查,(删除篇)

一.留言 C# wnform 三层架构增删改查&#xff0c;本篇是增删改查是删除篇&#xff0c;也就增删改查外加一个登录更新完&#xff0c;后续考虑出一个增删改查就是不用三层架构&#xff0c;在uI里面 直接写完&#xff0c;并且放一个帮助类&#xff0c;基本十分钟可以写完一套增删…

数据保存--总结

目录 Excel Excel--openpyxl mysql Excel Excel--openpyxl ... mysql

快速幂、矩阵快速幂

乘法快速幂&#xff1a; P1226 【模板】快速幂 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.PrintWriter; import ja…

【C#】一个项目移动了位置,或者换到其他电脑上,编译报错 Files 的值“IGEF,解决方法

文章目录 1 问题分析2 本文解决方法 一个项目可以正常运行编译的项目&#xff0c;所有路径均为相对路径。 移动了位置&#xff0c;或者换到其他电脑上&#xff0c;编译报错 Files 的值“IGEF&#xff0c; 1 问题分析 这个错误信息表明在处理文件时&#xff0c;Files 的值出…

(限时免费)震惊!流落人间的haproxy宝典被找到了!一切玄妙尽在此处!

目录 haproxy七层代理详解一、负载均衡1.1 什么是负载均衡1.2 为什么使用负载均衡1.3 负载均衡类型1.3.1 硬件负载1.3.2 四层负载1.3.3 七层负载1.3.4 四层与七层的区别 二、haproxy介绍2.1 haproxy简介2.2 haproxy特性 三、haproxy详细部署3.1 实验所用的环境3.2 软件安装3.3 …

C语言 | Leetcode C语言题解之第330题按要求补齐数组

题目&#xff1a; 题解&#xff1a; int minPatches(int* nums, int numsSize, int n) {int patches 0;long long x 1;int index 0;while (x < n) {if (index < numsSize && nums[index] < x) {x nums[index];index;} else {x << 1;patches;}}retu…

【HarmonyOS NEXT星河版开发学习】小型测试案例06-小红书卡片

个人主页→VON 收录专栏→鸿蒙开发小型案例总结​​​​​ 基础语法部分会发布于github 和 gitee上面&#xff08;暂未发布&#xff09; 前言 在鸿蒙&#xff08;HarmonyOS&#xff09;开发中&#xff0c;自适应伸缩是指应用程序能够根据不同设备的屏幕尺寸、分辨率和形态&…

气象大数据案例项目(求各气象站的平均气温)

气象大数据案例项目&#xff08;求各气象站的平均气温&#xff09; 一、项目需求二、数据格式三、项目开发3.1 在windows 进行开发3.2 运行结果3.3 对项目打包 一、项目需求 现在有一份来自美国国家海洋和大气管理局的数据集&#xff0c;里面包含近30年每个气象站、每小时的天…

WSL2 最新最全帮助小白一步步详细安装教程

文章目录 一、前言1.1、什么是 WSL &#xff1f;1.2、WSL2 相比传统虚拟机的优势1.3、微软官方 二、安装步骤*2.1、启用 WSL 功能2.2、重启电脑2.3、dos命令自动安装 (一行命令搞定&#xff0c;非常方便)2.3.1、通过 cmd 打开 dos 命令行 或者 WIN键 R&#xff1a;2.3.2、输入…

探案录 | 在线打补丁,运维更轻松

清晨&#xff0c;曙光温柔地洒落在福尔摩斯K那标志性的书房内&#xff0c;福尔摩斯K坐在他那张熟悉的扶手椅上&#xff0c;眼神锐利如鹰&#xff0c;正沉浸在思考的海洋中。门突然被推开&#xff0c;华生K带着一丝急切步入室内。 “福尔摩斯K&#xff0c;这次案件非同小可&…

如何在线观看汤姆克鲁斯、比莉艾利什、红辣椒乐队、HER等明星的奥运闭幕式

2024 年巴黎奥运会将以一系列众星云集的表演者为结尾&#xff0c;他们将帮助将奥运会移交给洛杉矶——以下是在线直播盛大决赛的时间和地点。 经过两周多令人惊叹的田径运动、激烈的比赛和表情包活动后&#xff0c;2024 年巴黎奥运会即将落下帷幕。 奥运会闭幕式将于 8 月 12 …

【C++】 特殊类设计:从构思到实现,引领设计新潮流

&#x1f308; 个人主页&#xff1a;Zfox_ &#x1f525; 系列专栏&#xff1a;C从入门到精通 目录 &#x1f680; 前言 一&#xff1a; &#x1f525; 不能被拷贝的类 二&#xff1a; &#x1f525; 只能在堆上创建对象的类 三&#xff1a; &#x1f525; 只能在栈上创建对象的…

uniapp使用echarts在H5上显示报错问题的解决方法

前言 在做uniapp vue3开发的echarts图表的时候&#xff0c;发现在浏览器上面正常运行&#xff0c;但在微信开发者工具上显示报错了&#xff0c;报错如下 原因&#xff1a;在微信小程序中&#xff0c;使用document.getElementById会报错&#xff0c;因为小程序的运行环境是基于…

目前最强的文生图模型?!FLUX完全解读!附体验地址

大家好&#xff0c;我是木易&#xff0c;一个持续关注AI领域的互联网技术产品经理&#xff0c;国内Top2本科&#xff0c;美国Top10 CS研究生&#xff0c;MBA。我坚信AI是普通人变强的“外挂”&#xff0c;专注于分享AI全维度知识&#xff0c;包括但不限于AI科普&#xff0c;AI工…

css rem之2024

话题开始前 我们都知道1rem是等于html fontSize标签的字体大小的&#xff0c;我们主要用来做移动端网页设计稿等比例在手机上面的显示。 看到的问题 这个html fontsize的大小是通过js动态计算的&#xff0c;而这个js的运行时晚于html渲染的&#xff0c;所以会导致一个问题&am…