From a9084c7b0ad5af870848d22969d37c9addab19e0 Mon Sep 17 00:00:00 2001 From: caijianhaoa <1784581164@qq.com> Date: Sun, 21 Aug 2022 22:11:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/componets/HomePage/thirdGraph.vue | 351 ++++++++++-------- src/componets/HomePage/titleComponent.vue | 21 +- src/componets/Performance/paintList.vue | 13 +- src/componets/Performance/performanceMain.vue | 5 +- src/componets/Performance/performanceTop.vue | 26 +- src/router/index.js | 16 +- 6 files changed, 247 insertions(+), 185 deletions(-) diff --git a/src/componets/HomePage/thirdGraph.vue b/src/componets/HomePage/thirdGraph.vue index fc44354..0936918 100644 --- a/src/componets/HomePage/thirdGraph.vue +++ b/src/componets/HomePage/thirdGraph.vue @@ -5,179 +5,214 @@ * @LastEditTime: 2022-08-08 21:44:32 --> - + diff --git a/src/componets/HomePage/titleComponent.vue b/src/componets/HomePage/titleComponent.vue index a22223b..2677879 100644 --- a/src/componets/HomePage/titleComponent.vue +++ b/src/componets/HomePage/titleComponent.vue @@ -5,27 +5,30 @@ * @LastEditTime: 2022-08-07 10:14:32 --> \ No newline at end of file + diff --git a/src/componets/Performance/paintList.vue b/src/componets/Performance/paintList.vue index 3f7904c..6b64d6a 100644 --- a/src/componets/Performance/paintList.vue +++ b/src/componets/Performance/paintList.vue @@ -2,21 +2,25 @@
-
首屏绘制时间(FP)
+
首屏绘制时间(FP)
-
首次内容绘制时间(FCP)
+
+ 首次内容绘制时间(FCP) +
-
+
第一个有意义的内容出现时间(FMP)
-
最大内容块渲染时间(LCP)
+
+ 最大内容块渲染时间(LCP) +
@@ -41,6 +45,7 @@ export default { height: 0.5729vw; border-radius: 50%; margin-right: 0.5208vw; + margin-top: 0.8vh; } } diff --git a/src/componets/Performance/performanceMain.vue b/src/componets/Performance/performanceMain.vue index 0847452..1683c45 100644 --- a/src/componets/Performance/performanceMain.vue +++ b/src/componets/Performance/performanceMain.vue @@ -5,7 +5,10 @@
- +

使用文档

diff --git a/src/componets/Performance/performanceTop.vue b/src/componets/Performance/performanceTop.vue index 12ea064..067c092 100644 --- a/src/componets/Performance/performanceTop.vue +++ b/src/componets/Performance/performanceTop.vue @@ -34,7 +34,9 @@
-
{{ count }}
+
+ {{ count }} +
健康状况:
{{ getWhat(count) }}
@@ -60,6 +62,9 @@ export default { firstMeaningfulPaint: 0, largestContentfulPaint: 0, count: 0, + green: false, + red: false, + yellow: false, } }, mounted() { @@ -68,11 +73,14 @@ export default { methods: { getWhat(count) { if (count < 5) { + this.green = true return '优秀' } else if (count < 10) { + this.yellow = true return '良好' } else { - return '直接扑街' + this.red = true + return '差劲' } }, getPaintArr() { @@ -127,13 +135,21 @@ export default { margin-top: 6px; width: 3.39vw; height: 3.39vw; - border: 8px solid #6be6c1; border-radius: 50%; opacity: 1; font-size: 2.1354vw; line-height: 3.39vw; color: #fff; } + .green { + border: 8px solid #6be6c1; + } + .yellow { + border: 8px solid yellow; + } + .red { + border: 8px solid red; + } .status { display: flex; flex-direction: column; @@ -165,7 +181,7 @@ export default { justify-content: space-around; .item-item1 { text-align: center; - font-size: 16px; + font-size: 1.1vw; font-weight: 400; color: #82a1bf; line-height: 0px; @@ -174,7 +190,7 @@ export default { margin-bottom: 10px; text-align: center; font-family: Alibaba PuHuiTi-Medium, Alibaba PuHuiTi; - font-size: 28px; + font-size: 1.8vw; font-weight: 500; color: #fff; line-height: 0px; diff --git a/src/router/index.js b/src/router/index.js index f3c24ed..28b5769 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,7 +3,7 @@ * @Date: 2022-08-05 14:24:57 * @LastEditors: arvin(王德江) * @LastEditTime: 2022-08-05 15:19:53 - * @Description: + * @Description: */ import Vue from 'vue' import VueRouter from 'vue-router' @@ -15,30 +15,30 @@ const routes = [ { path: '/', name: 'home', - component: HomeView + component: HomeView, }, { // js错误 path: '/js-error', name: 'jsError', - component: () => import('../views/JsErrorView.vue') + component: () => import('../views/JsErrorView.vue'), }, { // 性能视图 - path: 'req-error', + path: '/performance', name: 'performance', - component: () => import('../views/PerformanceView.vue') + component: () => import('../views/PerformanceView.vue'), }, { // 请求错误视图 path: '/req-error', name: 'reqError', - component: () => import('../views/ReqErrorView.vue') - } + component: () => import('../views/ReqErrorView.vue'), + }, ] const router = new VueRouter({ - routes + routes, }) export default router -- Gitee