File tree 5 files changed +58
-52
lines changed
5 files changed +58
-52
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div >
3
- <div class =" main" >
4
- <img src =" ./assets/logo.png" >
5
- <h1 >{{ title }}!</h1 >
6
- <router-link
7
- tag =" button"
8
- :to =" { 'name': 'essential' }"
9
- >
10
- Essential
11
- </router-link >
12
- <router-link
13
- tag =" button"
14
- :to =" { 'name': 'ecosystem' }"
15
- >
16
- Ecosystem
17
- </router-link >
2
+ <div >
3
+ <div class =" main" >
4
+ <img src =" ./assets/logo.png" >
5
+ <h1 >{{ title }}!</h1 >
6
+ <router-link
7
+ tag =" button"
8
+ :to =" { 'name': 'essential' }"
9
+ >
10
+ Essential
11
+ </router-link >
12
+ <router-link
13
+ tag =" button"
14
+ :to =" { 'name': 'ecosystem' }"
15
+ >
16
+ Ecosystem
17
+ </router-link >
18
18
19
- <Dialog
20
- v-model:visible =" display"
21
- header =" Header"
22
- >
23
- Content
24
- </Dialog >
25
- <router-view />
26
- <div >© ; {{ new Date().getFullYear() }}</div >
27
- </div >
28
- </div >
19
+ <Dialog
20
+ v-model:visible =" display"
21
+ header =" Header"
22
+ >
23
+ Content
24
+ </Dialog >
25
+ <router-view />
26
+ <div >© ; {{ new Date().getFullYear() }}</div >
27
+ </div >
28
+ </div >
29
29
</template >
30
30
31
31
<script lang="ts">
32
- import { Component , Vue } from ' vue-facing-decorator' ;
33
-
34
-
32
+ import { Component , Vue , toNative } from ' vue-facing-decorator' ;
35
33
36
34
@Component
37
- export default class App extends Vue {
38
- title = ' Parcel-Vue-Ts' ;
39
- display = true ;
35
+ class App extends Vue {
36
+ title = ' Parcel-Vue-Ts' ;
37
+ display = true ;
40
38
}
39
+
40
+ // Transform class component to vue native component
41
+ export default toNative (App )
41
42
</script >
42
43
43
44
<style lang="scss">
Original file line number Diff line number Diff line change 9
9
</ head >
10
10
11
11
< body >
12
- < app > </ app >
12
+ < app id =" app " > </ app >
13
13
< script type ="module " src ="./index.ts "> </ script >
14
14
</ body >
15
15
16
- </ html >
16
+ </ html >
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ import { createApp } from 'vue';
4
4
import App from './app.vue' ;
5
5
import router from "./router" ;
6
6
7
- import 'primevue/resources/themes/saga-blue/theme.css' ;
8
- import 'primevue/resources/primevue.min.css' ;
9
7
import 'primeicons/primeicons.css' ;
8
+ import 'primevue/resources/primevue.min.css' ;
9
+ import 'primevue/resources/themes/saga-blue/theme.css' ;
10
10
import store from './store/index' ;
11
11
12
12
const app = createApp ( App ) ;
@@ -15,7 +15,8 @@ app.use(PrimeVue);
15
15
app . use ( router ) ;
16
16
app . use ( store ) ;
17
17
18
+ // eslint-disable-next-line vue/no-reserved-component-names
18
19
app . component ( 'Dialog' , Dialog ) ;
19
20
20
- app . mount ( 'app' )
21
+ app . mount ( '# app' )
21
22
Original file line number Diff line number Diff line change 1
1
<template >
2
- <ul class =" ecosystem" >
3
- <li
4
- v-for =" item in list"
5
- :key =" item.label"
6
- >
7
- <a
8
- :href =" item.link"
9
- target =" _blank"
10
- >{{ item.label }}</a >
11
- </li >
12
- </ul >
2
+ <ul class =" ecosystem" >
3
+ <li
4
+ v-for =" item in list"
5
+ :key =" item.label"
6
+ >
7
+ <a
8
+ :href =" item.link"
9
+ target =" _blank"
10
+ >{{ item.label }}</a >
11
+ </li >
12
+ </ul >
13
13
</template >
14
14
15
15
<script lang="ts">
16
16
import { Link } from ' @/models/link.type' ;
17
- import { Component , Vue } from ' vue-facing-decorator' ;
17
+ import { Component , Vue , toNative } from ' vue-facing-decorator' ;
18
18
import { State } from ' vuex-facing-decorator' ;
19
19
20
20
@Component
21
- export default class Ecosystem extends Vue
21
+ class Ecosystem extends Vue
22
22
{
23
23
@State (' ecosystem' ) public list: Link [] = [];
24
24
}
25
+
26
+ export default toNative (Ecosystem );
25
27
</script >
26
28
27
29
<style lang="scss" scoped>
Original file line number Diff line number Diff line change 16
16
</template >
17
17
<script lang="ts">
18
18
19
- import { Component , Vue } from ' vue-facing-decorator' ;
19
+ import { Component , Vue , toNative } from ' vue-facing-decorator' ;
20
20
import { Link } from ' ../models/link.type' ;
21
21
22
22
@Component
23
- export default class Essential extends Vue
23
+ class Essential extends Vue
24
24
{
25
25
public list: Link [] = [{ label: ' Core Docs' , link: ' https://vuejs.org' },
26
26
{ label: ' Forum' , link: ' https://forum.vuejs.org' },
@@ -31,6 +31,8 @@ export default class Essential extends Vue
31
31
console .log (' Essential created' );
32
32
}
33
33
}
34
+
35
+ export default toNative (Essential );
34
36
</script >
35
37
36
38
<style lang="scss" scoped>
You can’t perform that action at this time.
0 commit comments