1、cdn引入jq
index.html中:
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
vue.config.js中:
configureWebpack: config => {
config.externals={
'jquery' : '$',
}
}
需要用到的頁面中:
import $ from 'jquery';
1、cdn引入jq
index.html中:
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
vue.config.js中:
configureWebpack: config => {
config.externals={
'jquery' : '$',
}
}
需要用到的頁面中:
import $ from 'jquery';