define([ "dojo/_base/declare","dijit/_WidgetBase","dijit/_TemplatedMixin","dijit/_WidgetsInTemplateMixin","dojox/layout/ResizeHandle","dojox/widget/DialogSimple" ],function(declare,_WidgetBase,_TemplatedMixin,_WidgetsInTemplateMixin,ResizeHandle,DialogSimple){ return declare([DialogSimple],{ templateString: '<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title"> <div data-dojo-attach-point="titleBar" class="dijitDialogTitleBar"> <span data-dojo-attach-point="titleNode" class="dijitDialogTitle" id="${id}_title" role="heading" level="1"></span> <span data-dojo-attach-point="closeButtonNode" class="dijitDialogCloseIcon" data-dojo-attach-event="ondijitclick: onCancel" title="${buttonCancel}" role="button" tabindex="-1"> <span data-dojo-attach-point="closeText" class="closeText" title="${buttonCancel}">x</span> </span> </div> <div data-dojo-attach-point="containerNode" class="dijitDialogPaneContent"></div> <span dojoAttachPoint="resizeHandle" class="dojoxFloatingResizeHandle"></span></div>',resizable: false,resizeAxis: "xy",postCreate: function(){ this.inherited(arguments); if(!this.resizable){ this.resizeHandle.style.display = "none"; } },startup: function(){ this.inherited(arguments); if (this.resizable) { this.containerNode.style.overflow = "auto"; this._resizeHandle = new ResizeHandle({ targetId: this.id,resizeAxis: this.resizeAxis },this.resizeHandle); } },hide: function() { this.onHide(); this.inherited(arguments); },onHide: function () { } }); });
<div data-dojo-type="my/ResizableDialog" id="selectDlg" data-dojo-props="title:'选择',resizable:true,href:'mot/selectDlg.html'"></div> <button type="button" data-dojo-type="dijit/form/Button" data-dojo-props="iconClass:'dijitIconSearch'" onclick="dijit.byId('selectDlg').show();">选择</button>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。