From 6ca18f4f8da55eb8b6de78ca9e0ce384f4940e58 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Feb 2021 16:23:14 +0100 Subject: [PATCH] inject the function to activate a topic --- .../src/App.vue | 5 +++-- .../src/components/KnowledgeBase.vue | 4 +--- .../src/components/KnowledgeElement.vue | 7 ++++--- .../src/components/KnowledgeGrid.vue | 4 +--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/App.vue b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/App.vue index 1db247a..f692f72 100644 --- a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/App.vue +++ b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/App.vue @@ -4,7 +4,7 @@ :topic-title="activeTopic && activeTopic.title" :text="activeTopic && activeTopic.fullText" > - + @@ -34,7 +34,8 @@ export default { }, provide() { return { - topics: this.topics + topics: this.topics, + selectTopic: this.activateTopic }; }, methods: { diff --git a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeBase.vue b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeBase.vue index a87de5b..23191bc 100644 --- a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeBase.vue +++ b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeBase.vue @@ -1,9 +1,7 @@ diff --git a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue index 143b1b0..f665f26 100644 --- a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue +++ b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeElement.vue @@ -2,13 +2,14 @@
  • {{ topicName }}

    {{ description }}

    - +
  • \ No newline at end of file + diff --git a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeGrid.vue b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeGrid.vue index c039657..36b790a 100644 --- a/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeGrid.vue +++ b/2021-02-03 cmp-communication-08-a-potential-problem-starting-setup/src/components/KnowledgeGrid.vue @@ -6,14 +6,12 @@ :id="topic.id" :topic-name="topic.title" :description="topic.description" - @select-topic="$emit('select-topic', $event)" >