页面树结构

版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

(本文档仅供参考)

问题描述:

如何隐藏某仪表盘页面工具栏的部分按钮呢?

解决方案:

添加宏:

代码块
languagejs
function main(page: IPage) {
    let toolbar = page.getPageToolbar()//获取仪表盘工具栏接口对象
    toolbar.removeButton(9)//点赞按钮
    toolbar.removeButton(8)//评论按钮
    toolbar.removeButton(7)//分享按钮
    toolbar.removeButton(6)//收藏按钮
    toolbar.removeButton(4)//下载按钮
    toolbar.removeButton(3)//另存
    toolbar.removeButton(2)//重载
    toolbar.removeButton(1)//刷新

}