本帖最后由 dexteryao 于 2017-4-21 15:23 编辑
这样写。Excelio支持require,不需要shim。产品内部有些问题,需要显示声明下GC
requirejs.config({
baseUrl: 'js/',
paths: {
jQuery:'jquery-1.8.2.min',
spread: 'gc.spread.sheets.resources.zh.10.0.1.min',
excelio: 'gc.spread.excelio.10.0.1.min',
fileSaver: 'FileSaver'
},
shim: {
"spread":['gc.spread.sheets.all.10.0.1.min'],
// "excelio": ['gc.spread.sheets.all.10.0.1.min']
}
});
另外不需要$(document).ready(function () {
var GC = GC || {};
GC.Spread = GC.Spread || {};
GC.Spread.Sheets = GC.Spread.Sheets || {};
require( ['jQuery','spread','excelio','fileSaver'], function(jQuery, spread, excelio, fileSaver){
var excelIo = new excelio.IO();
|