Explorar el Código

跳转days插件转译

Lijy hace 2 años
padre
commit
4e7dc92f5f
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. 6 1
      fhKeeper/formulahousekeeper/timesheet/src/day.js

+ 6 - 1
fhKeeper/formulahousekeeper/timesheet/src/day.js

@@ -9,7 +9,12 @@ import relativeTime from 'dayjs/plugin/relativeTime'
 dayjs.extend(relativeTime)
 
 // 配置使用中文语言包
-dayjs.locale('zh-cn')
+if(localStorage.getItem('lang') == 'zh') {
+  dayjs.locale('zh-cn')
+} else {
+  dayjs.locale('en')
+}
+
 
 console.log(dayjs().format('YYYY-MM-DD'));