Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce39a38

Browse files
committed
Test case for thenativescript-vue#272 issue
1 parent79059bf commitce39a38

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

‎samples/app/272.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
constVue=require('./nativescript-vue')
2+
3+
Vue.config.debug=true
4+
Vue.config.silent=false
5+
6+
classUser{
7+
constructor(name){
8+
this.name=name.toUpperCase()
9+
}
10+
}
11+
12+
newVue({
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:[newUser('John'),newUser('Paul')]
35+
}
36+
},
37+
methods:{
38+
onTap({ object}){
39+
console.log(`Tapped on${object.text}`)
40+
}
41+
}
42+
}).$start()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp