首页 > 解决方案 > 如何设置 RowEditing 插件的样式

问题描述

激活行编辑插件时,填充比平时大:

在此处输入图像描述

知道什么会影响布局或如何修复它吗?

标签: extjs6-classic

解决方案


网格位于表单定义内。它继承了fieldDefaults,所以我不得不将它们移动到字段集定义内并将网格留在它之外:

Ext.define('App.view.Test', {
    extend: 'Ext.form.Panel',
    xtype: 'test-form',

    layout: 'vbox',
    bodyPadding: 20,
    fieldDefaults: { //defined here will affect the roweditor plugin
        labelAlign: 'top',
        margin: 20
    },

   items: [
      { 
        xtype: 'fieldset',
        //fieldDefaults should be moved here and leave the grid untouched
        items: [...]
      },
      {
         xtype: 'grid',
         [...]
      }
});


推荐阅读