页面树结构

版本比较

标识

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

(本文档仅供参考)

...

问题1:

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

解决方案:

添加宏:

代码块
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)//刷新

}


问题1:

V11版本如何统一隐藏某仪表盘的工具栏和组件工具栏呢?

image2023-11-27_17-17-10.pngImage Added

解决方案:

1、不选中仪表盘画布区域组件时,点击组件设置-浏览效果,配置浏览态工具栏隐藏,即可隐藏当前仪表盘的工具栏。

image2023-11-27_17-18-3.pngImage Added

2、若还想再显示某些组件的工具栏,则需选中组件再配置是否隐藏工具栏。

注意单个组件的组件设置优先级,大于全局组件设置优先级。