Skip to content

Commit 33b82b6

Browse files
committed
1 parent 49d8373 commit 33b82b6

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

samples/app/217.js

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,41 @@ Vue.config.debug = true
44
Vue.config.silent = false
55

66
const CustomComponent = {
7-
template: `
8-
<Button :text="text" @tap="$emit('tap')"/>
9-
`,
10-
name: 'CustomComponent',
11-
props: ['text']
7+
// defining props breaks this on iOS
8+
// props: ['text'],
9+
template: `<Button @tap="$emit('tap')"/>`
1210
}
1311

14-
new Vue({
12+
const PageContent = {
1513
data() {
1614
return {
1715
normal: false,
1816
custom: false
1917
}
2018
},
19+
template: `
20+
<StackLayout>
21+
<Label :text="normal" textWrap="true" />
22+
<Label :text="custom" textWrap="true" />
23+
<Button :text="'Normal Button: ' + normal " @tap="normal = !normal"/>
24+
<CustomComponent :text="'Custom Button: ' + custom" @tap="custom = !custom"/>
25+
</StackLayout>
26+
`,
27+
components: {
28+
CustomComponent
29+
}
30+
}
31+
32+
new Vue({
33+
data: {
34+
content: PageContent
35+
},
2136
template: `
2237
<Frame>
2338
<Page>
2439
<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>
40+
<component :is="content" />
2941
</Page>
3042
</Frame>
31-
`,
32-
components: {
33-
CustomComponent
34-
}
43+
`
3544
}).$start()

0 commit comments

Comments
 (0)