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