From dc486af223f7a2bbf9f781160d369c08950bf7ca Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Fri, 17 Mar 2023 16:32:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8D=A1=E7=89=87=E8=83=8C=E6=99=AF?= =?UTF-8?q?=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...iaabled.png => access-config-disabled.png} | Bin src/components/BadgeStatus/color.ts | 12 +- src/components/CardBox/index.vue | 60 +++- src/views/Northbound/AliCloud/index.vue | 40 +-- .../DuerOS/Detail/command/EditTable.vue | 156 ++++++---- .../DuerOS/Detail/command/index.vue | 293 +++++++++++------- src/views/Northbound/DuerOS/Detail/index.vue | 14 +- src/views/Northbound/DuerOS/index.vue | 34 +- src/views/device/Instance/Detail/index.vue | 36 ++- src/views/device/Instance/index.vue | 28 +- 10 files changed, 433 insertions(+), 240 deletions(-) rename public/images/{access-config-diaabled.png => access-config-disabled.png} (100%) diff --git a/public/images/access-config-diaabled.png b/public/images/access-config-disabled.png similarity index 100% rename from public/images/access-config-diaabled.png rename to public/images/access-config-disabled.png diff --git a/src/components/BadgeStatus/color.ts b/src/components/BadgeStatus/color.ts index 6d9f18d3..c3f05abf 100644 --- a/src/components/BadgeStatus/color.ts +++ b/src/components/BadgeStatus/color.ts @@ -1,12 +1,12 @@ const color = { - 'processing': '64, 169, 255', - 'error': '247, 79, 70', - 'success': '74, 234, 220', - 'warning': '250, 178, 71', - 'default': '63, 73, 96' + 'processing': '9, 46, 231', + 'error': '229, 0, 18', + 'success': '36, 178, 118', + 'warning': '255, 144, 0', + 'default': '102, 102, 102' } -export const getHexColor = (code: string, pe: number = 0.3) => { +export const getHexColor = (code: string, pe: number = 0.1) => { const _color = color[code] || color.default if (code === 'default') { pe = 0.1 diff --git a/src/components/CardBox/index.vue b/src/components/CardBox/index.vue index 6174471a..4ef5c521 100644 --- a/src/components/CardBox/index.vue +++ b/src/components/CardBox/index.vue @@ -6,6 +6,18 @@ @click="handleClick" >
+
+
@@ -17,21 +29,19 @@
-
-
import BadgeStatus from '@/components/BadgeStatus/index.vue'; -import { getHexColor } from '../BadgeStatus/color' +import color, { getHexColor } from '../BadgeStatus/color'; import type { ActionsType } from '@/components/Table'; import { PropType } from 'vue'; @@ -123,6 +133,15 @@ const props = defineProps({ }, }); +const getBackgroundColor = (code: string) => { + const _color = color[code] || color.default; + return `linear-gradient( + 188.4deg, + rgba(${_color}, 0.03) 22.94%, + rgba(${_color}, 0) 94.62% + )`; +}; + const handleClick = () => { emit('click', props.value); }; @@ -257,6 +276,33 @@ const handleClick = () => { } } + .card-content-bg1 { + position: absolute; + right: -5%; + height: 100%; + width: 44.65%; + top: 0; + background: linear-gradient( + 188.4deg, + rgba(229, 0, 18, 0.03) 22.94%, + rgba(229, 0, 18, 0) 94.62% + ); + transform: skewX(-15deg); + } + + .card-content-bg2 { + position: absolute; + right: -5%; + height: 100%; + width: calc(44.65% + 34px); + top: 0; + background: linear-gradient( + 188.4deg, + rgba(229, 0, 18, 0.03) 22.94%, + rgba(229, 0, 18, 0) 94.62% + ); + transform: skewX(-15deg); + } .card-mask { position: absolute; top: 0; @@ -268,7 +314,7 @@ const handleClick = () => { width: 100%; height: 100%; color: #fff; - background-color: rgba(#000, .5); + background-color: rgba(#000, 0.5); visibility: hidden; cursor: pointer; transition: all 0.3s; diff --git a/src/views/Northbound/AliCloud/index.vue b/src/views/Northbound/AliCloud/index.vue index ec33051d..e5acf97c 100644 --- a/src/views/Northbound/AliCloud/index.vue +++ b/src/views/Northbound/AliCloud/index.vue @@ -27,11 +27,12 @@