version 1.0

This commit is contained in:
Dmytro Barylo
2017-03-04 16:46:53 +02:00
commit ac6d57b46f
44 changed files with 2145 additions and 0 deletions

19
src/directives/v-image.js Normal file
View File

@@ -0,0 +1,19 @@
let setValue = function(el, binding) {
let img = new Image();
img.src = binding.value;
img.onload = function() {
this.src = img.src;
this.classList.add("is-loaded");
}.bind(el);
};
module.exports = {
isLiteral: true,
bind(el, binding){
setValue(el, binding);
},
update(el, binding){
setValue(el, binding);
}
}