vue-piuma
Version:
Vue component for Piuma Image optimizer
35 lines (32 loc) • 729 B
JavaScript
var index = {render: function(){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('img',{attrs:{"src":_vm.piumize}})])},staticRenderFns: [],
name: 'vuepiuma',
data: function data () {
return {
piumaServer: 'https://vue-piuma.herokuapp.com/'
}
},
props: {
quality: {
default: 100,
type: Number
},
src: {
required: true
},
height: {
default: 0,
type: Number
},
width: {
default: 0,
type: Number
}
},
computed: {
piumize: function () {
return this.piumaServer + '' + this.width + '_' + this.height + '_' + this.quality + '/' + this.src
}
}
};
module.exports = index;
;