@@ -4,32 +4,41 @@ Vue.config.debug = true
4
4
Vue . config . silent = false
5
5
6
6
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')"/>`
12
10
}
13
11
14
- new Vue ( {
12
+ const PageContent = {
15
13
data ( ) {
16
14
return {
17
15
normal :false ,
18
16
custom :false
19
17
}
20
18
} ,
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
+ } ,
21
36
template :`
22
37
<Frame>
23
38
<Page>
24
39
<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" />
29
41
</Page>
30
42
</Frame>
31
- ` ,
32
- components :{
33
- CustomComponent
34
- }
43
+ `
35
44
} ) . $start ( )