// 安装jquery
npm install jquery --save
// 打开.eslintrc.js 添加
module.exports = {
env: {
jquery:true
}
}
// 打开vue.config.js 文件 添加
const webpack = require('webpack')
module.exports = {
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
})
]
},
}