vue-qrious
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -0,1 +1,9 @@ | ||
/*! | ||
* vue-qrious a vue component of generating qrcode with `qrious` | ||
* Version 0.0.2 | ||
* Copyright (C) 2017 JounQin <admin@1stg.me> | ||
* Released under the MIT license | ||
* | ||
* Github: https://github.com/JounQin/vue-qrious | ||
*/ | ||
(function (global, factory) { | ||
@@ -2,0 +10,0 @@ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('qrious')) : |
@@ -0,1 +1,9 @@ | ||
/*! | ||
* vue-qrious a vue component of generating qrcode with `qrious` | ||
* Version 0.0.2 | ||
* Copyright (C) 2017 JounQin <admin@1stg.me> | ||
* Released under the MIT license | ||
* | ||
* Github: https://github.com/JounQin/vue-qrious | ||
*/ | ||
!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}); |
{ | ||
"name": "vue-qrious", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "a vue component of generating qrcode with `qrious`", | ||
"main": "index.js", | ||
"main": "dist/vue-qrious", | ||
"repository": "git@github.com:JounQin/vue-qrious.git", | ||
@@ -7,0 +7,0 @@ "author": "JounQin <admin@1stg.me>", |
# vue-qrious | ||
a vue component of generating qrcode with `qrious` | ||
a vue component of generating qrcode with [qrious](https://github.com/neocotic/qrious) | ||
## Usage | ||
``` vue | ||
<qrious value="https://blog.1stg.me/"/> | ||
``` | ||
## Available Props | ||
prop | type | default value | ||
----------|----------------------|-------------- | ||
`background` | `string` (CSS color) | `"#ffffff"` | ||
`backgroundAlpha` | `number` (0.1-1.0) | `1.0` | ||
`foreground` | `string` (CSS color) | `"#000000"` | ||
`foregroundAlpha` | `number` (0.1-1.0) | `1.0` | ||
`level` | `string` ("L", "M", "Q", "H") | `"L"` | ||
`mime` | `string` ("image/png", "image/jpeg") | `"image/png"` | ||
`padding` | `number` | `null` | ||
`size` | `number` | `100` | ||
`value` | `string` | |
@@ -5,2 +5,4 @@ import buble from 'rollup-plugin-buble' | ||
const pkg = require('./package.json') | ||
const NODE_ENV = process.env.NODE_ENV || 'development' | ||
@@ -12,5 +14,17 @@ | ||
isProd && plugins.push(uglify()) | ||
isProd && plugins.push(uglify({ | ||
output: { | ||
comments: true | ||
} | ||
})) | ||
export default { | ||
banner: `/*! | ||
* ${pkg.name} ${pkg.description} | ||
* Version ${pkg.version} | ||
* Copyright (C) 2017 JounQin <admin@1stg.me> | ||
* Released under the MIT license | ||
* | ||
* Github: https://github.com/JounQin/vue-qrious | ||
*/`, | ||
entry: 'lib/index.vue', | ||
@@ -17,0 +31,0 @@ dest: `dist/vue-qrious${isProd ? '.min' : ''}.js`, |
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
22793
14
145
2
23