We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In sample samples/app/app-with-tab-view.js
samples/app/app-with-tab-view.js
<tab-view :selectedIndex="selectedTab">
But in file platform/nativescript/runtime/components/tab-view.js has prop selectedTab
platform/nativescript/runtime/components/tab-view.js
selectedTab
export default { name: 'tab-view', props: ['selectedTab'],
I try to change two-way binding but it's not work
export default { name: 'tab-view', model: { prop: 'selectedTab', event: 'selectedTabChanged', }, props: ['selectedTab'], template: `<native-tab-view ref="tabView" v-model="selectedIndex"><slot></slot></native-tab-view>`, data() { return { selectedIndex: 0 } }, watch: { selectedTab(index) { this.selectedIndex = index }, selectedIndex(index) { this.$emit('selectedTabChanged', index) }, }, methods: { registerTab(tabView) { let items = this.$refs.tabView.nativeView.items || [] this.$refs.tabView.setAttribute('items', items.concat([tabView])) } } }
<tab-view v-model="curTabIndex"></tab-view>
<tab-view :selectedTab="curTabIndex" @selectedTabChanged="idx => curTabIndex = idx"></tab-view>
The text was updated successfully, but these errors were encountered:
ef26448
No branches or pull requests
In sample
samples/app/app-with-tab-view.js
But in file
platform/nativescript/runtime/components/tab-view.js
has propselectedTab
I try to change two-way binding but it's not work
NOT WORK
<tab-view v-model="curTabIndex"></tab-view>
WORK
<tab-view :selectedTab="curTabIndex" @selectedTabChanged="idx => curTabIndex = idx"></tab-view>
The text was updated successfully, but these errors were encountered: