Explorar o código

防止时间为空出现的异常

RuoYi %!s(int64=5) %!d(string=hai) anos
pai
achega
9067369ce0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ruoyi-ui/src/utils/ruoyi.js

+ 1 - 1
ruoyi-ui/src/utils/ruoyi.js

@@ -7,7 +7,7 @@ const baseURL = process.env.VUE_APP_BASE_API
 
 // 日期格式化
 export function parseTime(time, pattern) {
-	if (arguments.length === 0) {
+	if (arguments.length === 0 || !time) {
 		return null
 	}
 	const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'