File tree 5 files changed +42
-2
lines changed
5 files changed +42
-2
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ {{ message }}
4
+ </div >
5
+ </template >
6
+
7
+ <script lang="ts">
8
+ import { Component , Vue } from ' vue-property-decorator'
9
+
10
+ @Component
11
+ export default class PageIndex extends Vue {
12
+ message: string = ' This is a message'
13
+ }
14
+ </script >
Original file line number Diff line number Diff line change 1
1
export default {
2
- modules : [ '@nuxt/typescript-build' ]
2
+ modules : [ '@nuxt/typescript-build' ] ,
3
+ plugins : [ '~/plugins/function-api' ]
3
4
}
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >
3
+ {{ message }}
4
+ </div >
5
+ </template >
6
+
7
+ <script lang="ts">
8
+ import { createComponent , value } from ' vue-function-api'
9
+
10
+ export default createComponent ({
11
+ setup() {
12
+ const message = value (' This is a message' )
13
+
14
+ return {
15
+ message
16
+ }
17
+ }
18
+ })
19
+ </script >
Original file line number Diff line number Diff line change
1
+ import Vue from 'vue'
2
+ import { plugin } from 'vue-function-api'
3
+
4
+ Vue . use ( plugin )
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ import Vue from 'vue'
9
9
10
10
export default Vue .extend ({
11
11
data() {
12
+ const message: string = ' This is a message'
13
+
12
14
return {
13
- message: ' This is a message '
15
+ message
14
16
}
15
17
}
16
18
})
You can’t perform that action at this time.
0 commit comments