uni.setTitlebar(OBJECT)

动态设置当前页面的标题栏。

OBJECT参数说明

参数 类型 必填 说明
titleText String 标题
titleColor HexColor 标题颜色
backgroundColor HexColor 标题栏背景颜色
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

示例

uni.setTitlebar({
    titleText:'DEMO',
    titleColor: '#ffffff',
    backgroundColor: '#ff0000'
})

results matching ""

    No results matching ""