We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixPage:false // 不阻止原生事件
mySlider.on('click', '.slider-img', function(){ console.log(arguments); })
arguments第一个参数返回的是.slider-img选择器的dom元素,第二个是callee,第三个是一个回调。说好的,第一个是传回的是event对象呢?
.slider-img
let banners = []; const vm = new Vue({ template: `<a href="${item.link}" class="banner-img-link"> <img class="banner-img" data-src="${item.pic}" alt="banner图"> </a>`, data: { item: item } }).$mount(); banners.push({ content: vm.$el });
由于使用了template,所以需要设置一个vue别名,指向dist/vue.min.js
resolve: { alias: { vue: 'vue/dist/vue.min.js' } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
配置选项设置
fixPage:false // 不阻止原生事件
,这样就可以给slider中的dom添加事件了。ps: 我自己尝试了一下,使用delagate方法,结果arguments第一个参数返回的是
.slider-img
选择器的dom元素,第二个是callee,第三个是一个回调。说好的,第一个是传回的是event对象呢?由于使用了template,所以需要设置一个vue别名,指向dist/vue.min.js
还没开始看源码,所以不予评价,放到这里mark一下
The text was updated successfully, but these errors were encountered: