Skip to content

Commit

Permalink
updated 添加文本及修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mumuy committed May 28, 2024
1 parent 90ea2bd commit 1bfafde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/widget-qrcode.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h1>二维码组件<span class="tag">开源算法</span></h1>
<div class="hd"><span class="title">样例展示</span></div>
<div class="bd">
<widget-qrcode template="fusion" level="M" background-image="./static/image/bg/girl.jpeg" background-color="#ffcc60"></widget-qrcode>
<widget-qrcode template="fusion" background-image="./static/image/bg/monkey.jpeg" background-color="#ece8dd" foreground-color="#000000"></widget-qrcode>
<widget-qrcode template="fusion" background-image="./static/image/bg/monkey.jpeg" background-color="#ece8dd" foreground-color="#000000" text="Now You See Me" text-color="#2c2b2e" text-stroke="#ece8dd"></widget-qrcode>
<widget-qrcode template="diamond" logo="./static/image/logo/snail.png" foreground-image="./static/image/skin/grass.png" background-color="#fff2dc" inner-color="#094304"></widget-qrcode>
<widget-qrcode template="water" logo="./static/image/logo/earth.png" foreground-color="#6d327c,#485DA6,#00a1ba,#00BF98,#36C486" background-color="#f1f8ff" inner-color="#845EC2"></widget-qrcode>
<widget-qrcode template="heart" logo="./static/image/logo/octopus.png" foreground-color="#ff9999" background-color="#fff7f7" inner-color="#ce5050"></widget-qrcode>
Expand Down
2 changes: 1 addition & 1 deletion src/widget-qrcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class WidgetQRCode extends HTMLElement {
}
drawQRCode(){
let _ = this;
let level =_.logo:'H':_.level;
let level =_.logo?'H':_.level;
let data = QRCode(_.value, level);
_.context.clearRect(0,0,_.$canvas.width,_.$canvas.height);
(Draw[_.template]||Draw['default'])(_.context, data, {
Expand Down

0 comments on commit 1bfafde

Please sign in to comment.