45 lines
1.1 KiB
Vue
Raw Normal View History

2018-11-01 17:20:04 +05:30
<template>
<div>
<ContentTitle :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
2018-11-02 11:29:02 +05:30
<slot></slot>
</ContentTitle>
2018-11-01 17:20:04 +05:30
<section class="article-content-section">
2019-02-19 17:01:31 +05:30
<div>
2018-11-01 19:51:33 +05:30
<div class="content" v-html="contentData.content"></div>
2018-11-01 17:20:04 +05:30
<div class="text-right">
</div>
<div class="mt-3 text-right">
<a class="text-muted" href="/report"><i class="octicon octicon-issue-opened" title="Report"></i> Report a
Mistake</a>
</div>
</div>
</section>
</div>
</template>
<script>
import ContentTitle from './ContentTitle.vue'
2018-11-01 17:20:04 +05:30
export default {
props: ['content', 'type'],
2018-11-13 17:24:07 +05:30
name: 'Article',
2018-11-01 17:20:04 +05:30
data() {
return {
2018-11-01 19:51:33 +05:30
contentData: ''
2018-11-01 17:20:04 +05:30
}
},
mounted() {
this.getContent().then(data => this.contentData = data);
},
methods: {
getContent() {
return lms.call('get_content', {
content_type: this.type,
content: this.content
})
}
2018-11-02 11:29:02 +05:30
},
components: {
ContentTitle
2018-11-01 17:20:04 +05:30
}
};
</script>