2017-06-22 126 views
1

我想创建工具型像最大化或最小化:如何为面板标题创建自定义工具类型?

{ 
     type: 'my-type-name', 
     tooltip: 'Make Toolbar Float', 
     listeners: { 
      click: function(panel , e , owner , eOpts){} 
} 

为了更好地实现,我已经创建的类中Tool.scss为主题的基础

.#{$prefix}tool-tool-type-my-type-name{ 
    @include icon($tool-my-type-name-icon); 
} 

但是图标是私有的混入和Tool.scss不可见。 之后,我创建了该类的自己的声明:

.#{$prefix}tool-tool-type-my-type-name{ 
    content: $fa-var-external-link; 
    font-family: $font-icon-font-family; 
    font-size: $tool-glyph-font-size; 
    color: red; 
    width:$tool-glyph-font-size; 
    height:$tool-glyph-font-size; 
} 

这没有帮助。

回答

1

在VAR/... Tool.scss

// custom icons: 
$tool-my-type-name-glyph: dynamic($fa-var-external-link $tool-glyph-font-size $font-icon-font-family); 

在SRC .../Tools.scss

.#{$prefix}tool-my-type-name { 
     @if $enable-font-icons and $tool-my-type-name-glyph != null) { 
      @include font-icon($tool-my-type-name-glyph); 
      background: none; 
     } @else { 
      background-position: 0 ($tool-size * -2); 
     } 
    } 
相关问题