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

标签 javascript extjs border panel toolbar

我尝试隐藏边界线,但无法成功!这是screenshot上述边界线。

您会注意到,在“导出 Excel”和radiofield 之间出现了一条垂直线。您将在下面找到一些包含这些元素的代码片段。我使用工具栏面板来创建这些项目。因此,为每个类尝试了几种配置,例如 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 的类:

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'
});

关于javascript - 如何禁用Ext JS面板和工具栏的边框线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48638223/

相关文章:

javascript - 如何将点击处理程序应用于模板内的多个元素 -EXTJS

c# - 无边界和可调整大小的表单 (C#)

html - 左侧的两个 css 类边框

Python-PPTX:更改表格样式或向单元格添加边框

JavaScript bool 赋值

javascript - 如何使用JavaScript进行表格中的计算?

javascript - ExtJs 4 ViewPort 与带有边框布局的面板 - 使用哪个以及为什么?

javascript - extjs 4.1 treestore 延迟加载 : The q is, 它有分支吗?

javascript - 缺少 asp :Button if I use Enabled=false 的 OnClientClick(或 HTML 中的 onclick)

javascript - 根据滚动视口(viewport)自动隐藏div