mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 07:11:52 +08:00
create datetime mixin
This commit is contained in:
@@ -22,15 +22,11 @@ export default {
|
||||
|
||||
computed: {
|
||||
displayText() {
|
||||
if (this.value !== undefined && this.value !== "") {
|
||||
let format = "YYYY-MM-DD HH:mm:ss";
|
||||
if (this.dateOnly) {
|
||||
format = "YYYY-MM-DD";
|
||||
}
|
||||
return dayjs.utc(this.value).tz(this.$root.timezone).format(format);
|
||||
if (this.dateOnly) {
|
||||
return this.$root.date(this.value);
|
||||
} else {
|
||||
return this.$root.datetime(this.value);
|
||||
}
|
||||
|
||||
return "";
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user