define(function (require) { return function () { var dialog1 = require('/yvanui/example/dialog1.js'); var dialog2 = require('/yvanui/example/dialog2.js')(); //var selectBaseCustomer = require('/widget/selectBaseCustomer')(); var grid = { xtype: 'grid', url: '/mock/wh.json', pagination: false, method: 'get', toolbar: '#tb', border: false, idField: 'whId', columns: [[ { field: 'whId', title: '仓库编号', width: 80 }, { field: 'whCode', title: '仓库编码', width: 80 }, { field: 'whName', title: '仓库名称', width: 80 }, { field: 'logogram', title: '助记码', width: 80 }, { field: 'whAddress', title: '地址', width: 80 } ]] }; var tabs = { xtype: 'tabs', items: [{ title: 'tab1', lazy: true, //惰性渲染(当切换到选项卡时再加载) items: [{ xtype: 'div', items: [[ { name: 'txt11', label: '输入框1.1' }, { name: 'txt12', label: '输入框1.2' } ], [ { name: 'txt21', label: '输入框2.1' }, { name: 'txt22', label: '输入框2.2' }, { name: 'txt31', label: '输入框3.1' }, { name: 'txt32', label: '输入框3.2' } ]] }] }, { title: 'tab2', lazy: true, items: [ { id: '#tb', xtype: 'toolbar', title: '自定义工具条' }, grid ] }, { title: 'tab4', lazy: true, items: [ { xtype: 'toolbar', title: '自定义工具条', items: [ { text: '按钮1', iconCls: 'fa fa-search', onClick: function () { $.yvan.msg('按钮1'); } }, { text: '按钮2', iconCls: 'fa fa-search', onClick: function () { $.yvan.msg('按钮2'); } }, { text: '按钮3', iconCls: 'fa fa-search', onClick: function () { $.yvan.msg('按钮3'); } } ] }, '直接输入html' ] }] }; return { assist: [ dialog1, dialog2, { xtype: 'dialog', dialogId: 'dialog3', width: 600, height: 400, title: '复杂元素', center: { items: [tabs] } } ], center: { border: false, items: [ [ { xtype: 'button', text: '可越位对话框', onClick: function () { $.yvan.showDialog(this, { dialogId: 'dialog1', inline: false, modal: false }); } }, { xtype: 'button', text: '内部带头带尾', onClick: function () { $.yvan.showDialog(this, { dialogId: 'dialog2', modal: false }); } }, { xtype: 'button', text: '复杂元素', onClick: function () { $.yvan.showDialog(this, { dialogId: 'dialog3', modal: false }); } } ], [ { xtype: 'button', text: '按钮1', onClick: function () { $.yvan.showDialog(this, 'selectBaseCustomer'); } } ] ] } }; }; });