mirror of
https://gitcode.com/flipped-aurora/gin-vue-admin.git
synced 2026-05-18 21:27:55 +00:00
超级管理员 setup 改造完成
This commit is contained in:
17
web/src/utils/format.js
Normal file
17
web/src/utils/format.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { formatTimeToStr } from '@/utils/date'
|
||||
|
||||
export const formatBoolean = (bool) => {
|
||||
if (bool !== null) {
|
||||
return bool ? '是' : '否'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
export const formatDate = (time) => {
|
||||
if (time !== null && time !== '') {
|
||||
var date = new Date(time)
|
||||
return formatTimeToStr(date, 'yyyy-MM-dd hh:mm:ss')
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user