vue-qrious
Advanced tools
Comparing version 0.0.3 to 0.1.0
/*! | ||
* vue-qrious a vue component of generating qrcode with `qrious` | ||
* Version 0.0.3 | ||
* Version 0.1.0 | ||
* Copyright (C) 2017 JounQin <admin@1stg.me> | ||
@@ -38,19 +38,19 @@ * Released under the MIT license | ||
data: function data() { | ||
return this.init() | ||
var qr = new QRious(this.$options.propsData); | ||
return { | ||
qr: qr, | ||
src: this.getSrc(qr) | ||
} | ||
}, | ||
mounted: function mounted() { | ||
created: function created() { | ||
var this$1 = this; | ||
this.$options._propKeys.forEach(function (key) { return this$1.$watch(key, this$1.update); }); | ||
this.$options._propKeys.forEach(function (key) { return this$1.$watch(key, function () { | ||
this$1.qr[key] = this$1[key]; | ||
this$1.src = this$1.getSrc(); | ||
}); }); | ||
}, | ||
methods: { | ||
init: function init() { | ||
var qr = new QRious(this.$options.propsData); | ||
return { | ||
qr: qr, | ||
src: qr.toDataURL(this.mime) | ||
} | ||
}, | ||
update: function update() { | ||
Object.assign(this, this.init()); | ||
getSrc: function getSrc(qr) { | ||
return (this.qr || qr).toDataURL(this.mime) | ||
} | ||
@@ -57,0 +57,0 @@ } |
/*! | ||
* vue-qrious a vue component of generating qrcode with `qrious` | ||
* Version 0.0.3 | ||
* Version 0.1.0 | ||
* Copyright (C) 2017 JounQin <admin@1stg.me> | ||
@@ -9,2 +9,2 @@ * Released under the MIT license | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("qrious")):"function"==typeof define&&define.amd?define("vue-qrious",["qrious"],e):t.VueQrious=e(t.QRious)}(this,function(t){"use strict";t="default"in t?t.default:t;var e=["L","M","Q","H"],n={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("img",{attrs:{src:t.src}})},staticRenderFns:[],props:{value:{type:String,required:!0},background:String,backgroundAlpha:Number,foreground:String,foregroundAlpha:String,level:{type:String,validator:function(t){return e.indexOf(t)+1}},mime:String,padding:Number,size:Number},data:function(){return this.init()},mounted:function(){var t=this;this.$options._propKeys.forEach(function(e){return t.$watch(e,t.update)})},methods:{init:function(){var e=new t(this.$options.propsData);return{qr:e,src:e.toDataURL(this.mime)}},update:function(){Object.assign(this,this.init())}}};return n}); | ||
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("qrious")):"function"==typeof define&&define.amd?define("vue-qrious",["qrious"],e):r.VueQrious=e(r.QRious)}(this,function(r){"use strict";r="default"in r?r.default:r;var e=["L","M","Q","H"],t={render:function(){var r=this,e=r.$createElement,t=r._self._c||e;return t("img",{attrs:{src:r.src}})},staticRenderFns:[],props:{value:{type:String,required:!0},background:String,backgroundAlpha:Number,foreground:String,foregroundAlpha:String,level:{type:String,validator:function(r){return e.indexOf(r)+1}},mime:String,padding:Number,size:Number},data:function(){var e=new r(this.$options.propsData);return{qr:e,src:this.getSrc(e)}},created:function(){var r=this;this.$options._propKeys.forEach(function(e){return r.$watch(e,function(){r.qr[e]=r[e],r.src=r.getSrc()})})},methods:{getSrc:function(r){return(this.qr||r).toDataURL(this.mime)}}};return t}); |
{ | ||
"name": "vue-qrious", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "a vue component of generating qrcode with `qrious`", | ||
@@ -15,13 +15,14 @@ "main": "dist/vue-qrious", | ||
}, | ||
"dependencies": { | ||
"qrious": "^2.2.0" | ||
"peerDependencies": { | ||
"qrious": "^2.0.0", | ||
"vue": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^3.1.4", | ||
"rollup": "^0.41.4", | ||
"cross-env": "^4.0.0", | ||
"rollup": "^0.41.6", | ||
"rollup-plugin-buble": "^0.15.0", | ||
"rollup-plugin-uglify": "^1.0.1", | ||
"rollup-plugin-vue": "^2.2.18", | ||
"rollup-plugin-vue": "^2.3.1", | ||
"rollup-watch": "^3.2.2" | ||
} | ||
} |
# vue-qrious | ||
[![dependencies](https://david-dm.org/JounQin/vue-qrious.svg)](https://david-dm.org/JounQin/vue-qrious) | ||
[![devDependency Status](https://david-dm.org/JounQin/vue-qrious/dev-status.svg)](https://david-dm.org/JounQin/vue-qrious?type=dev) | ||
a vue component of generating qrcode with [qrious](https://github.com/neocotic/qrious) | ||
@@ -3,0 +7,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
85335
1080
0
30
2
3
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.9(transitive)
+ Added@babel/types@7.26.9(transitive)
+ Added@vue/compiler-sfc@2.7.16(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addednanoid@3.3.8(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedpostcss@8.5.2(transitive)
+ Addedprettier@2.8.8(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsource-map-js@1.2.1(transitive)
+ Addedvue@2.7.16(transitive)
- Removedqrious@^2.2.0