qrcode.vue
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -1036,3 +1036,24 @@ (function (global, factory) { | ||
var QrcodeVue = { | ||
template: '<div :class="className" :value="value" :level="level" :background="background" :foreground="foreground">' + '<canvas :height="size" :width="size" :style="{width: size + \'px\', height: size + \'px\'}" ref="qrcode-vue"></canvas>' + '</div>', | ||
render: function render(h) { | ||
var className = this.className, | ||
value = this.value, | ||
level = this.level, | ||
background = this.background, | ||
foreground = this.foreground, | ||
size = this.size; | ||
return h( | ||
'div', | ||
{ 'class': className, attrs: { value: value, level: level, background: background, foreground: foreground } | ||
}, | ||
[h( | ||
'canvas', | ||
{ | ||
attrs: { height: size, width: size }, | ||
style: { width: size + 'px', height: size + 'px' }, ref: 'qrcode-vue' }, | ||
[] | ||
)] | ||
); | ||
}, | ||
props: { | ||
@@ -1039,0 +1060,0 @@ value: { |
{ | ||
"name": "qrcode.vue", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "A Vue component for QRCode.", | ||
@@ -15,3 +15,4 @@ "main": "dist/qrcode.vue.js", | ||
"lint": "better-npm-run lint", | ||
"rollup": "rollup -c ./config/rollup.config.js" | ||
"rollup": "rollup -c ./config/rollup.config.js", | ||
"prepublish": "npm run build" | ||
}, | ||
@@ -57,3 +58,3 @@ "betterScripts": { | ||
"build": { | ||
"command": "npm run clean && npm run rollup", | ||
"command": "npm run clean && npm run lint && npm run rollup", | ||
"env": { | ||
@@ -79,2 +80,4 @@ "NODE_ENV": "production", | ||
"vue-component", | ||
"component", | ||
"code", | ||
"qrcode" | ||
@@ -88,2 +91,5 @@ ], | ||
"homepage": "https://scopewu.github.io/qrcode.vue/", | ||
"peerDependencies": { | ||
"vue": "^2.0.0" | ||
}, | ||
"dependencies": {}, | ||
@@ -93,7 +99,11 @@ "devDependencies": { | ||
"babel-eslint": "^7.2.3", | ||
"babel-helper-vue-jsx-merge-props": "^2.0.2", | ||
"babel-loader": "^7.1.0", | ||
"babel-plugin-syntax-dynamic-import": "^6.18.0", | ||
"babel-plugin-syntax-jsx": "^6.18.0", | ||
"babel-plugin-transform-vue-jsx": "^3.5.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babel-runtime": "^6.23.0", | ||
"better-npm-run": "0.0.15", | ||
"css-loader": "^0.28.4", | ||
"debug": "^2.6.8", | ||
@@ -117,6 +127,7 @@ "eslint": "^4.2.0", | ||
"rollup-plugin-replace": "^1.1.1", | ||
"style-loader": "^0.18.2", | ||
"vue": "^2.4.1", | ||
"webpack": "^3.3.0", | ||
"webpack-dev-server": "^2.5.1" | ||
"webpack": "^3.5.3", | ||
"webpack-dev-server": "^2.7.1" | ||
} | ||
} |
@@ -16,5 +16,10 @@ import QRCode from 'qr.js/lib/QRCode' | ||
const QrcodeVue = { | ||
template: '<div :class="className" :value="value" :level="level" :background="background" :foreground="foreground">' + | ||
'<canvas :height="size" :width="size" :style="{width: size + \'px\', height: size + \'px\'}" ref="qrcode-vue"></canvas>' + | ||
'</div>', | ||
render(h) { | ||
const {className, value, level, background, foreground, size} = this | ||
return ( | ||
<div class={className} value={value} level={level} background={background} foreground={foreground}> | ||
<canvas height={size} width={size} style={{width: `${size}px`, height: `${size}px`}} ref='qrcode-vue' /> | ||
</div> | ||
) | ||
}, | ||
props: { | ||
@@ -21,0 +26,0 @@ value: { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
212664
990
0
1
33
10