Commit 42812162c46832ce4d3e332bd579c042309115bc
1 parent
9b7ede09
fix(dark-theme): disabled link `button` color
修复黑暗主题下禁用状态的link类型按钮的颜色
Showing
3 changed files
with
19 additions
and
9 deletions
CHANGELOG.zh_CN.md
build/vite/plugin/theme.ts
... | ... | @@ -45,8 +45,8 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { |
45 | 45 | }), |
46 | 46 | antdDarkThemePlugin({ |
47 | 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 | 50 | path.resolve(process.cwd(), 'src/design/index.less'), |
51 | 51 | ], |
52 | 52 | filter: (id) => (isBuild ? !id.endsWith('antd.less') : true), | ... | ... |
src/design/ant/btn.less
... | ... | @@ -50,15 +50,15 @@ |
50 | 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 | 62 | color: rgba(0, 0, 0, 0.25); |
63 | 63 | text-shadow: none; |
64 | 64 | cursor: not-allowed !important; |
... | ... | @@ -67,6 +67,15 @@ |
67 | 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 | 79 | // color: @white; |
71 | 80 | |
72 | 81 | &-success.ant-btn-link:not([disabled='disabled']) { | ... | ... |