Skip to content

Commit

Permalink
fix(lazyload): refix ElemeFE#804 (ElemeFE#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
galenyuan authored Apr 20, 2017
1 parent 6cbc266 commit 528696f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build/bin/build-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ var MAIN_TEMPLATE = `{{include}}
import '../src/assets/font/iconfont.css';
const version = '{{version}}';
const install = function(Vue) {
const install = function(Vue, config = {}) {
if (install.installed) return;
{{install}}
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 Expand Up @@ -82,4 +83,3 @@ var template = render(MAIN_TEMPLATE, {

fs.writeFileSync(OUTPUT_PATH, template);
console.log('[build entry] DONE:', OUTPUT_PATH);

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.4';
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 528696f

Please sign in to comment.