Skip to content

Commit 7bf8b10

Browse files
committed
feat: allow multiple nodes in <ios> and <android> tags
1 parent d0b6337 commit 7bf8b10

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

platform/nativescript/runtime/components/android.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
functional: true,
66
render(h, { children }) {
77
if (isAndroid) {
8-
return children[0]
8+
return children
99
}
1010
}
1111
}

platform/nativescript/runtime/components/ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
functional: true,
66
render(h, { children }) {
77
if (isIOS) {
8-
return children[0]
8+
return children
99
}
1010
}
1111
}

samples/app/app-with-android-ios.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,19 @@ const Vue = require('./nativescript-vue')
22

33
new Vue({
44
template: `
5-
<Page>
6-
<StackLayout>
7-
<Label android:text="hi android" ios:text="hi ios..." />
8-
9-
<android>
10-
<Label text="hello android" />
11-
</android>
12-
<ios>
13-
<Label text="hello ios" />
14-
</ios>
15-
</StackLayout>
16-
</Page>
5+
<Page>
6+
<StackLayout>
7+
<Label android:text="hi android" ios:text="hi ios..." />
8+
9+
<android>
10+
<Label text="hello android" />
11+
<Label text="hello android 2" />
12+
</android>
13+
<ios>
14+
<Label text="hello ios" />
15+
<Label text="hello ios 2" />
16+
</ios>
17+
</StackLayout>
18+
</Page>
1719
`
1820
}).$start()

0 commit comments

Comments
 (0)