This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-02-03 cmp-communicatio.../src/components/KnowledgeElement.vue

16 lines
291 B
Vue
Raw Normal View History

2021-02-03 21:41:50 +01:00
<template>
<li>
<h3>{{ topicName }}</h3>
<p>{{ description }}</p>
<button @click="selectTopic(id)">Learn More</button>
2021-02-03 21:41:50 +01:00
</li>
</template>
<script>
export default {
inject: ['selectTopic'],
2021-02-03 21:41:50 +01:00
props: ['id', 'topicName', 'description'],
emits: ['select-topic']
2021-02-03 21:41:50 +01:00
};
</script>