ui库合并版本完成

This commit is contained in:
aixianling
2022-12-01 09:13:53 +08:00
parent fe3e06e654
commit 02a4b50fc0
39 changed files with 47 additions and 5989 deletions

35
ui/lib/js/moment.js Normal file
View File

@@ -0,0 +1,35 @@
import moment from 'dayjs'
import duration from 'dayjs/plugin/duration'
import updateLocale from 'dayjs/plugin/updateLocale'
import customParseFormat from 'dayjs/plugin/customParseFormat'
import 'dayjs/locale/zh-cn'
moment.locale('zh-cn')
moment.extend(updateLocale)
moment.extend(customParseFormat)
moment.extend(duration)
moment.updateLocale('zh-cn', {
weekdays: "星期日|星期一|星期二|星期三|星期四|星期五|星期六".split("|"),
meridiem(hour) {
let word = ""
if (hour < 6) {
word = "凌晨"
} else if (hour < 9) {
word = "早上"
} else if (hour < 12) {
word = "上午"
} else if (hour < 14) {
word = "中午"
} else if (hour < 17) {
word = "下午"
} else if (hour < 19) {
word = "傍晚"
} else if (hour < 22) {
word = "晚上"
} else {
word = "夜里"
}
return word;
}
})
export default moment