diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..9575e9d --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/package.json b/package.json index db19c0d..6efc473 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "jsqr": "^1.3.1", + "jszip": "^3.7.1", "medium-zoom": "^1.0.5", "prop-types": "^15.7.2", "react": "^16.13.1", diff --git a/src/actions/index.js b/src/actions/index.js index ad09615..712816d 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -1,10 +1,19 @@ import {actionTypes} from "../constant/ActionTypes"; import {handleStyle} from "../utils/gaHelper"; -export const genQRInfo = text => ({ - type: actionTypes.GENERATE_QR_INFO, - text -}) +export const genQRInfo = text => { + if (Array.isArray(text)) { + return { + type: actionTypes.GENERATE_QR_INFO, + text: text[0], + textArray: text + } + } + return { + type: actionTypes.GENERATE_QR_INFO, + text + } +} export const changeStyle = (rendererIndex, rendererType, value) => { handleStyle(value); diff --git a/src/components/Qrcode.css b/src/components/Qrcode.css index a0adebc..f7879db 100644 --- a/src/components/Qrcode.css +++ b/src/components/Qrcode.css @@ -318,7 +318,7 @@ td { .Qr-input-upload { display: flex; max-width: calc(100vw - 46px); - width: 20em; + width: 22em; } .Qr-input-upload-div { @@ -360,7 +360,7 @@ td { height: calc(2em + 6px); font-size: calc(10px + 2vmin); border: var(--border-color) solid 2px; - margin-left: 10px; + margin: 0 10px; flex: 1; } @@ -372,6 +372,7 @@ td { .Qr-upload { color: var(--upload-color); + fill: var(--upload-color); font-size: calc(10px + 2vmin); border: var(--border-color) solid 2px; width: calc(2em + 6px)!important; @@ -409,6 +410,7 @@ td { .Qr-upload:hover { border-color: var(--border-color-focus); color: var(--border-color-focus); + fill: var(--border-color-focus); } .Qr-upload:active { @@ -417,6 +419,7 @@ td { -moz-transition-duration: 0s; border-color: #3BBC9F; color: #3BBC9F; + fill: #3BBC9F; } .Qr-upload-svg { diff --git a/src/components/app/PartDownload.js b/src/components/app/PartDownload.js index 4268628..1174d3e 100644 --- a/src/components/app/PartDownload.js +++ b/src/components/app/PartDownload.js @@ -34,7 +34,7 @@ const ImgBox = ({ imgData }) => { return null } -const PartDownload = ({ value, downloadCount, onSvgDownload, onImgDownload }) => { +const PartDownload = ({ value, batchMode, downloadCount, onSvgDownload, onImgDownload }) => { const [imgData, setImgData] = useState(''); return ( @@ -42,7 +42,9 @@ const PartDownload = ({ value, downloadCount, onSvgDownload, onImgDownload }) =>
Downloads

- 下载二维码 — {value} + 下载二维码 + ({batchMode ? "批量模式" : "单文件模式"}) + — {value}

diff --git a/src/components/app/PartMore.js b/src/components/app/PartMore.js index e25f8b1..aae1891 100644 --- a/src/components/app/PartMore.js +++ b/src/components/app/PartMore.js @@ -51,6 +51,7 @@ const PartMore = () => {

最新消息

+

2021.10.5
新增批量生成二维码。

2020.9.1
新增 C3 样式、图标插入、 PNG 下载。

2020.6.29
新的反馈渠道!我们开始征集好玩的二维码设计啦,可以是推送尾图、海报等等,快来上传吧。 + +