Commit 42812162c46832ce4d3e332bd579c042309115bc

Authored by 无木
1 parent 9b7ede09

fix(dark-theme): disabled link `button` color

修复黑暗主题下禁用状态的link类型按钮的颜色
CHANGELOG.zh_CN.md
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 - **Dark Theme** 黑暗主题下的配色问题修正 6 - **Dark Theme** 黑暗主题下的配色问题修正
7 - 修复`Tree`组件被选中节点的背景颜色 7 - 修复`Tree`组件被选中节点的背景颜色
8 - 修复`Alert`组件的颜色配置 8 - 修复`Alert`组件的颜色配置
  9 + - 修复禁用状态下的`link`类型的按钮颜色问题
9 10
10 ## 2.6.1(2021-07-19) 11 ## 2.6.1(2021-07-19)
11 12
build/vite/plugin/theme.ts
@@ -45,8 +45,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { @@ -45,8 +45,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] {
45 }), 45 }),
46 antdDarkThemePlugin({ 46 antdDarkThemePlugin({
47 preloadFiles: [ 47 preloadFiles: [
48 - //path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),  
49 - path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'), 48 + path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),
  49 + //path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'),
50 path.resolve(process.cwd(), 'src/design/index.less'), 50 path.resolve(process.cwd(), 'src/design/index.less'),
51 ], 51 ],
52 filter: (id) => (isBuild ? !id.endsWith('antd.less') : true), 52 filter: (id) => (isBuild ? !id.endsWith('antd.less') : true),
src/design/ant/btn.less
@@ -50,15 +50,15 @@ @@ -50,15 +50,15 @@
50 border-color: @button-cancel-hover-border-color; 50 border-color: @button-cancel-hover-border-color;
51 } 51 }
52 52
53 - &[disabled],  
54 - &[disabled]:hover {  
55 - color: fade(@button-cancel-color, 40%);  
56 - background: fade(@button-cancel-bg-color, 40%);  
57 - border-color: fade(@button-cancel-border-color, 40%);  
58 - } 53 + //&[disabled],
  54 + //&[disabled]:hover {
  55 + // color: fade(@button-cancel-color, 40%);
  56 + // background: fade(@button-cancel-bg-color, 40%);
  57 + // border-color: fade(@button-cancel-border-color, 40%);
  58 + //}
59 } 59 }
60 60
61 - &.ant-btn-link.is-disabled { 61 + [data-theme='light'] &.ant-btn-link.is-disabled {
62 color: rgba(0, 0, 0, 0.25); 62 color: rgba(0, 0, 0, 0.25);
63 text-shadow: none; 63 text-shadow: none;
64 cursor: not-allowed !important; 64 cursor: not-allowed !important;
@@ -67,6 +67,15 @@ @@ -67,6 +67,15 @@
67 box-shadow: none; 67 box-shadow: none;
68 } 68 }
69 69
  70 + [data-theme='dark'] &.ant-btn-link.is-disabled {
  71 + color: rgba(255, 255, 255, 0.25) !important;
  72 + text-shadow: none;
  73 + cursor: not-allowed !important;
  74 + background-color: transparent !important;
  75 + border-color: transparent !important;
  76 + box-shadow: none;
  77 + }
  78 +
70 // color: @white; 79 // color: @white;
71 80
72 &-success.ant-btn-link:not([disabled='disabled']) { 81 &-success.ant-btn-link:not([disabled='disabled']) {