From a9769742901ffed44e47d9807808f2ebcd2bebae Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 5 Nov 2021 10:17:04 +0800 Subject: [PATCH] refactor(multi-pages): adjust styling for el-puls --- package.json | 2 +- src/common/http.js | 12 +- src/components/EmqSelect.vue | 84 ++++--- src/main.ts | 15 +- src/style/common.scss | 2 +- src/style/normalize.scss | 205 +++++++++++++++++- src/views/About.vue | 5 - src/views/Advanced/components/postpone.vue | 20 +- src/views/Advanced/components/retainer.vue | 2 +- src/views/Advanced/components/rewrite.vue | 10 +- src/views/Advanced/components/subscribe.vue | 2 +- src/views/Alarm/Alarm.vue | 1 - src/views/Auth/AuthnDetails.vue | 4 +- src/views/Auth/AuthzDetails.vue | 4 +- src/views/Auth/components/BuiltInManager.vue | 2 +- src/views/Auth/components/DataManager.vue | 2 +- src/views/Base/Layout.vue | 1 + src/views/Base/NavHeader.vue | 2 +- src/views/Clients/ClientDetails.vue | 12 +- src/views/Clients/Clients.vue | 7 +- .../Clients/components/CreateSubscribe.vue | 2 +- src/views/Dashboard/Metrics.vue | 2 +- src/views/Gateway/GatewayCreate.vue | 15 +- src/views/Gateway/GatewayDetail.vue | 5 +- src/views/Gateway/components/clients.vue | 2 +- src/views/Gateway/components/coapBasic.vue | 2 +- src/views/Gateway/components/exprotoBasic.vue | 2 +- src/views/Gateway/components/listeners.vue | 12 +- src/views/Gateway/components/lwm2mBasic.vue | 2 +- src/views/Gateway/components/mqttsnBasic.vue | 2 +- src/views/Gateway/components/stompBasic.vue | 2 +- src/views/General/Application.vue | 194 ++++++++++------- src/views/General/Backup.vue | 155 +++++++------ src/views/General/Blacklist.vue | 32 ++- src/views/General/LogTrace.vue | 170 +++++++++------ src/views/General/Users.vue | 16 +- src/views/Home.vue | 18 -- src/views/Tools/TopicMetrics.vue | 4 +- src/views/Tools/WebSocket.vue | 22 +- src/views/Tools/components/WebSocketItem.vue | 2 - src/views/Topics/Topics.vue | 18 +- 41 files changed, 664 insertions(+), 409 deletions(-) delete mode 100644 src/views/About.vue delete mode 100644 src/views/Home.vue diff --git a/package.json b/package.json index bdaba34b3..05d1b2dae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "emqx-dashboard-web-new", - "version": "0.1.0", + "version": "0.2.0", "private": true, "scripts": { "serve": "vue-cli-service serve", diff --git a/src/common/http.js b/src/common/http.js index b26706407..85d880bad 100644 --- a/src/common/http.js +++ b/src/common/http.js @@ -1,5 +1,5 @@ import axios from "axios"; -// import { Message } from "element-ui"; +import { ElMessage as M } from "element-plus"; import NProgress from "nprogress"; import "nprogress/nprogress.css"; import { toLogin } from "@/router"; @@ -25,7 +25,6 @@ axios.interceptors.request.use( return config; }, (error) => { - // console.log(Object.keys(error)) Promise.reject(error); } ); @@ -54,10 +53,9 @@ axios.interceptors.response.use( if (!respSet.has(status)) { respSet.add(status); - // if (data?.code || data?.message) - // Message.error(status + " " + data?.code + ":" + data?.message); - // else - // Message.error(status + " Network error"); + if (data?.code || data?.message) + M.error(status + " " + data?.code + ":" + data?.message); + else M.error(status + " Network error"); if (status === 401) { toLogin(); @@ -65,7 +63,7 @@ axios.interceptors.response.use( } } else { if (!respSet.has(0)) { - // Message.error("Some error occurred"); + M.error("Some error occurred"); respSet.add(0); } } diff --git a/src/components/EmqSelect.vue b/src/components/EmqSelect.vue index 56b000425..3f92ba4d7 100644 --- a/src/components/EmqSelect.vue +++ b/src/components/EmqSelect.vue @@ -1,9 +1,8 @@