nui-app頭部自定義導航欄

<template>

    <!--頭部 star-->
        <view class="header">
            <view class="tit">天檢無抗生態平臺</view>
            <view>Natural Farm care Solution</view>
        </view>
        <!--頭部 end-->

</template>

<css>

/*導航欄*/
.header {
    margin: 30upx 0;
}

.tit {
    font-size: 34upx;
    font-weight: bold;
}

.index {
    flex: 1;
    flex-direction: column;
    background-image: linear-gradient(200deg, #3d6d98 0%, #68ad96 100%);
    color: #fff;
    text-align: center;
    padding: 30upx 0;
    position: relative;
}

.status_bar {
    height: var(--status-bar-height);
    width: 100%;
}

.top_view {
    height: var(--status-bar-height);
    width: 100%;
    position: fixed;
    top: 0;
}

.content {
    justify-content: center;
    align-items: center;
}

.index_box {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/*導航欄*/

</css>

 

pages.json裏面的寫法:

{
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "平臺",
                "navigationStyle": "custom",
                "app-plus": {
                    "titleNView": false
                }
            }
        },

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章