123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- define(function (require) {
- return function () {
- var $dlg;
- return {
- xtype: 'dialog',
- dialogId: 'dialog2',
- title: '内部带头带尾',
- width: 900,
- height: 400,
- toolbar: [{
- text: '按钮3', iconCls: 'fa fa-times fa-lg', onClick: function () {
- $.yvan.msg('按钮3');
- }
- }, {
- text: '按钮4', iconCls: 'fa fa-times fa-lg', onClick: function () {
- $.yvan.msg('按钮4');
- }
- }, {
- text: '按钮5', iconCls: 'fa fa-times fa-lg', onClick: function () {
- $.yvan.msg('按钮5');
- }
- }],
- onOpen: function () {
- //onOpen 事件,当这个事件发出时,代表窗体的所有DOM结构已经形成,可以开始取想要的成员变量
- console.log('onBeforeClose');
- $dlg = $(this);
- },
- onBeforeClose: function () {
- console.log('onBeforeClose');
- },
- center: {
- items: require('/yvanui/example/group1.js')
- },
- onClose: function () {
- console.log('onClose');
- },
- onResize: function () {
- console.log('onResize');
- },
- onMove: function () {
- console.log('onMove');
- },
- buttons: [{
- text: '保存', iconCls: 'fa fa-save fa-lg', onClick: function () {
- $.yvan.msg('保存');
- }
- }, {
- text: '关闭', iconCls: 'fa fa-times fa-lg', onClick: function () {
- //关闭方法
- $dlg.window('close');
- }
- }]
- };
- };
- });
|