dialog1.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. define({
  2. xtype: 'dialog',
  3. dialogId: 'dialog1',
  4. title: '可越位对话框',
  5. width: 650,
  6. height: 300,
  7. toolbar: [{
  8. text: '保存', iconCls: 'fa fa-save fa-lg', onClick: function () {
  9. $.yvan.msg('保存');
  10. }
  11. }, {
  12. text: '关闭', iconCls: 'fa fa-times fa-lg', onClick: function () {
  13. $(this).findWindow().window('close');
  14. }
  15. }],
  16. center: {
  17. items: [{
  18. xtype: 'form', items: [
  19. [
  20. { name: 'txt11', label: '输入框1.1' },
  21. { name: 'txt12', label: '输入框1.2' }
  22. ]]
  23. }]
  24. },
  25. onOpen: function () {
  26. console.log('onOpen');
  27. },
  28. onBeforeClose: function () {
  29. console.log('onBeforeClose');
  30. },
  31. onClose: function () {
  32. console.log('onClose');
  33. },
  34. onResize: function () {
  35. console.log('onResize');
  36. },
  37. onMove: function () {
  38. console.log('onMove');
  39. },
  40. buttons: [{
  41. text: '按钮3', iconCls: 'fa fa-times fa-lg', onClick: function () {
  42. $.yvan.msg('按钮3');
  43. }
  44. }, {
  45. text: '按钮4', iconCls: 'fa fa-times fa-lg', onClick: function () {
  46. $.yvan.msg('按钮4');
  47. }
  48. }, {
  49. text: '按钮5', iconCls: 'fa fa-times fa-lg', onClick: function () {
  50. $.yvan.msg('按钮5');
  51. }
  52. }]
  53. });