export default { title: '{{ pageTitle }}', layout: 'fit', referenceHolder: true, tbar: { xtype: 'toolbar', items: [ { xtype: 'button', text: '刷新', iconCls: 'fa fa-refresh', listeners: { click: 'scope.refresh', }, }, {{#if addButton}} { xtype: 'button', text: '添加', iconCls: 'x-fa fa-plus', listeners: { click: 'scope.add', }, }, {{/if}} {{#if deleteButton}} { xtype: 'button', text: '删除', iconCls: 'x-fa fa-remove', bind: { disabled: '{grid1.selection === null}', }, listeners: { click: 'scope.remove', }, }, {{/if}} {{#if saveButton}} { xtype: 'button', text: '保存', iconCls: 'x-fa fa-save', bind: { disabled: '{!grid1.ischanged}', }, listeners: { click: 'scope.save', }, }, {{/if}} ] }, items: [ { layout: 'border', items: [ { region: 'center', xtype: 'yvgrid', layout: 'fit', reference: 'grid1', pagination: {{ pagination }}, selModel: { selType: 'rowmodel', mode: 'SINGLE', }, dataSource: { method: 'invoke', url: '{{{ invokeUrlPrefix }}}@{{#if pagination }}queryByPage{{else}}query{{/if}}', params: {}, }, listeners: { selectionchange: 'scope.grid1Select', }, columns: [ { xtype: "rownumberer", header: "序号", width: 50, }, {{#each gridColumns}} { dataIndex: "{{ dataIndex }}", header: "{{ header }}", {{#with fix}}{{#if dictName}}fix: ['system.getDict("{{dictName}}")'],{{/if}}{{/with}} {{#with editor}} editor: { {{#if xtype}}xtype: '{{xtype}}',{{/if}} {{#with fix}}{{#if dictName}}fix: ['system.getDict("{{dictName}}")'],{{/if}}{{/with}} }, {{/with}} }, {{/each}} ], }, ], }, ], }