Skip to content

Commit

Permalink
fix lazyload option mistake & make lazyload configable (#804)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhua authored and galenyuan committed Apr 12, 2017
1 parent 6b8feea commit 13c9822
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 13c9822

Please sign in to comment.