fix(drawer-ts-vue): highlight selected item in drawer (#129)
This commit is contained in:
Родитель
ec445e42ad
Коммит
4aace89b4a
|
@ -18,25 +18,25 @@ https://docs.nativescript.org/ui/professional-ui-components/SideDrawer/getting-s
|
|||
|
||||
<ScrollView row="1" class="nt-drawer__body">
|
||||
<StackLayout>
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Home' ? ' selected': '') }}"
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Home' ? ' -selected': '') }}"
|
||||
route="home/home-page" title="Home" tap="onNavigationItemTap">
|
||||
<Label row="0" col="0" text="" class="nt-icon fas" />
|
||||
<Label row="0" col="1" text="Home" class="p-r-10" />
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Browse' ? ' selected': '') }}"
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Browse' ? ' -selected': '') }}"
|
||||
route="browse/browse-page" title="Browse" tap="onNavigationItemTap">
|
||||
<Label row="0" col="0" text="" class="nt-icon far" />
|
||||
<Label row="0" col="1" text="Browse" class="p-r-10" />
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Search' ? ' selected': '') }}"
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Search' ? ' -selected': '') }}"
|
||||
route="search/search-page" title="Search" tap="onNavigationItemTap">
|
||||
<Label row="0" col="0" text="" class="nt-icon fas" />
|
||||
<Label row="0" col="1" text="Search" class="p-r-10" />
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Featured' ? ' selected': '') }}"
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Featured' ? ' -selected': '') }}"
|
||||
route="featured/featured-page" title="Featured" tap="onNavigationItemTap">
|
||||
<Label row="0" col="0" text="" class="nt-icon fas" />
|
||||
<Label row="0" col="1" text="Featured" class="p-r-10" />
|
||||
|
@ -44,7 +44,7 @@ https://docs.nativescript.org/ui/professional-ui-components/SideDrawer/getting-s
|
|||
|
||||
<StackLayout class="hr"></StackLayout>
|
||||
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Settings' ? ' selected': '') }}"
|
||||
<GridLayout columns="auto, *" class="{{ 'nt-drawer__list-item' + (selectedPage === 'Settings' ? ' -selected': '') }}"
|
||||
route="settings/settings-page" title="Settings" tap="onNavigationItemTap">
|
||||
<Label row="0" col="0" text="" class="nt-icon fas" />
|
||||
<Label row="0" col="1" text="Settings" class="p-r-10" />
|
||||
|
|
|
@ -8,29 +8,29 @@
|
|||
|
||||
<ScrollView row="1" class="nt-drawer__body">
|
||||
<StackLayout>
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Home' ? ' selected': '')" @tap="onNavigationItemTap(Home)">
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Home' ? ' -selected': '')" @tap="onNavigationItemTap(Home)">
|
||||
<Label col="0" text.decode="" class="nt-icon fas"></Label>
|
||||
<Label col="1" text="Home" class="p-r-10"></Label>
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Browse' ? ' selected': '')" @tap="onNavigationItemTap(Browse)">
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Browse' ? ' -selected': '')" @tap="onNavigationItemTap(Browse)">
|
||||
<Label col="0" text.decode="" class="nt-icon far"></Label>
|
||||
<Label col="1" text="Browse" class="p-r-10"></Label>
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Search' ? ' selected': '')" @tap="onNavigationItemTap(Search)">
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Search' ? ' -selected': '')" @tap="onNavigationItemTap(Search)">
|
||||
<Label col="0" text.decode="" class="nt-icon fas"></Label>
|
||||
<Label col="1" text="Search" class="p-r-10"></Label>
|
||||
</GridLayout>
|
||||
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Featured' ? ' selected': '')" @tap="onNavigationItemTap(Featured)">
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Featured' ? ' -selected': '')" @tap="onNavigationItemTap(Featured)">
|
||||
<Label col="0" text.decode="" class="nt-icon fas"></Label>
|
||||
<Label col="1" text="Featured" class="p-r-10"></Label>
|
||||
</GridLayout>
|
||||
|
||||
<StackLayout class="hr"></StackLayout>
|
||||
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Settings' ? ' selected': '')" @tap="onNavigationItemTap(Settings)">
|
||||
<GridLayout columns="auto, *" :class="'nt-drawer__list-item' + (selectedPage === 'Settings' ? ' -selected': '')" @tap="onNavigationItemTap(Settings)">
|
||||
<Label col="0" text.decode="" class="nt-icon fas"></Label>
|
||||
<Label col="1" text="Settings" class="p-r-10"></Label>
|
||||
</GridLayout>
|
||||
|
|
Загрузка…
Ссылка в новой задаче