Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

v-lazy-image

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-lazy-image - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

4

dist/v-lazy-image.cjs.js
/**
* v-lazy-image v1.2.0
* v-lazy-image v1.2.1
* (c) 2018 Alex Jover Morales <alexjovermorales@gmail.com>

@@ -26,3 +26,3 @@ * @license MIT

type: Object,
default: {}
default: function () { return ({}); }
}

@@ -29,0 +29,0 @@ },

/**
* v-lazy-image v1.2.0
* v-lazy-image v1.2.1
* (c) 2018 Alex Jover Morales <alexjovermorales@gmail.com>

@@ -22,3 +22,3 @@ * @license MIT

type: Object,
default: {}
default: function () { return ({}); }
}

@@ -25,0 +25,0 @@ },

/**
* v-lazy-image v1.2.0
* v-lazy-image v1.2.1
* (c) 2018 Alex Jover Morales <alexjovermorales@gmail.com>

@@ -28,3 +28,3 @@ * @license MIT

type: Object,
default: {}
default: function () { return ({}); }
}

@@ -31,0 +31,0 @@ },

/**
* v-lazy-image v1.2.0
* v-lazy-image v1.2.1
* (c) 2018 Alex Jover Morales <alexjovermorales@gmail.com>

@@ -7,2 +7,2 @@ * @license MIT

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.VLazyImage={})}(this,function(e){"use strict";var t={props:{src:{type:String,required:!0},srcPlaceholder:{type:String,default:""},srcset:{type:String},intersectionOptions:{type:Object,default:{}}},data:function(){return{observer:null,intersected:!1,loaded:!1}},computed:{srcImage:function(){return this.intersected?this.src:this.srcPlaceholder},srcsetImage:function(){return!(!this.intersected||!this.srcset)&&this.srcset}},render:function(e){return e("img",{attrs:{src:this.srcImage,srcset:this.srcsetImage},class:{"v-lazy-image":!0,"v-lazy-image-loaded":this.loaded}})},mounted:function(){var e=this;this.$el.addEventListener("load",function(t){e.$el.src===e.src&&(e.loaded=!0,e.$emit("load"))}),this.observer=new IntersectionObserver(function(t){t[0].isIntersecting&&(e.intersected=!0,e.observer.disconnect(),e.$emit("intersect"))},this.intersectionOptions),this.observer.observe(this.$el)},destroyed:function(){this.observer.disconnect()}},s={install:function(e,s){e.component("VLazyImage",t)}};e.default=t,e.VLazyImagePlugin=s,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.VLazyImage={})}(this,function(e){"use strict";var t={props:{src:{type:String,required:!0},srcPlaceholder:{type:String,default:""},srcset:{type:String},intersectionOptions:{type:Object,default:function(){return{}}}},data:function(){return{observer:null,intersected:!1,loaded:!1}},computed:{srcImage:function(){return this.intersected?this.src:this.srcPlaceholder},srcsetImage:function(){return!(!this.intersected||!this.srcset)&&this.srcset}},render:function(e){return e("img",{attrs:{src:this.srcImage,srcset:this.srcsetImage},class:{"v-lazy-image":!0,"v-lazy-image-loaded":this.loaded}})},mounted:function(){var e=this;this.$el.addEventListener("load",function(t){e.$el.src===e.src&&(e.loaded=!0,e.$emit("load"))}),this.observer=new IntersectionObserver(function(t){t[0].isIntersecting&&(e.intersected=!0,e.observer.disconnect(),e.$emit("intersect"))},this.intersectionOptions),this.observer.observe(this.$el)},destroyed:function(){this.observer.disconnect()}},s={install:function(e,s){e.component("VLazyImage",t)}};e.default=t,e.VLazyImagePlugin=s,Object.defineProperty(e,"__esModule",{value:!0})});
{
"name": "v-lazy-image",
"version": "1.2.0",
"version": "1.2.1",
"description": "A Vue.js component to lazy load images using the Intersection Observer",

@@ -5,0 +5,0 @@ "main": "dist/v-lazy-image.cjs.js",

@@ -16,3 +16,3 @@ const VLazyImageComponent = {

type: Object,
default: {}
default: () => ({})
}

@@ -19,0 +19,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc