列表中弹出表单的放大如何实现,想要在图片的位置中添加放大按钮
列表中弹出表单的放大如何实现,想要在图片的位置中添加放大按钮
弹出框是使用的artDialog,需要可以做扩展,以下代码供参考:
// 事件代理
_addEvent: function () {
var resizeTimer,
that = this,
config = that.config,
isIE = 'CollectGarbage' in window,
DOM = that.DOM;
// 窗口调节事件
that._winResize = function () {
resizeTimer && clearTimeout(resizeTimer);
resizeTimer = setTimeout(function () {
that._reset(isIE);
}, 40);
};
_$window.bind('resize', that._winResize);
// 监听点击
DOM.wrap
.bind('click', function (event) {
var target = event.target, callbackID;
if (target.disabled) return false; // IE BUG
if (target === DOM.close[0]) {
that._click(config.cancelVal);
return false;
} else if (target === DOM.max[0]) {
that.max();
} else if (target === DOM.min[0]) {
that.min();
} else {
callbackID = target[_expando + 'callback'];
callbackID && that._click(callbackID);
};
that._ie6SelectFix();
})
.bind('mousedown', function () {
that.zIndex();
});
},