1.引入
npm install jquery -s
2.在vue.config.js加入
configureWebpack: {
plugins: [
new webpack.ProvidePlugin({
$:"jquery",
jQuery:"jquery",
"windows.jQuery":"jquery"
})
]
}
3.在.eslintrc.js
加入
env: {
"jquery":true
},