mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-23 15:35:06 +08:00
perf: vxe
This commit is contained in:
12
yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dict.tsx
Normal file
12
yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dict.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import { DictTag } from '@/components/DictTag'
|
||||
import { VXETable } from 'vxe-table'
|
||||
|
||||
// 创建一个简单的超链接渲染
|
||||
VXETable.renderer.add('XDict', {
|
||||
// 默认显示模板
|
||||
renderDefault(renderOpts, params) {
|
||||
const { row, column } = params
|
||||
const { content } = renderOpts
|
||||
return <DictTag type={content as unknown as string} value={row[column.field]}></DictTag>
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user