插件安装npm install imagesloaded
import imagesLoaded from 'imagesloaded'
//插件引入
const elLoad = imagesLoaded('.pages-hoc')
elLoad.on( 'always', ()=>{
var elem = document.querySelector('.pages-hoc');
var msnry = new Masonry (elem, {
// options
itemSelector: '.img',//图片盒子名称
columnWidth: '.img'
});
} );
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。