gpt4 book ai didi

ios - 有没有一种有效的方法来改变 NativeScript 中的侧边抽屉图标颜色? (特别是 iOS)

转载 作者:行者123 更新时间:2023-11-28 23:21:10 25 4
gpt4 key购买 nike

我试图在 ActionBar 中应用样式,更改其背景和颜色。这就是 NativeScript 文档所说的它应该做的......但实际上当我尝试向这个图标添加样式时它没有得到我的颜色。

此外,如果我向 ActionBar 添加标题,它会继承我的样式并使用我选择的颜色呈现。

但这并没有发生在行动项目上!

这是我的文件

<template>
<ActionBar>
<NavigationButton ios:visibility="collapsed" icon="res://menu" @tap="onDrawerButtonTap" />
<ActionItem icon="res://menu"
android:visibility="collapsed"
@tap="onDrawerButtonTap"
ios.position="left">
</ActionItem>
<Image class="logo" src="~/images/logo.png"></Image>
</ActionBar>
</template>

<script>
import * as utils from "~/helpers/utils";

export default {
data(){
return {

};
},

methods: {
onDrawerButtonTap() {
utils.showDrawer();
},
}
}
</script>

<style lang="scss" scoped>

@import '../../_app-variables.scss';

ActionBar {
background-color: #c3c3c3;
color: $primary;
}

</style>

有没有一种有效的方法来改变这个sideDrawer按钮的颜色?

最佳答案

尝试将 ActionBar 上的 iosIconRenderingMode 设置为 alwaysTemplate,这应该会将图标颜色变为 CSS 中指定的颜色。

<ActionBar iosIconRenderingMode="alwaysTemplate">

关于ios - 有没有一种有效的方法来改变 NativeScript 中的侧边抽屉图标颜色? (特别是 iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59639069/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com