如何禁用 Ext JS 面板和工具栏的边框线?

How to disable border line of Ext JS panel and Toolbar?

我试图隐藏边界线,但无法成功!这是提到的边界线screenshot

您会注意到在 'Export Excel'radiofield 之间出现了一条垂直线。您将在下面找到一些包含这些元素的代码片段。我使用 Toolbarpanel 来创建这些项目。所以为每个 class 尝试了几个配置,例如 border: falseframe: falsebodyBorder: false,但没有一个能成功隐藏这一行。

感谢您的建议。

return [
            {
                xtype: 'panel',
                scrollable: true,
                // border: false,
                // bodyBorder: false,
                // frame: false,
                layout: {type: 'hbox', align: 'middle', pack: 'start'},
                items: [
                    {
                        xtype: 'panel',
                        // border: false,
                        // bodyBorder: false,
                        items: me.listToolbar() //This is end of 'toolbar' class.
                    },
                    {
                        xtype: 'panel',
                        items: me.subModuleTb() //'radiofield' starts by here
                    }
                ]
            }
        ];

这里是 ListToolbar class:

Ext.define('MyApp.ListToolbar', {
    extend: 'Ext.toolbar.Toolbar',
    alias: 'widget.listtoolbar',

    requires: [],

    dock: 'top',
    //border: 0, //This is not disappear the line as well
    //cls: 'list-toolbar //Defined 'border' as zero on all.scss for this cls but did not worked as well!
    layout: {
        type: 'table',
        tdAttrs: { style: 'padding: 5px 10px;' }
    },
    defaults: {
        enableToggle: true
    },
    scope:this,
    items: [

您使用的是什么版本?我希望这个边框出现在工具栏中。 您可以在工具栏中使用 "border": 0 属性。或者您可以通过添加 "Cls" 属性 在 CSS 中进行控制。

Ext.create('Ext.toolbar.Toolbar', {
renderTo: document.body,
**border:0,**
width   : 500,
items: [
    {
        // xtype: 'button', // default for Toolbars
        text: 'Button'
    },
    {
        xtype: 'splitbutton',
        text : 'Split Button'
    },
    // begin using the right-justified button container
    '->', // same as { xtype: 'tbfill' }
    {
        xtype    : 'textfield',
        name     : 'field1',
        emptyText: 'enter search term'
    },
    // add a vertical separator bar between toolbar items
    '-', // same as {xtype: 'tbseparator'} to create Ext.toolbar.Separator
    'text 1', // same as {xtype: 'tbtext', text: 'text1'} to create Ext.toolbar.TextItem
    { xtype: 'tbspacer' },// same as ' ' to create Ext.toolbar.Spacer
    'text 2',
    { xtype: 'tbspacer', width: 50 }, // add a 50px space
    'text 3'
});