feat: render

pull/4/MERGE
xingyu 2023-03-29 23:57:37 +08:00
parent fae8ef469f
commit b568d4ca99
1 changed files with 8 additions and 0 deletions

View File

@ -13,10 +13,13 @@ export const useRender = {
width: 80
})
}
return ''
},
renderText: (text, val) => {
if (text) {
return text + ' ' + val
} else {
return ''
}
},
renderTag: (text, color?) => {
@ -34,8 +37,12 @@ export const useRender = {
})
])
}
return ''
},
renderDate: (text, format?) => {
if (!text) {
return ''
}
if (!format) {
return dayjs(text).format('YYYY-MM-DD HH:mm:ss')
} else {
@ -50,5 +57,6 @@ export const useRender = {
dictType: dictType || 'number'
})
}
return ''
}
}