Commit 0f28e803d0b65537216cd9f40ad5cad63c20db9b

Authored by 无木
1 parent cad021c3

fix(table-action): incorrect button color of `disabled` state

修复表格操作列的按钮在disabled状态下的颜色显示

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