File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ const Vue = require ( './nativescript-vue' )
2
+
3
+ Vue . config . debug = true
4
+ Vue . config . silent = false
5
+
6
+ class User {
7
+ constructor ( name ) {
8
+ this . name = name . toUpperCase ( )
9
+ }
10
+ }
11
+
12
+ new Vue ( {
13
+ template : `
14
+ <Frame>
15
+ <Page class="page">
16
+ <ActionBar title="Issue #272" class="action-bar" />
17
+ <StackLayout>
18
+ <ListView
19
+ for="user in userList">
20
+ <v-template>
21
+ <StackLayout>
22
+ <Label
23
+ :text="user.name"
24
+ @tap="onTap" />
25
+ </StackLayout>
26
+ </v-template>
27
+ </ListView>
28
+ </StackLayout>
29
+ </Page>
30
+ </Frame>
31
+ ` ,
32
+ data ( ) {
33
+ return {
34
+ userList : [ new User ( 'John' ) , new User ( 'Paul' ) ]
35
+ }
36
+ } ,
37
+ methods : {
38
+ onTap ( { object } ) {
39
+ console . log ( `Tapped on ${ object . text } ` )
40
+ }
41
+ }
42
+ } ) . $start ( )
You can’t perform that action at this time.
0 commit comments