diff --git a/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts b/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts index 2d752e56aa3ea029770441065e0112736857747d..b2f97501031df7ae3470f461c542dffb796ccec5 100644 --- a/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts +++ b/packages/ui-vue/components/data-grid/src/property-config/data-grid-column.property-config.ts @@ -145,11 +145,11 @@ export class DataGriColumnProperty extends BaseControlProperty { title: '拖拽改变列宽', type: 'boolean' }, - filterable: { - description: '启用过滤', - title: '启用过滤', - type: 'boolean' - }, + // filterable: { + // description: '启用过滤', + // title: '启用过滤', + // type: 'boolean' + // }, width: { description: '列宽', title: '列宽', diff --git a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts index 86256e7155abfb84972e52af4e5e555eee6b9461..21ecd8b5bbba0ff44760d49d012cfa40148acf01 100644 --- a/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts +++ b/packages/ui-vue/components/data-grid/src/property-config/data-grid.property-config.ts @@ -86,17 +86,17 @@ export class DataGridProperty extends BaseControlProperty { // ] // } // }, - formatter: { - title: '操作列模板', - type: 'string', - visible: !!propertyData.command && propertyData.command.enable, - description: '自定义操作列模板', - refreshPanelAfterChanged: true, - editor: { - type: "code-editor", - language: "html", - } - } + // formatter: { + // title: '操作列模板', + // type: 'string', + // visible: false, + // description: '自定义操作列模板', + // refreshPanelAfterChanged: true, + // editor: { + // type: "code-editor", + // language: "html", + // } + // } } }; } diff --git a/packages/ui-vue/components/data-view/components/editors/commands.component.tsx b/packages/ui-vue/components/data-view/components/editors/commands.component.tsx index 7233a7d15df78da4e3f6d92284bb56a740159cc4..c5b1f7b48fed808ef614a8ae7cebd22f81e7279f 100644 --- a/packages/ui-vue/components/data-view/components/editors/commands.component.tsx +++ b/packages/ui-vue/components/data-view/components/editors/commands.component.tsx @@ -31,7 +31,7 @@ export default function (props: DataViewOptions) { } function excuteCommand(command: DataColumnCommand, payload: MouseEvent, visualDataRow: VisualData, cell: VisualDataCell) { - command.onClick(payload, visualDataRow.dataIndex, visualDataRow); + command.onClick?.(payload, visualDataRow.dataIndex, visualDataRow); switch (command.command) { case 'edit': visualDataRow.status === VisualDataStatus.editing; @@ -51,8 +51,16 @@ export default function (props: DataViewOptions) { function renderCommandColumn(cell: VisualDataCell, visualDataRow: VisualData) { const { column } = cell; - return column!.commands && column!.commands.map((command: DataColumnCommand) => { - return shouldShowCurrentCommandButton(command, visualDataRow) && { + if(!index) { + return shouldShowCurrentCommandButton(command, visualDataRow) && excuteCommand(command, payload, visualDataRow, cell)} + style={{ 'margin-bottom': '3px' }} + > {command.text} ; + } + return shouldShowCurrentCommandButton(command, visualDataRow) && excuteCommand(command, payload, visualDataRow, cell)}