perf: perf

This commit is contained in:
xiaoxian521
2021-04-19 18:11:12 +08:00
parent d6fcab53b9
commit fdff569de9
26 changed files with 287 additions and 134 deletions

View File

@@ -46,4 +46,7 @@ export default {
:deep(.w-e-text-container) {
z-index: 99 !important;
}
:deep(.w-e-toolbar) {
z-index: 999 !important;
}
</style>

View File

@@ -91,11 +91,11 @@ export default {
<style scoped>
#LF-Turbo {
width: 100vw;
height: 85%;
height: 85vh;
outline: none;
}
.logic-flow-view {
height: 100%;
margin: 10px;
position: relative;
}
.demo-title {

View File

@@ -1,6 +1,6 @@
<template>
<div class="welcome">
<el-affix :offset="51">
<el-affix>
<div class="top-content">
<div class="left-mark">
<img
@@ -31,18 +31,14 @@ import Flop from "/@/components/Flop";
import { ref, computed, onMounted, nextTick } from "vue";
import { deviceDetection } from "/@/utils/deviceDetection";
import { echartsJson } from "/@/api/mock";
import {
useEventListener,
tryOnUnmounted,
useTimeoutFn,
} from "@vueuse/core";
import { useEventListener, tryOnUnmounted, useTimeoutFn } from "@vueuse/core";
import * as echarts from "echarts";
let brokenLine: any = null; //折线图实例
export default {
name: "welcome",
components: {
Flop,
Flop
},
setup() {
let mobile = ref(deviceDetection());
@@ -75,39 +71,39 @@ export default {
brokenLine.setOption({
title: {
text: "上海 空气质量指数",
left: "1%",
left: "1%"
},
tooltip: {
trigger: "axis",
trigger: "axis"
},
grid: {
left: "5%",
right: "15%",
bottom: "10%",
bottom: "10%"
},
xAxis: {
data: info.map(function (item) {
data: info.map(function(item) {
return item[0];
}),
})
},
yAxis: {},
toolbox: {
right: 10,
feature: {
dataZoom: {
yAxisIndex: "none",
yAxisIndex: "none"
},
restore: {},
saveAsImage: {},
},
saveAsImage: {}
}
},
dataZoom: [
{
startValue: "2014-06-01",
startValue: "2014-06-01"
},
{
type: "inside",
},
type: "inside"
}
],
visualMap: {
top: 50,
@@ -116,67 +112,67 @@ export default {
{
gt: 0,
lte: 50,
color: "#93CE07",
color: "#93CE07"
},
{
gt: 50,
lte: 100,
color: "#FBDB0F",
color: "#FBDB0F"
},
{
gt: 100,
lte: 150,
color: "#FC7D02",
color: "#FC7D02"
},
{
gt: 150,
lte: 200,
color: "#FD0100",
color: "#FD0100"
},
{
gt: 200,
lte: 300,
color: "#AA069F",
color: "#AA069F"
},
{
gt: 300,
color: "#AC3B2A",
},
color: "#AC3B2A"
}
],
outOfRange: {
color: "#999",
},
color: "#999"
}
},
series: {
name: "上海 空气质量指数",
type: "line",
data: info.map(function (item) {
data: info.map(function(item) {
return item[1];
}),
markLine: {
silent: true,
lineStyle: {
color: "#333",
color: "#333"
},
data: [
{
yAxis: 50,
yAxis: 50
},
{
yAxis: 100,
yAxis: 100
},
{
yAxis: 150,
yAxis: 150
},
{
yAxis: 200,
yAxis: 200
},
{
yAxis: 300,
},
],
},
},
yAxis: 300
}
]
}
}
});
});
};
@@ -190,7 +186,7 @@ export default {
useEventListener("resize", () => {
if (!brokenLine) return;
useTimeoutFn(() => {
brokenLine.resize()
brokenLine.resize();
}, 180);
});
});
@@ -206,9 +202,9 @@ export default {
greetings,
mobile,
loading,
openDepot,
openDepot
};
},
}
};
</script>