Newer
Older
<DefElement v-for="(element, index) in article.etymology" :key="index" :body='element' v-if="element.content" />
<ol>
<Definition v-for="(definition, index) in article.definitions" :key="index" :body='definition' />
</ol>
import Definition from './Definition.vue'
article_id: Number
},
data: function(){
return {
article: {lemmas: []}
};
},
mounted: function(){
var self = this;
axios.get('https://search-ordbok-prototype-6qpfmm6fz5jvy5ba3e6blryeqe.eu-west-1.es.amazonaws.com/ordbok/_doc/' + self.article_id)
.then(response => self.article = response.data._source)
},
computed: {
article_header: function() {
var lemmas = []
this.article.lemmas.forEach(
function(item, index){
lemmas.push(item.word);
}
)
return lemmas.join(', ')
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
//color: #42b983;
}
ol > li {
padding-bottom: 2em;
}
ul {
padding-top: 8px;
}
ul li {
list-style:none;
}
li ul .definition ul {
padding-left: 0px;
}
ul li.definition {
list-style: disc;