8000 chore: simpler workaround (commented) to fix the #536 issue · designemail/nativescript-vue@e76908c · GitHub
[go: up one dir, main page]

Skip to content

Commit e76908c

Browse files
committed
chore: simpler workaround (commented) to fix the nativescript-vue#536 issue
1 parent f48e80a commit e76908c

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

samples/app/536.js

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,40 +85,50 @@ new Vue({
8585
}).$start()
8686

8787
// 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
9190
/*
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+
92105
new Vue({
93106
components: {
94-
TabContent,
107+
TabContentWorking
95108
},
96109
template: `
97110
<GridLayout rows="*">
98111
<TabView androidTabsPosition="bottom" iosIconRenderingMode="alwaysOriginal">
99112
<TabViewItem title="Tab1" textTransform="capitalize">
100113
<Frame id="main-frame">
101114
<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" />
107117
</Page>
108118
</Frame>
109119
</TabViewItem>
110120
</TabView>
111121
</GridLayout>
112122
`,
113123
methods: {
114-
openWizard() {
124+
openModal () {
115125
// show the wizard in a modal, and make sure it is fullscreen.
116126
this.$showModal(WizardModal, {
117127
fullscreen: true
118128
}).then(res => {
119-
console.log('wizard completed with res', res);
120-
});
129+
console.log('wizard completed with res', res)
130+
})
121131
}
122-
},
132+
}
123133
}).$start()
124134
*/

0 commit comments

Comments
 (0)
0