Renamed Vue Files
This commit is contained in:
44
erpnext/public/js/education/lms/components/Article.vue
Normal file
44
erpnext/public/js/education/lms/components/Article.vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div>
|
||||
<Title :title="contentData.title" :author="contentData.author" :publishDate="contentData.publish_date">
|
||||
<slot></slot>
|
||||
</Title>
|
||||
<section class="article-content-section">
|
||||
<div class='container'>
|
||||
<div class="content" v-html="contentData.content"></div>
|
||||
<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 Title from './Title.vue'
|
||||
export default {
|
||||
props: ['content', 'type'],
|
||||
name: 'Article',
|
||||
data() {
|
||||
return {
|
||||
contentData: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
frappe.call({
|
||||
method: "erpnext.www.lms.get_content",
|
||||
args: {
|
||||
content_name: this.content,
|
||||
content_type: this.type
|
||||
}
|
||||
}).then(r => {
|
||||
this.contentData = r.message
|
||||
});
|
||||
},
|
||||
components: {
|
||||
Title
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user