缥缈止盈
在Vue.js中使用jquery插件需要利用 ProvidePlugin导入jquery全局库。1、在build/webpack.dev.conf.js和build/webpack.prod.conf.js中配置即可。2、在模块中使用的时候代码如下:plugins: [// 这里是需要导入的插件列表,定意思jquery为全局参数new webpack.ProvidePlugin({$: 'jquery',jquery: 'jquery','window.jQuery': 'jquery',jQuery: 'jquery'})]也可以使用import的 这种写法:import jQuery from 'jQuery'ready: function() {var self = this;jQuery(window).resize(function () {self.$refs.thisherechart.drawChart();})},