mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-17 07:42:41 +00:00
Merge pull request #4251 from jumpserver/pr@v3@fix_data_refresh
fixed: Fixed an issue where the validation date does not refresh
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>{{ value }}</span>
|
<span class="date">{{ dateValue }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -10,24 +10,31 @@ export default {
|
|||||||
name: 'DateFormatter',
|
name: 'DateFormatter',
|
||||||
extends: BaseFormatter,
|
extends: BaseFormatter,
|
||||||
data() {
|
data() {
|
||||||
let value
|
// let value
|
||||||
if (this.cellValue) {
|
// if (this.cellValue) {
|
||||||
value = toSafeLocalDateStr(this.cellValue)
|
// value = toSafeLocalDateStr(this.cellValue)
|
||||||
} else {
|
// } else {
|
||||||
value = '-'
|
// value = '-'
|
||||||
}
|
// }
|
||||||
// const locale = this.$i18n.locale
|
// const locale = this.$i18n.locale
|
||||||
// const value = dt.toLocaleString(locale, { hourCycle: 'h23' })
|
// const value = dt.toLocaleString(locale, { hourCycle: 'h23' })
|
||||||
// debug(this.$i18n.locale)
|
// debug(this.$i18n.locale)
|
||||||
return {
|
// return {
|
||||||
value: value
|
// value: value
|
||||||
}
|
// }
|
||||||
// return {
|
// return {
|
||||||
// value: `${year}-${month}-${date} ${hour}:${minutes}:${seconds}`
|
// value: `${year}-${month}-${date} ${hour}:${minutes}:${seconds}`
|
||||||
// }
|
// }
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
dateValue() {
|
||||||
|
if (this.cellValue) {
|
||||||
|
return toSafeLocalDateStr(this.cellValue)
|
||||||
|
} else {
|
||||||
|
return '-'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
Reference in New Issue
Block a user