- 注册时间
- 2017-8-4
- 最后登录
- 2024-9-13
- 阅读权限
- 10
- 积分
- 353
- 精华
- 0
- 帖子
- 30
 
|
- mini.extend(seesoft.Panel, mini.Panel, {
- uiCls: 'basic-panel',
- initComponents: function () {
- var footer = '<div>'
- + '<a name="ok" class="mini-button mini-button-primary" style="margin-right: 10px;">确定</a>'
- + ' <a name="cancel" class="mini-button">取消</a>'
- + '</div>';
- this.set({
- style: "width: 100%;height:100%",
- borderStyle: "border: 0;",
- showHeader: false,
- showToolbar: false,
- showFooter: true,
- footer: footer
- });
- },
- bindEvents: function () {
- this.okBtn = mini.getbyName('ok', this);
- this.cancelBtn = mini.getbyName('cancel', this);
- var that = this;
- this.okBtn.on('click', function (e) {
- that.fire("okclick");
- });
- this.cancelBtn.on('click', function (e) {
- that.fire("cancelclick");
- });
- },
- getAttrs: function (el) {
- var attrs = seesoft.Panel.superclass.getAttrs.call(this, el);
- mini._ParseString(el, attrs, ["onokclick", "oncancelclick"]);
- return attrs;
- }
- });
复制代码 弹出框的取消按钮如何默认绑定一个关闭窗口的事件,如果页面给panel设置onCancelclick的话就使用页面的事件
|
|