From 50ec4a6680c1ee5ae36a49a6a8b3a985644101e4 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 10 Aug 2022 11:28:07 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2034=20feat=EF=BC=9A=20topology=20js?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=8D=87=E7=BA=A7=E5=88=B0=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/css/index.scss | 2 +- .../assets/css/themes/src/input-number.scss | 38 +- .../common/project/L5/CanvasContextMenu.vue | 48 +- .../common/project/L5/CanvasProps.vue | 137 ++--- .../common/project/L5/services/canvas.js | 502 +++++++++--------- .../common/project/L5/topologyTopTool.vue | 12 +- .../components/common/project/topologyL5.vue | 130 ++--- .../common/project/topologyMixin.js | 152 +++++- 8 files changed, 595 insertions(+), 426 deletions(-) diff --git a/nezha-fronted/src/assets/css/index.scss b/nezha-fronted/src/assets/css/index.scss index 1125c34c2..c4c4e2cd1 100644 --- a/nezha-fronted/src/assets/css/index.scss +++ b/nezha-fronted/src/assets/css/index.scss @@ -16,7 +16,7 @@ body { min-width: 1024px; margin:0 !important; padding: 0 !important; - cursor: default !important; + cursor: default; } html { height: 100%; diff --git a/nezha-fronted/src/assets/css/themes/src/input-number.scss b/nezha-fronted/src/assets/css/themes/src/input-number.scss index 4e5109cb8..67594bf49 100644 --- a/nezha-fronted/src/assets/css/themes/src/input-number.scss +++ b/nezha-fronted/src/assets/css/themes/src/input-number.scss @@ -19,7 +19,32 @@ } } - @include e((increase, decrease)) { + @include e(increase) { + position: absolute; + z-index: 1; + top: 1px; + width: $--input-height; + height: auto; + text-align: center; + background: $--background-color-base; + color: $--color-text-regular; + cursor: pointer; + font-size: 13px; + + &:hover { + color: $--color-primary; + + &:not(.is-disabled) ~ .el-input .el-input__inner:not(.is-disabled) { + border-color: $--input-focus-border; + } + } + + &.is-disabled { + color: $--disabled-color-base; + cursor: not-allowed; + } + } + @include e(decrease) { position: absolute; z-index: 1; top: 1px; @@ -58,7 +83,16 @@ } @include when(disabled) { - @include e((increase, decrease)) { + @include e(increase) { + border-color: $--disabled-border-base; + color: $--disabled-border-base; + + &:hover { + color: $--disabled-border-base; + cursor: not-allowed; + } + } + @include e(decrease) { border-color: $--disabled-border-base; color: $--disabled-border-base; diff --git a/nezha-fronted/src/components/common/project/L5/CanvasContextMenu.vue b/nezha-fronted/src/components/common/project/L5/CanvasContextMenu.vue index 1e081d92d..de174644d 100644 --- a/nezha-fronted/src/components/common/project/L5/CanvasContextMenu.vue +++ b/nezha-fronted/src/components/common/project/L5/CanvasContextMenu.vue @@ -1,14 +1,14 @@