mirror of
https://github.com/sunniejs/vue-h5-template.git
synced 2025-04-05 19:42:08 +08:00
Merge branch 'vue-h5-template' of https://github.com/sunniejs/vue-h5-template into vue-h5-template
This commit is contained in:
commit
2c0c48b787
@ -37,7 +37,7 @@ export function parseTime(time, cFormat) {
|
||||
const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
||||
let value = formatObj[key]
|
||||
// Note: getDay() returns 0 on Sunday
|
||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value ] }
|
||||
if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
||||
if (result.length > 0 && value < 10) {
|
||||
value = '0' + value
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user