mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-26 10:29:32 +00:00
[Update] 修改时间日期i18n
This commit is contained in:
parent
1dafaf12aa
commit
60f174fe0e
@ -9,18 +9,14 @@ export default {
|
|||||||
extends: BaseFormatter,
|
extends: BaseFormatter,
|
||||||
data() {
|
data() {
|
||||||
const dt = new Date(this.cellValue)
|
const dt = new Date(this.cellValue)
|
||||||
// const year = dt.getFullYear()
|
const value = this.$d(dt, 'medium')
|
||||||
// const month = dt.getMonth() + 1
|
// const locale = this.$i18n.locale
|
||||||
// const date = dt.getDate()
|
// const value = dt.toLocaleString(locale, { hourCycle: 'h23' })
|
||||||
// const hour = dt.getHours()
|
// console.log(this.$i18n.locale)
|
||||||
// const minutes = dt.getMinutes()
|
return { value: value }
|
||||||
// const seconds = dt.getSeconds()
|
|
||||||
// return {
|
// return {
|
||||||
// value: `${year}-${month}-${date} ${hour}:${minutes}:${seconds}`
|
// value: `${year}-${month}-${date} ${hour}:${minutes}:${seconds}`
|
||||||
// }
|
// }
|
||||||
return {
|
|
||||||
value: this.$d(dt, 'long')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,18 +3,28 @@ export default {
|
|||||||
short: {
|
short: {
|
||||||
year: 'numeric', month: 'short', day: 'numeric'
|
year: 'numeric', month: 'short', day: 'numeric'
|
||||||
},
|
},
|
||||||
|
medium: {
|
||||||
|
year: 'numeric', month: '2-digit', day: '2-digit',
|
||||||
|
hour: '2-digit', minute: '2-digit', second: '2-digit',
|
||||||
|
hourCycle: 'h23', hour12: false
|
||||||
|
},
|
||||||
long: {
|
long: {
|
||||||
year: 'numeric', month: 'short', day: 'numeric',
|
year: 'numeric', month: 'short', day: 'numeric',
|
||||||
weekday: 'short', hour: 'numeric', minute: 'numeric'
|
hour: 'numeric', minute: 'numeric'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'cn': {
|
'cn': {
|
||||||
short: {
|
short: {
|
||||||
year: 'numeric', month: 'short', day: 'numeric'
|
year: 'numeric', month: 'short', day: 'numeric'
|
||||||
},
|
},
|
||||||
|
medium: {
|
||||||
|
year: 'numeric', month: '2-digit', day: '2-digit',
|
||||||
|
hour: '2-digit', minute: '2-digit', second: '2-digit',
|
||||||
|
hourCycle: 'h23', hour12: false
|
||||||
|
},
|
||||||
long: {
|
long: {
|
||||||
year: 'numeric', month: 'short', day: 'numeric',
|
year: 'numeric', month: 'short', day: 'numeric',
|
||||||
weekday: 'short', hour: 'numeric', minute: 'numeric', hour12: true
|
hour: 'numeric', minute: 'numeric', hour12: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user