From 13c98222030f05df0a7a560387444119274da685 Mon Sep 17 00:00:00 2001 From: Zhou Hua Date: Wed, 12 Apr 2017 17:10:44 +0800 Subject: [PATCH] fix lazyload option mistake & make lazyload configable (#804) --- src/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index ae7692e9..f78ad278 100644 --- a/src/index.js +++ b/src/index.js @@ -34,7 +34,7 @@ import PaletteButton from '../packages/palette-button'; import '../src/assets/font/iconfont.css'; const version = '2.2.3'; -const install = function(Vue) { +const install = function(Vue, config = {}) { if (install.installed) return; Vue.component(Header.name, Header); @@ -68,7 +68,8 @@ const install = function(Vue) { Vue.use(InfiniteScroll); Vue.use(Lazyload, { loading: require('./assets/loading-spin.svg'), - try: 3 + attempt: 3, + ...config.lazyload }); Vue.$messagebox = Vue.prototype.$messagebox = MessageBox;