Последняя версия с сервера прошлого разработчика
This commit is contained in:
21
nova/resources/js/components/Detail/MarkdownField.vue
Executable file
21
nova/resources/js/components/Detail/MarkdownField.vue
Executable file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<panel-item :field="field">
|
||||
<template slot="value">
|
||||
<excerpt :content="excerpt" :should-show="field.shouldShow" />
|
||||
</template>
|
||||
</panel-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const md = require('markdown-it')()
|
||||
|
||||
export default {
|
||||
props: ['resource', 'resourceName', 'resourceId', 'field'],
|
||||
|
||||
computed: {
|
||||
excerpt() {
|
||||
return md.render(this.field.value || '')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user