在浏览器上执行放大和缩小时工具提示未正确显示

Posted

技术标签:

【中文标题】在浏览器上执行放大和缩小时工具提示未正确显示【英文标题】:Tool Tip is not showing properly when Zoom in & Zoom out on the browser is performed 【发布时间】:2014-01-14 11:04:14 【问题描述】:

我正在使用 EXT JS 3.4。

我的列模型的代码是这样的:- 我的列模型的 Ext.grid.Column 正在像这样从数据库中配置。

Ext.QuickTips.init();
cm = new Ext.grid.ColumnModel( 
            columns : cols // the cols is getting generated from the database
        );

上面代码中提到的cols的json数据生成如下:


  header: "Title Alias",
  type: "STRING",
  dataIndex: "order#title_alias",
  width: 80,
  tooltip: "Title Alias",
  sortable: "true",
  filter: 
    test: "/^0/i"
  

QUERY :工具提示显示为两行。我希望工具提示调整其宽度 根据文本,工具提示文本应仅以单行显示。

BOUNDATION : 不能修改“cols”。

方法:我们可以覆盖或应用某种配置到快速提示。有没有可能。

【问题讨论】:

【参考方案1】:

您应该能够为工具提示设置 css 并定义:

.x-tip .x-tip-body 
    white-space: nowrap;

防止它被包裹。

【讨论】:

以上是关于在浏览器上执行放大和缩小时工具提示未正确显示的主要内容,如果未能解决你的问题,请参考以下文章