From 7407c5088c51598d2e829c4b1fe89e39fffe529c Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 9 Jan 2022 13:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/button/button.less | 77 ++++++++++++++++++++++++- src/less/lib/theme.less | 15 ++++- 2 files changed, 86 insertions(+), 6 deletions(-) diff --git a/src/less/base/single/button/button.less b/src/less/base/single/button/button.less index 1b19c98a2..df681fc31 100644 --- a/src/less/base/single/button/button.less +++ b/src/less/base/single/button/button.less @@ -84,6 +84,19 @@ body .bi-button, #body .bi-button { background-color: transparent; border-width: 0; } + &.ghost { + &, & .b-font:before { + color: @color-bi-text-success-ghost-button; + } + background-color: transparent; + &:hover { + color: @color-bi-text; + background-color: @color-bi-background-success-button; + } + &:active { + background-color: @color-bi-background-success-button; + } + } } &.button-warning { & { @@ -100,6 +113,19 @@ body .bi-button, #body .bi-button { background-color: transparent; border-width: 0; } + &.ghost { + &, & .b-font:before { + color: @color-bi-text-warning-ghost-button; + } + background-color: transparent; + &:hover { + color: @color-bi-text; + background-color: @color-bi-background-warning-button; + } + &:active { + background-color: @color-bi-background-warning-button; + } + } } &.button-error { & { @@ -111,11 +137,24 @@ body .bi-button, #body .bi-button { } &.clear { &, & .b-font:before { - color: @color-bi-text-clear-error-button; + color: @color-bi-text-error-clear-button; } background-color: transparent; border-width: 0; } + &.ghost { + &, & .b-font:before { + color: @color-bi-text-error-ghost-button; + } + background-color: transparent; + &:hover { + color: @color-bi-text; + background-color: @color-bi-background-error-button; + } + &:active { + background-color: @color-bi-background-error-button; + } + } } &.button-common.disabled, &.button-success.disabled, @@ -161,13 +200,45 @@ body .bi-button, #body .bi-button { } &.ghost { &, & .b-font:before { - color: @color-bi-text-disabled-ignore-ghost-button !important; + // color: @color-bi-text-disabled-ignore-ghost-button !important; } background: transparent !important; - border-color: @color-bi-border-disabled-ignore-ghost-button !important; + // border-color: @color-bi-border-disabled-ignore-ghost-button !important; .opacity(0.5); } } + &.button-common.disabled { + &.ghost { + &, & .b-font:before { + color: @color-bi-text-disabled-common-ghost-button !important; + } + border-color: @color-bi-border-disabled-common-ghost-button !important; + } + } + &.button-success.disabled { + &.ghost { + &, & .b-font:before { + color: @color-bi-text-disabled-success-ghost-button !important; + } + border-color: @color-bi-border-disabled-success-ghost-button !important; + } + } + &.button-warning.disabled { + &.ghost { + &, & .b-font:before { + color: @color-bi-text-disabled-warning-ghost-button !important; + } + border-color: @color-bi-border-disabled-warning-ghost-button !important; + } + } + &.button-error.disabled { + &.ghost { + &, & .b-font:before { + color: @color-bi-text-disabled-error-ghost-button !important; + } + border-color: @color-bi-border-disabled-error-ghost-button !important; + } + } } .bi-basic-button { diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index 42aed4e30..1195b1b47 100644 --- a/src/less/lib/theme.less +++ b/src/less/lib/theme.less @@ -77,14 +77,17 @@ @color-bi-background-success-button: @color-bi-background-success; @color-bi-border-success-button: @color-bi-border-success; @color-bi-text-success-clear-button: @color-bi-text-success; +@color-bi-text-success-ghost-button: @color-bi-text-success; @color-bi-text-warning-button: @color-bi-text; @color-bi-background-warning-button: @color-bi-background-warning; @color-bi-border-warning-button: @color-bi-border-warning; @color-bi-text-warning-clear-button: @color-bi-text-redmark; +@color-bi-text-warning-ghost-button: @color-bi-text-redmark; @color-bi-text-error-button: @color-bi-text; @color-bi-background-error-button: @color-bi-background-failure; @color-bi-border-error-button: @color-bi-border-failure; -@color-bi-text-clear-error-button: @color-bi-text-failure; +@color-bi-text-error-clear-button: @color-bi-text-failure; +@color-bi-text-error-ghost-button: @color-bi-text-failure; @color-bi-text-disabled-button: @color-bi-text-disabled; @color-bi-background-disabled-button: @color-bi-background-light-disabled; @color-bi-border-disabled-button: @color-bi-border-disabled; @@ -92,8 +95,14 @@ @color-bi-background-disabled-ignore-button: @color-bi-background-default; @color-bi-border-disabled-ignore-button: @color-bi-border-line; @color-bi-text-disabled-ignore-clear-button: @color-bi-text-disabled; -@color-bi-text-disabled-ignore-ghost-button: @color-bi-text-highlight; -@color-bi-border-disabled-ignore-ghost-button: @color-bi-border-highlight; +@color-bi-text-disabled-common-ghost-button: @color-bi-text-highlight; +@color-bi-border-disabled-common-ghost-button: @color-bi-border-highlight; +@color-bi-text-disabled-success-ghost-button: @color-bi-text-success; +@color-bi-border-disabled-success-ghost-button: @color-bi-border-success; +@color-bi-text-disabled-warning-ghost-button: @color-bi-text-redmark; +@color-bi-border-disabled-warning-ghost-button: @color-bi-border-warning; +@color-bi-text-disabled-error-ghost-button: @color-bi-text-failure; +@color-bi-border-disabled-error-ghost-button: @color-bi-border-failure; @color-bi-background-disabled-button-theme-dark: @color-bi-background-light-disabled-theme-dark; // 单选按钮