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 @@
@@ -21,15 +20,12 @@