baijunjie / PhotoClip.js

一款手势驱动的裁图插件 / A gesture to drive image cropping plug-in
MIT License
638 stars 216 forks source link

请问这是什么原因? #21

Closed gotoin closed 7 years ago

gotoin commented 7 years ago

require加载 PhotoClip.js?v=201601250001:247 Uncaught TypeError: IScroll is not a constructor

gotoin commented 7 years ago

自己解决了 IScroll-zoom.js最底下改成

if (typeof define == 'function' && define.amd) { define(function() { return IScroll; }); } else if ( typeof module != 'undefined' && module.exports ) { module.exports = IScroll; } else { window.IScroll = IScroll; }

baijunjie commented 7 years ago
require.config({
    paths: {
        'iscroll': 'iscroll-zoom',
    },
    shim: {
        'iscroll': {
            exports: 'IScroll'
        }
    }
});