File tree 5 files changed +32
-8
lines changed
5 files changed +32
-8
lines changed Original file line number Diff line number Diff line change @@ -7,12 +7,15 @@ import RouterButton from "@/components/RouterButton.vue";
7
7
<template >
8
8
<div class =" flex flex-row gap-x-2 h-full w-full" >
9
9
<div class =" flex flex-col w-36 p-2" >
10
- <RouterButton to-path =" /" name =" Home" />
11
- <RouterButton to-path =" /about" name =" About" />
12
- <RouterButton to-path =" /helloworld" name =" Hello World" />
13
- <RouterButton to-path =" /dynamicattributes" name =" Dynamic Attributes" />
14
- <RouterButton to-path =" /styling" name =" Styling" />
15
- <RouterButton to-path =" /nestedcomponents" name =" Nested Component" />
10
+ <div class =" flex flex-col" >
11
+ <h2 >Introduction</h2 >
12
+ <RouterButton to-path =" /helloworld" name =" Hello World" />
13
+ <RouterButton to-path =" /dynamicattributes" name =" Dynamic Attributes" />
14
+ <RouterButton to-path =" /styling" name =" Styling" />
15
+ <RouterButton to-path =" /nestedcomponents" name =" Nested Component" />
16
+ <RouterButton to-path =" /htmldirective" name =" HTML Directive" />
17
+ </div >
18
+
16
19
</div >
17
20
<div class =" w-full" >
18
21
<RouterView />
Original file line number Diff line number Diff line change @@ -32,11 +32,15 @@ const router = createRouter({
32
32
name : 'styling' ,
33
33
component : ( ) => import ( '../views/styling/StylingView.vue' )
34
34
} ,
35
-
36
35
{
37
36
path : '/nestedcomponents' ,
38
37
name : 'nestedcomponents' ,
39
38
component : ( ) => import ( '../views/NestedComponents/NestedComponentsView.vue' )
39
+ } ,
40
+ {
41
+ path : '/htmldirective' ,
42
+ name : 'htmldirective' ,
43
+ component : ( ) => import ( '../views/htmldirective/HtmlDirectiveView.vue' )
40
44
}
41
45
]
42
46
} )
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ export const AppVue = `
5
5
</template>
6
6
7
7
<script setup>
8
- import { ref } from 'vue';
9
8
import NestedComponent from './NestedComponent.vue'
10
9
</script>
11
10
Original file line number Diff line number Diff line change
1
+ <script setup>
2
+ import ReplWrapper from " @/components/ReplWrapper.vue" ;
3
+ import {AppVue } from " @/views/htmldirective/default.js" ;
4
+ </script >
5
+
6
+ <template >
7
+ <ReplWrapper :code-string =" AppVue" />
8
+ </template >
Original file line number Diff line number Diff line change
1
+ export const AppVue = `
2
+ <!-- Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to XSS attacks. Only use v-html on trusted content and never on user-provided content. -->
3
+ <script setup>
4
+ const htmlString = \`hello <b>world</b>\`;
5
+ </script>
6
+
7
+ <template>
8
+ <p v-html="htmlString"></p>
9
+ </template>
10
+ ` . trimStart ( )
You can’t perform that action at this time.
0 commit comments