refactor: 优化重置 ele vxe CellOperation 中按钮默认内边距

pull/102/head
puhui999 2025-05-12 17:14:10 +08:00
parent 0eb8a683c9
commit f33be71b79
4 changed files with 9 additions and 6 deletions

View File

@ -323,10 +323,9 @@ export function useGridColumns(
{
field: 'operation',
title: '操作',
align: 'right',
minWidth: 200,
fixed: 'right',
headerAlign: 'center',
align: 'center',
showOverflow: false,
cellRender: {
attrs: {

View File

@ -135,7 +135,12 @@ setupVbenVxeTable({
// 注册表格的操作按钮渲染器 cellRender: { name: 'CellOperation', options: ['edit', 'delete'] }
vxeUI.renderer.add('CellOperation', {
renderTableDefault({ attrs, options, props }, { column, row }) {
const defaultProps = { size: 'small', type: 'primary', ...props };
const defaultProps = {
size: 'small',
type: 'primary',
class: '!p-0',
...props,
};
let align = 'end';
switch (column.align) {
case 'center': {

View File

@ -323,10 +323,9 @@ export function useGridColumns(
{
field: 'operation',
title: '操作',
align: 'right',
minWidth: 200,
fixed: 'right',
headerAlign: 'center',
align: 'center',
showOverflow: false,
cellRender: {
attrs: {

View File

@ -317,7 +317,7 @@ export function useGridColumns<T = SystemUserApi.User>(
{
field: 'operation',
title: '操作',
minWidth: 250,
minWidth: 130,
fixed: 'right',
align: 'center',
cellRender: {