angular - 使用 Nativescript 更改颜色和图标菜单
问题描述
我在所有组件中都有这个菜单:
<GridLayout rows="*,60">
<StackLayout row="1" orientation="horizontal" class="foot" backgroundColor="#eae8e8" padding = "10 5 10 5" >
<StackLayout [nsRouterLink]="['/home']" width="25%" textAlignment="center">
<Image src="~/assets/images/home.png" width="20" height="20" stretch="aspectFit"></Image>
<Label text="Home">
</Label>
</StackLayout>
<StackLayout [nsRouterLink]="['/settings']" width="25%" textAlignment="center">
<Image src="~/assets/images/settings.png" width="20" height="20" stretch="aspectFit"></Image>
<Label text="Setting">
</Label>
</StackLayout>
<StackLayout [nsRouterLink]="['/photos']" width="25%" textAlignment="center">
<Image src="~/assets/images/photos.png" width="30" height="20" stretch="aspectFit"></Image>
<Label text="Photos">
</Label>
</StackLayout>
<StackLayout [nsRouterLink]="['/gallery']" width="25%" textAlignment="center">
<Image src="~/assets/images/gallery.png" width="20" height="20" stretch="aspectFit"></Image>
<Label text="Gallery">
</Label>
</StackLayout>
</StackLayout>
</GridLayout>
我想要,当我单击菜单时更改文本中的颜色,像菜单 PlayGround 图像中的颜色图像
解决方案
推荐阅读
- android - FusedLocationProviderClient 与以正确方式实现的 GoogleApiClient 相比是否提供了一些性能优势?
- python - 如何循环通过 Keras 拟合函数?
- nlp - 在整个语料库上训练词向量?
- orbeon - 如何从 Orbeon XForms 操作中调用 JavaScript 代码?
- git - git 创建远程分支而不破坏任何现有分支
- python - 在 raspbian OS 上的 python 3.5.3 上安装 opencv
- excel - 在 Excel 中 - 如何计算多个工作表上的多个下拉项目和数量
- ms-access - 将 MS Access 表中的值分配给变量
- vue.js - 推送路由(从 vueJS 移动到 nuxtJS)
- azure - 只有 RDP 从本地局域网工作到站点 2 站点 IPSEC 的天蓝色