Последняя версия с сервера прошлого разработчика
This commit is contained in:
27
nova/resources/js/components/Detail/DateTimeField.vue
Executable file
27
nova/resources/js/components/Detail/DateTimeField.vue
Executable file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<panel-item :field="field">
|
||||
<template slot="value">
|
||||
<p v-if="field.value" class="text-90">{{ localizedDateTime }}</p>
|
||||
<p v-else>—</p>
|
||||
</template>
|
||||
</panel-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { InteractsWithDates } from 'laravel-nova'
|
||||
|
||||
export default {
|
||||
mixins: [InteractsWithDates],
|
||||
|
||||
props: ['resource', 'resourceName', 'resourceId', 'field'],
|
||||
|
||||
computed: {
|
||||
/**
|
||||
* Get the localized date time.
|
||||
*/
|
||||
localizedDateTime() {
|
||||
return this.localizeDateTimeField(this.field)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user