diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/html.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/html.tsx new file mode 100644 index 000000000..46483a1c6 --- /dev/null +++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/html.tsx @@ -0,0 +1,10 @@ +import { VXETable } from 'vxe-table' + +// 图片渲染 +VXETable.renderer.add('XHtml', { + // 默认显示模板 + renderDefault(_renderOpts, params) { + const { row, column } = params + return + } +}) diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/default.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/img.tsx similarity index 55% rename from yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/default.tsx rename to yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/img.tsx index ec30646d5..8b67e0ea7 100644 --- a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/default.tsx +++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/img.tsx @@ -1,19 +1,5 @@ import { VXETable } from 'vxe-table' -// 超链接渲染 -VXETable.renderer.add('XLink', { - // 默认显示模板 - renderDefault(renderOpts, params) { - const { row, column } = params - const { events = {} } = renderOpts - return ( - events.click(params)}> - {row[column.field]} - - ) - } -}) - // 图片渲染 VXETable.renderer.add('XImg', { // 默认显示模板 diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/index.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/index.tsx index 50a41bcbb..9e048dddd 100644 --- a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/index.tsx +++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/index.tsx @@ -1,3 +1,4 @@ import './dataTimePicker' import './dict' -import './default' +import './link' +import './img' diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/link.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/link.tsx new file mode 100644 index 000000000..84e1a5a14 --- /dev/null +++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/link.tsx @@ -0,0 +1,15 @@ +import { VXETable } from 'vxe-table' + +// 超链接渲染 +VXETable.renderer.add('XLink', { + // 默认显示模板 + renderDefault(renderOpts, params) { + const { row, column } = params + const { events = {} } = renderOpts + return ( + events.click(params)}> + {row[column.field]} + + ) + } +})