Commit 0f28e803d0b65537216cd9f40ad5cad63c20db9b
1 parent
cad021c3
fix(table-action): incorrect button color of `disabled` state
修复表格操作列的按钮在disabled状态下的颜色显示 fixed: #891
Showing
2 changed files
with
6 additions
and
4 deletions
CHANGELOG.zh_CN.md
@@ -4,6 +4,7 @@ | @@ -4,6 +4,7 @@ | ||
4 | - 修复滚动条样式问题 | 4 | - 修复滚动条样式问题 |
5 | - 修复树形表格的带有展开图标的单元格的内容对齐问题 | 5 | - 修复树形表格的带有展开图标的单元格的内容对齐问题 |
6 | - 新增`headerTop`插槽 | 6 | - 新增`headerTop`插槽 |
7 | + - 修复操作列的按钮在 disabled 状态下的颜色显示 | ||
7 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 | 8 | - **AppSearch** 修复可能会搜索隐藏菜单的问题 |
8 | - **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件 | 9 | - **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件 |
9 | - **BasicUpload** 修复处理非`array`值时报错的问题 | 10 | - **BasicUpload** 修复处理非`array`值时报错的问题 |
src/components/Button/src/PopConfirmButton.vue
1 | <script lang="ts"> | 1 | <script lang="ts"> |
2 | - import { defineComponent, h, unref, computed } from 'vue'; | 2 | + import { computed, defineComponent, h, unref } from 'vue'; |
3 | import BasicButton from './BasicButton.vue'; | 3 | import BasicButton from './BasicButton.vue'; |
4 | import { Popconfirm } from 'ant-design-vue'; | 4 | import { Popconfirm } from 'ant-design-vue'; |
5 | import { extendSlots } from '/@/utils/helper/tsxHelper'; | 5 | import { extendSlots } from '/@/utils/helper/tsxHelper'; |
@@ -29,19 +29,20 @@ | @@ -29,19 +29,20 @@ | ||
29 | 29 | ||
30 | // get inherit binding value | 30 | // get inherit binding value |
31 | const getBindValues = computed(() => { | 31 | const getBindValues = computed(() => { |
32 | - const popValues = Object.assign( | 32 | + return Object.assign( |
33 | { | 33 | { |
34 | okText: t('common.okText'), | 34 | okText: t('common.okText'), |
35 | cancelText: t('common.cancelText'), | 35 | cancelText: t('common.cancelText'), |
36 | }, | 36 | }, |
37 | { ...props, ...unref(attrs) } | 37 | { ...props, ...unref(attrs) } |
38 | ); | 38 | ); |
39 | - return popValues; | ||
40 | }); | 39 | }); |
41 | 40 | ||
42 | return () => { | 41 | return () => { |
43 | const bindValues = omit(unref(getBindValues), 'icon'); | 42 | const bindValues = omit(unref(getBindValues), 'icon'); |
44 | - const Button = h(BasicButton, omit(bindValues, 'title'), extendSlots(slots)); | 43 | + const btnBind = omit(bindValues, 'title'); |
44 | + if (btnBind.disabled) btnBind.color = ''; | ||
45 | + const Button = h(BasicButton, btnBind, extendSlots(slots)); | ||
45 | 46 | ||
46 | // If it is not enabled, it is a normal button | 47 | // If it is not enabled, it is a normal button |
47 | if (!props.enable) { | 48 | if (!props.enable) { |