http://www.jq22.com/jquery-info6380
基于以上插件改造(上面处理太复杂)
let Maxwidth_temp = (config.maxWidth || ($parent[0].nodeName === 'A' ? $this.parent() : $this).parent().width()) * 1.7; let Minwidth_temp = (config.maxWidth || ($parent[0].nodeName === 'A' ? $this.parent() : $this).parent().width()) * 0.5; switch (go) { case 'left': degree -= 90; degree = degree === -90 ? 270 : degree; break; case 'right': degree += 90; degree = degree === 360 ? 0 : degree; break; case 'source': window.open(source || show || src); break; case 'max': maxWidth_temp = maxWidth * 1.2; if (maxWidth_temp < Maxwidth_temp) { maxWidth = maxWidth_temp; } else { alert("已经放大到最大值了") } break; case 'min': maxWidth_temp = maxWidth * 0.8; if (maxWidth_temp > Minwidth_temp) { maxWidth = maxWidth_temp; } else { alert("已经缩小到最小值了") } break; case 'hide': maxWidth = config.maxWidth || ($parent[0].nodeName === 'A' ? $this.parent() : $this).parent().width(); imgRotate(elem, degree, maxWidth, maxHeight); $this.show(); $artZoom.find('.ui-artZoom-toolbar').hide(); $artZoom.hide(); $artZoom.find('[data-go]').off('click', buttonClick); break; };回复