Skip to content

Commit

Permalink
fix: issue#128
Browse files Browse the repository at this point in the history
  • Loading branch information
hilongjw committed Mar 19, 2017
1 parent 315f2b1 commit 459be0a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-lazyload",
"version": "1.0.0-rc12",
"version": "1.0.0",
"description": "Vue module for lazy-loading images in your vue.js applications.",
"main": "vue-lazyload.js",
"scripts": {
Expand Down
12 changes: 2 additions & 10 deletions src/lazy-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@ export default (lazy) => {
},
render (h) {
if (this.show === false) {
return h(this.tag, {
attrs: {
class: 'cov'
}
})
return h(this.tag)
}
return h(this.tag, {
attrs: {
class: 'cov'
}
}, this.$slots.default)
return h(this.tag, null, this.$slots.default)
},
data () {
return {
Expand Down
5 changes: 5 additions & 0 deletions src/lazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export default function (Vue) {
}, 200)
}

/**
* update config
* @param {Object} config params
* @return
*/
config (options = {}) {
assign(this.options, options)
}
Expand Down
Loading

0 comments on commit 459be0a

Please sign in to comment.