File tree Expand file tree Collapse file tree 1 file changed +39
-4
lines changed Expand file tree Collapse file tree 1 file changed +39
-4
lines changed Original file line number Diff line number Diff line change 1
- ---
2
- title : Example of how to use in a Vuepress application
1
+ # Vuepress
2
+
3
+ Add the vue-announcer to your ` enhanceApp.js `
4
+
5
+ ``` javascript
6
+ import VueAnnouncer from " @vue-a11y/announcer" ;
7
+
8
+ export default ({ Vue, router, isServer }) => {
9
+ if (! isServer) {
10
+ Vue .use (VueAnnouncer, {}, router);
11
+ }
12
+ };
13
+ ```
14
+
15
+ Ok, now just insert the component ` <VueAnnouncer /> ` in your main layout.
16
+
17
+ ``` vue
18
+ <template>
19
+ <div>
20
+ <VueAnnouncer /> <!-- You can place it anywhere in your application -->
21
+ ...
22
+ </div>
23
+ </template>
24
+ ```
25
+
26
+ <br />
27
+
3
28
---
4
29
5
- # Vuepress
30
+ ### Example using theme-default
31
+
32
+ <br />
33
+
34
+ <iframe
35
+ src="https://codesandbox.io/embed/vue-announcer-vuepress-bp60e?fontsize=14&hidenavigation=1&module=%2F.vuepress%2FenhanceApp.js&theme=dark&view=editor"
36
+ style="width:100%; height:500px; border:0; border-radius: 4px; overflow:hidden;"
37
+ title="example vue-announcer to vuepress projects"
38
+ allow="accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr"
39
+ sandbox="allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts"
40
+ > </iframe >
6
41
7
- ### Coming soon
42
+ < a href = " https://codesandbox.io/s/vue-announcer-vuepress-bp60e " target = " _blank " rel = " noopener " >Open sandbox example</ a >
You can’t perform that action at this time.
0 commit comments