feat: code style

pull/5/MERGE
xingyu 2023-04-25 10:45:41 +08:00
parent 16b23681a7
commit 73c496946f
1 changed files with 3 additions and 18 deletions

View File

@ -12,11 +12,7 @@ export const useRender = {
*/
renderImg: (text) => {
if (text) {
return h(Image, {
src: text,
height: 80,
width: 80
})
return h(Image, { src: text, height: 80, width: 80 })
}
return ''
},
@ -28,14 +24,7 @@ export const useRender = {
*/
renderLink: (url, text?) => {
if (url) {
return h(
Button,
{
type: 'link',
href: text
},
() => text || ''
)
return h(Button, { type: 'link', href: text }, () => text || '')
}
return ''
},
@ -105,11 +94,7 @@ export const useRender = {
*/
renderDict: (text, type, dictType?) => {
if (type) {
return h(DictTag, {
type: type,
value: text,
dictType: dictType || 'number'
})
return h(DictTag, { type: type, value: text, dictType: dictType || 'number' })
}
return ''
},