【问题标题】:Is there any way to remove the Search Box from the SharePoint Online team site?有没有办法从 SharePoint Online 团队网站中删除搜索框?
【发布时间】:2020-09-01 17:20:07
【问题描述】:

我需要从我的 SharePoint 团队网站中删除 搜索网站页面 部分。
这样做的主要目的是:当我在手机上打开网站时,因为有了这个搜索框,页面一启动,键盘就会自动打开。浏览页面变得非常麻烦且不友好。所以我需要完全删除那个搜索框面板。
有什么办法吗???

【问题讨论】:

    标签: sharepoint sharepoint-online sharepoint-designer


    【解决方案1】:

    没有OOB设置,你需要开发SPFx应用定制器来做。

    https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/build-a-hello-world-extension

    const css: string = 'div.od-Search{display:none !important}';
          if (css) {
              // inject the style sheet
              const head: any = document.getElementsByTagName("head")[0] || document.documentElement;
              let customStyle: HTMLStyleElement = document.createElement("style");
              head.appendChild(customStyle);
              customStyle.title = "MSCustom";
              customStyle.type = "text/css";
              customStyle.appendChild(document.createTextNode(css))
          }
          return Promise.resolve<void>();
    

    【讨论】:

      猜你喜欢
      • 2018-10-16
      • 2018-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多