From 217258b9720abebcd629784acdd6e0a6247d3e1a Mon Sep 17 00:00:00 2001
From: xiaoxian521 <1923740402@qq.com>
Date: Mon, 7 Feb 2022 13:43:54 +0800
Subject: [PATCH] chore: update element-plus@2.0.0
---
package.json | 2 +-
pnpm-lock.yaml | 8 ++++----
src/layout/components/navbar.vue | 18 +++---------------
src/layout/components/panel/index.vue | 2 +-
src/layout/components/tag/index.scss | 19 ++++++++++---------
src/layout/components/tag/index.vue | 6 +++++-
6 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/package.json b/package.json
index 120ccd84b..5069eaa22 100644
--- a/package.json
+++ b/package.json
@@ -43,7 +43,7 @@
"dayjs": "^1.10.7",
"driver.js": "^0.9.8",
"echarts": "^5.2.1",
- "element-plus": "1.3.0-beta.1",
+ "element-plus": "^2.0.0",
"element-resize-detector": "^1.2.3",
"js-cookie": "^3.0.1",
"lodash-es": "^4.17.21",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 24312af33..2f1deda59 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -38,7 +38,7 @@ specifiers:
dayjs: ^1.10.7
driver.js: ^0.9.8
echarts: ^5.2.1
- element-plus: 1.3.0-beta.1
+ element-plus: ^2.0.0
element-resize-detector: ^1.2.3
eslint: 7.30.0
eslint-plugin-prettier: 3.4.0
@@ -106,7 +106,7 @@ dependencies:
dayjs: 1.10.7
driver.js: 0.9.8
echarts: 5.3.0
- element-plus: 1.3.0-beta.1_vue@3.2.29
+ element-plus: 2.0.0_vue@3.2.29
element-resize-detector: 1.2.4
js-cookie: 3.0.1
lodash-es: 4.17.21
@@ -3057,10 +3057,10 @@ packages:
}
dev: true
- /element-plus/1.3.0-beta.1_vue@3.2.29:
+ /element-plus/2.0.0_vue@3.2.29:
resolution:
{
- integrity: sha512-q3vMaKElPpuSTeIF7kuDmMOE+N1YVCCIG3fshXpz6qgjnxPbgZumVM0qGfhr8DTu9JxRbBoDok49dqtX/BWn3w==
+ integrity: sha512-bLt/Ahn0ejOKuYA4HR3iuGLHTt4pRzQZwCx1G2BLHEJLZi7CfLiFnjZMhGhYNkk49ir4JHtnBJTgLhNNaKALcA==
}
peerDependencies:
vue: ^3.2.0
diff --git a/src/layout/components/navbar.vue b/src/layout/components/navbar.vue
index 32ad5db7c..16571311e 100644
--- a/src/layout/components/navbar.vue
+++ b/src/layout/components/navbar.vue
@@ -234,14 +234,8 @@ function translationEn() {
}
.translation {
- .el-dropdown-menu__item {
- padding: 5px 40px !important;
- }
-
- .el-dropdown-menu__item:focus,
- .el-dropdown-menu__item:not(.is-disabled):hover {
- color: #606266;
- background: #f0f0f0;
+ ::v-deep(.el-dropdown-menu__item) {
+ padding: 5px 40px;
}
.check-zh {
@@ -258,16 +252,10 @@ function translationEn() {
.logout {
max-width: 120px;
- .el-dropdown-menu__item {
+ ::v-deep(.el-dropdown-menu__item) {
min-width: 100%;
display: inline-flex;
flex-wrap: wrap;
}
-
- .el-dropdown-menu__item:focus,
- .el-dropdown-menu__item:not(.is-disabled):hover {
- color: #606266;
- background: #f0f0f0;
- }
}
diff --git a/src/layout/components/panel/index.vue b/src/layout/components/panel/index.vue
index c09911e01..ed2d0fca7 100644
--- a/src/layout/components/panel/index.vue
+++ b/src/layout/components/panel/index.vue
@@ -125,7 +125,7 @@ emitter.on("openPanel", () => {
&:hover {
cursor: pointer;
- color: red;
+ color: var(--el-color-primary);
}
}
}
diff --git a/src/layout/components/tag/index.scss b/src/layout/components/tag/index.scss
index fd6347516..4e2f89576 100644
--- a/src/layout/components/tag/index.scss
+++ b/src/layout/components/tag/index.scss
@@ -92,7 +92,7 @@
.el-icon-close {
font-size: 10px;
- color: #1890ff;
+ color: var(--el-color-primary);
cursor: pointer;
position: absolute;
top: 50%;
@@ -190,7 +190,8 @@
align-items: center;
&:hover {
- background: #eee;
+ background: var(--el-color-primary-light-9);
+ color: var(--el-color-primary);
}
svg {
@@ -236,7 +237,7 @@
}
.scroll-item.is-active {
- background-color: #eaf4fe;
+ background-color: var(--el-color-primary-light-9);
position: relative;
color: #fff;
@@ -249,7 +250,7 @@
}
a {
- color: #1890ff;
+ color: var(--el-color-primary);
}
}
@@ -288,10 +289,10 @@
/* 卡片模式下鼠标移入显示蓝色边框 */
.card-in {
- color: #1890ff;
+ color: var(--el-color-primary);
a {
- color: #1890ff;
+ color: var(--el-color-primary);
}
}
@@ -312,7 +313,7 @@
position: absolute;
left: 0;
bottom: 0;
- background: #1890ff;
+ background: var(--el-color-primary);
}
/* 灵动模式下鼠标移入显示蓝色进度条 */
@@ -322,7 +323,7 @@
position: absolute;
left: 0;
bottom: 0;
- background: #1890ff;
+ background: var(--el-color-primary);
animation: scheduleInWidth 400ms ease-in;
}
@@ -333,7 +334,7 @@
position: absolute;
left: 0;
bottom: 0;
- background: #1890ff;
+ background: var(--el-color-primary);
animation: scheduleOutWidth 400ms ease-in;
}
diff --git a/src/layout/components/tag/index.vue b/src/layout/components/tag/index.vue
index 8813d525c..95097e5c5 100644
--- a/src/layout/components/tag/index.vue
+++ b/src/layout/components/tag/index.vue
@@ -722,7 +722,11 @@ const getContextMenuStyle = computed((): CSSProperties => {
:disabled="item.disabled"
@click="onClickDrop(key, item)"
>
-
+
{{ $t(item.text) }}