Skip to content

Commit 49d8373

Browse files
committed
1 parent 6b5d85d commit 49d8373

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

samples/app/217.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const Vue = require('./nativescript-vue')
2+
3+
Vue.config.debug = true
4+
Vue.config.silent = false
5+
6+
const CustomComponent = {
7+
template: `
8+
<Button :text="text" @tap="$emit('tap')"/>
9+
`,
10+
name: 'CustomComponent',
11+
props: ['text']
12+
}
13+
14+
new Vue({
15+
data() {
16+
return {
17+
normal: false,
18+
custom: false
19+
}
20+
},
21+
template: `
22+
<Frame>
23+
<Page>
24+
<ActionBar title="Issue #217"/>
25+
<StackLayout>
26+
<Button :text="'Normal Button: ' + normal " @tap="normal = !normal"/>
27+
<CustomComponent :text="'Custom Button: ' + custom" @tap="custom = !custom"/>
28+
</StackLayout>
29+
</Page>
30+
</Frame>
31+
`,
32+
components: {
33+
CustomComponent
34+
}
35+
}).$start()

0 commit comments

Comments
 (0)