mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-03 02:54:40 +08:00
fix(table-action): incorrect button color of disabled
state
修复表格操作列的按钮在disabled状态下的颜色显示 fixed: #891
This commit is contained in:
parent
cad021c34b
commit
0f28e803d0
@ -4,6 +4,7 @@
|
|||||||
- 修复滚动条样式问题
|
- 修复滚动条样式问题
|
||||||
- 修复树形表格的带有展开图标的单元格的内容对齐问题
|
- 修复树形表格的带有展开图标的单元格的内容对齐问题
|
||||||
- 新增`headerTop`插槽
|
- 新增`headerTop`插槽
|
||||||
|
- 修复操作列的按钮在 disabled 状态下的颜色显示
|
||||||
- **AppSearch** 修复可能会搜索隐藏菜单的问题
|
- **AppSearch** 修复可能会搜索隐藏菜单的问题
|
||||||
- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
|
- **TableAction** 仅在 action.tooltip 存在的情况下 才包裹 Tooltip 组件
|
||||||
- **BasicUpload** 修复处理非`array`值时报错的问题
|
- **BasicUpload** 修复处理非`array`值时报错的问题
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, h, unref, computed } from 'vue';
|
import { computed, defineComponent, h, unref } from 'vue';
|
||||||
import BasicButton from './BasicButton.vue';
|
import BasicButton from './BasicButton.vue';
|
||||||
import { Popconfirm } from 'ant-design-vue';
|
import { Popconfirm } from 'ant-design-vue';
|
||||||
import { extendSlots } from '/@/utils/helper/tsxHelper';
|
import { extendSlots } from '/@/utils/helper/tsxHelper';
|
||||||
@ -29,19 +29,20 @@
|
|||||||
|
|
||||||
// get inherit binding value
|
// get inherit binding value
|
||||||
const getBindValues = computed(() => {
|
const getBindValues = computed(() => {
|
||||||
const popValues = Object.assign(
|
return Object.assign(
|
||||||
{
|
{
|
||||||
okText: t('common.okText'),
|
okText: t('common.okText'),
|
||||||
cancelText: t('common.cancelText'),
|
cancelText: t('common.cancelText'),
|
||||||
},
|
},
|
||||||
{ ...props, ...unref(attrs) }
|
{ ...props, ...unref(attrs) }
|
||||||
);
|
);
|
||||||
return popValues;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
const bindValues = omit(unref(getBindValues), 'icon');
|
const bindValues = omit(unref(getBindValues), 'icon');
|
||||||
const Button = h(BasicButton, omit(bindValues, 'title'), extendSlots(slots));
|
const btnBind = omit(bindValues, 'title');
|
||||||
|
if (btnBind.disabled) btnBind.color = '';
|
||||||
|
const Button = h(BasicButton, btnBind, extendSlots(slots));
|
||||||
|
|
||||||
// If it is not enabled, it is a normal button
|
// If it is not enabled, it is a normal button
|
||||||
if (!props.enable) {
|
if (!props.enable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user