本文介绍了Dojo TabContainer不是样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,样式元素不会应用于TabContainer。标签标题显示为彼此相邻的纯黑白文字。

For some reason the style elements aren't getting applied to the TabContainer. The tab titles are showing up as plain black-on-white text jammed right next to each other.

      <script src="http://localhost/dojo/1.9.1/dojo/dojo.js" data-dojo-config="async:true,parseOnLoad:true"></script>
      <link href="http://localhost/dojo/1.9.1/dojo/resources/dojo.css" type="text/css" rel="stylesheet" />
      <link href="http://localhost/dojo/1.9.1/dijit/themes/claro/claro.css" type="text/css" rel="stylesheet" />
      <link href="http://localhost/dojo/1.9.1/dojox/grid/enhanced/resources/claro/EnhancedGrid.css" type="text/css" rel="stylesheet" />
    </head>
    <body>
      <div id="mainUIContainer" data-dojo-type="dijit/layout/TabContainer" region='center' style="width: 100%; height: 100%;">
        <div id="numbersGridTab" data-dojo-type="dijit/layout/ContentPane" style="width: 100%; height: 100%;" title="Grid">
          <div id="numbersGridHolder" style="width: 900px; height: 400px;"></div>
        </div>
        <div id="textBlobTab" data-dojo-type="dijit/layout/ContentPane" style="width: 100%; height: 100%;" title="crap">
          lorem ipsum dolor
        </div>
      </div>
      <script>
        require([
          "dijit/layout/ContentPane",
          "dijit/layout/TabContainer",
          "dojo/domReady!"
        ], function(){
           makeGrid();
        });
      </script>


推荐答案

我认为这里的问题是,为了使用现有的dojo主题(例如 claro ),您需要向body标签< body class =claro>

I believe the issue here is that, in order to use an existing dojo theme like claro, you need to add a class to the body tag <body class="claro">

@Andrew:这样做了!确认与Dojo 1.9.2(寒带草原具体:))。

@Andrew: This did the trick!! Confirmed with Dojo 1.9.2 (Tundra to be specific :) ).

这篇关于Dojo TabContainer不是样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 23:39