main.js import jquery from 'jquery' window.$ = window.jQuery = jquery 在要使用的地方直接 $即可 例如 $.ajax({ type: 'POST', url: 'http://localhost:8082/User/Login', dataType: 'json', data: { usercode: "111", password: "222" }, success: function (data) { } });