refactor: 优化重置 ele vxe CellOperation 中按钮默认内边距
parent
0eb8a683c9
commit
f33be71b79
|
@ -323,10 +323,9 @@ export function useGridColumns(
|
||||||
{
|
{
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'right',
|
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
headerAlign: 'center',
|
align: 'center',
|
||||||
showOverflow: false,
|
showOverflow: false,
|
||||||
cellRender: {
|
cellRender: {
|
||||||
attrs: {
|
attrs: {
|
||||||
|
|
|
@ -135,7 +135,12 @@ setupVbenVxeTable({
|
||||||
// 注册表格的操作按钮渲染器 cellRender: { name: 'CellOperation', options: ['edit', 'delete'] }
|
// 注册表格的操作按钮渲染器 cellRender: { name: 'CellOperation', options: ['edit', 'delete'] }
|
||||||
vxeUI.renderer.add('CellOperation', {
|
vxeUI.renderer.add('CellOperation', {
|
||||||
renderTableDefault({ attrs, options, props }, { column, row }) {
|
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';
|
let align = 'end';
|
||||||
switch (column.align) {
|
switch (column.align) {
|
||||||
case 'center': {
|
case 'center': {
|
||||||
|
|
|
@ -323,10 +323,9 @@ export function useGridColumns(
|
||||||
{
|
{
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'right',
|
|
||||||
minWidth: 200,
|
minWidth: 200,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
headerAlign: 'center',
|
align: 'center',
|
||||||
showOverflow: false,
|
showOverflow: false,
|
||||||
cellRender: {
|
cellRender: {
|
||||||
attrs: {
|
attrs: {
|
||||||
|
|
|
@ -317,7 +317,7 @@ export function useGridColumns<T = SystemUserApi.User>(
|
||||||
{
|
{
|
||||||
field: 'operation',
|
field: 'operation',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
minWidth: 250,
|
minWidth: 130,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
cellRender: {
|
cellRender: {
|
||||||
|
|
Loading…
Reference in New Issue