我有这个菜单:
items:[
{
xtype: 'form',
id: 'searchPanel',
title: 'Search',
collapsible: true,
bodyPadding: 10,
height: 210,
buttonAlign: 'left',
defaults: {
width: 400,
labelWidth: 120,
allowBlank: true,
enableKeyEvents: true
},
layout: {
type: 'table',
columns: 2
},
items: [
{
xtype: 'textfield',
name: 'txtFltrSiteName',
fieldLabel: 'Site name or alias',
id: 'txtFltrSiteName'
},
{
xtype: 'textfield',
name: 'txtDiskCost',
fieldLabel: 'Disk cost',
id: 'txtDiskCost',
style: 'margin-left: 100px;'
},
{
xtype: 'textfield',
name: 'txtFltrProjectName',
fieldLabel: 'Project name',
id: 'txtFltrProjectName'
},
// many other fields
并且chackboxes和文本字段具有不同的宽度,因此它看起来很丑陋.
所以问题是:
如何制作空的< td>在这种形式?
例如,我想要6-2项:
----------
| 1 | 1 |
| 2 | 2 |
| 3 | |
| 4 | |
|..etc...|
----------
解决方法:
只需隐藏输入.
像这样:
{
xtype: 'hidden',
name: 'hidden1',
id: 'hidden1'
},
这将使< td>列,但它将是空的因为它将被隐藏输入.
标签:php,forms,extjs
来源: https://codeday.me/bug/20190625/1287141.html