首先需要注意ES6在严格模式下中常量太长会出问题,CHAR_DICT.FULL_DICT.POLYPHONE都是很大的常量,所以我都外部加载了,否则编译运行会有问题,先贴代码,常量在最后,如下: js源码: (function (){ Pinyin = function (ops){ this.initialize(ops); }; var options = { checkPolyphone: false, charcase: 'default' }; Pinyin.fn = Pinyin.p…