require is not defined 是因为没有 requireJS 脚本 或者脚本未能加载成功 只需要在官网下载好脚本,然后在你要用文件中导入即可下载官网:Download RequireJS 在 html 文件中导入即可