|
|
@@ -8,7 +8,7 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
|
|
|
enableColumnHide: false,
|
|
|
border: 1,
|
|
|
margin: '0 0 10 0', // formpanel的fieldDefaults未生效
|
|
|
- height: 245,
|
|
|
+ minHeight: 245,
|
|
|
columnWidth : 1.0,
|
|
|
|
|
|
requires: [
|
|
|
@@ -67,6 +67,15 @@ Ext.define('saas.view.core.form.field.DetailGridField', {
|
|
|
emptyText: '<div style="width: 100%; text-align: center; cursor: pointer; color: green;" class="fa fa-plus" title="新增行" onclick="addRows(\'' + me.id + '\')"></div>',
|
|
|
},
|
|
|
listeners: {
|
|
|
+ boxready: function(g) {
|
|
|
+ var f = g.ownerCt,
|
|
|
+ c = f.detailCount || 1,
|
|
|
+ fb = f.getBox(),
|
|
|
+ fh = fb.height,
|
|
|
+ h = (fh * 0.5) / c;
|
|
|
+
|
|
|
+ g.setHeight(h);
|
|
|
+ },
|
|
|
edit: function() {
|
|
|
this.fireEvent('validChange');
|
|
|
},
|