You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/200-basic_building_blocks/README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
1
# Basic Building Blocks
2
2
3
-
## Table of contents
4
-
5
-
1. Concept
6
-
1. Apps
7
-
2. Pages
8
-
3. Components
9
-
2. Event System
10
-
3. Core Features
3
+
**Table of contents**
4
+
1.[Concept](#concept)
5
+
1.[Apps](#apps)
6
+
2.[Pages](#pages)
7
+
3.[Components](#components)
8
+
1.[Core Components](#core-components)
9
+
2.[Creating own components](#creating-own-components)
10
+
3.[Creating own vue.js components](#creating-own-vuejs-components)
11
+
2.[Event Hub](#event-hub)
12
+
3.[Core Features](#core-features)
11
13
12
14
## Concept
13
15
@@ -314,7 +316,7 @@ If you call a component and forget a required property matestack will throw a `M
314
316
315
317
Read more about how properties work and how it prevents overwriting other methods at the [component api](/docs/api/000-base/10-component.md#passing-options-to-components).
316
318
317
-
**Creating own vue.js components**
319
+
#### Creating own vue.js components
318
320
319
321
For most cases you will not need to create custom vue.js components, but if you need custom javascript behavior you can implement it by using a custom vue.js component. It only differs slightly from components. They also need to implement a `response` method and use properties to access data but they inherit from `Matestack::Ui::VueJsComponent` and require a javascript file implementing the corresponding frontend component. In order to link these they require you to set a vue.js component name. Let's take a look at an example vue.js component:
320
322
@@ -365,7 +367,7 @@ Implementing the javascript component works as you would normally implement your
365
367
To use this component remember to add it like the product teaser to a registry. Also you need to add the javascript file to webpacker or the asset pipeline. To learn how to do that or if you want to know more about vue.js components take a look at the [vue.js component api](/docs/api/000-base/30-vue_js_component.md).
366
368
367
369
368
-
## Event System
370
+
## Event Hub
369
371
370
372
Matestack uses events as a communication layer to enable features of core vue.js components. It offers an event hub which is accessible to you. Reacting to events in javascript or triggering your own events is therefore possible.
0 commit comments