NEZ-2090 fix:设置时间显示格式后,自定义查询出错

This commit is contained in:
zyh
2022-08-03 10:42:45 +08:00
parent 528c681923
commit 558b8679a8
3 changed files with 31 additions and 10 deletions

View File

@@ -63,7 +63,7 @@ export default {
translation (key) {
return i18n.t(key)
},
timeFormatStrToDatePickFormat (str, flag) {
timeFormatStrToDatePickFormat (str = localStorage.getItem('nz-default-dateFormat') ? localStorage.getItem('nz-default-dateFormat') : 'YYYY-MM-DD HH:mm:ss', flag) {
if (flag) {
const reg = /Y/g
str = str.replace(reg, 'y')