@@ -85,40 +85,50 @@ new Vue({
85
85
} ) . $start ( )
86
86
87
87
// Working code. Please comment the previous Vue instance and
88
- // uncomment the next one in order to workaround the issue
89
- // The workaround is not using a new Vue component as the
90
- // Tab content, so the wizard is opened using the root component
88
+ // uncomment the following commented code in order to workaround the issue
89
+ // The workaround is opening the modal in the root component
91
90
/*
91
+ const TabContentWorking = {
92
+ template: `
93
+ <GridLayout rows="auto, auto">
94
+ <Label text="This is the home page." row="0" />
95
+ <Button text="Open Wizard" row="1" @tap ="emitOpenEvent" />
96
+ </GridLayout>
97
+ `,
98
+ methods: {
99
+ emitOpenEvent() {
100
+ this.$emit('show')
101
+ }
102
+ }
103
+ }
104
+
92
105
new Vue({
93
106
components: {
94
- TabContent,
107
+ TabContentWorking
95
108
},
96
109
template: `
97
110
<GridLayout rows="*">
98
111
<TabView androidTabsPosition="bottom" iosIconRenderingMode="alwaysOriginal">
99
112
<TabViewItem title="Tab1" textTransform="capitalize">
100
113
<Frame id="main-frame">
101
114
<Page class="page">
102
- <ActionBar title="#536 - workaround" />
103
- <GridLayout rows="auto, auto">
104
- <Label text="This is the home page." row="0" />
105
- <Button text="Open Wizard" row="1" @tap="openWizard" />
106
- </GridLayout>
115
+ <ActionBar title="#536" />
116
+ <TabContentWorking @show="openModal" />
107
117
</Page>
108
118
</Frame>
109
119
</TabViewItem>
110
120
</TabView>
111
121
</GridLayout>
112
122
`,
113
123
methods: {
114
- openWizard () {
124
+ openModal () {
115
125
// show the wizard in a modal, and make sure it is fullscreen.
116
126
this.$showModal(WizardModal, {
117
127
fullscreen: true
118
128
}).then(res => {
119
- console.log('wizard completed with res', res);
120
- });
129
+ console.log('wizard completed with res', res)
130
+ })
121
131
}
122
- },
132
+ }
123
133
}).$start()
124
134
*/
0 commit comments