引用模块CommonjsES6浏览器 引用模块 Commonjsconst Mock = require("mockjs"); // 导入Mock模块 ES6 浏览器<script type="text/javascript" src="http://mockjs.com/dist/mock.js"></script> const data = Mock.mock("@id");console.log(data);