Browse Source

feat: add renderTag

main
xingyu 2 years ago
parent
commit
abc7d24a22
  1. 3
      src/views/system/operatelog/operateLog.data.ts

3
src/views/system/operatelog/operateLog.data.ts

@ -1,7 +1,6 @@
import { getIntDictOptions } from '@/utils/dict' import { getIntDictOptions } from '@/utils/dict'
import { BasicColumn, FormSchema, useRender } from '@/components/Table' import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE } from '@/utils/dict' import { DICT_TYPE } from '@/utils/dict'
import { h } from 'vue'
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
@ -42,7 +41,7 @@ export const columns: BasicColumn[] = [
dataIndex: 'resultCode', dataIndex: 'resultCode',
width: 180, width: 180,
customRender: ({ text }) => { customRender: ({ text }) => {
return h('span', text === 0 ? '成功' : '失败') return useRender.renderTag(text === 0 ? '成功' : '失败')
} }
}, },
{ {