Skip to content

Commit

Permalink
version: v2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoDaiGua-Ray committed May 7, 2024
1 parent 695f7f0 commit 175f775
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.0.7

### Feat

- 暴露 `QRCodeInst, QRCodeLevel, QRCodeStatus` 三个类型

## v2.0.6

### Feat
Expand Down
5 changes: 4 additions & 1 deletion components/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import QRCode, { props } from './qrcode/index'

import type { App } from 'vue'
import type { QRCodeInst, QRCodeLevel, QRCodeStatus } from './qrcode/src/types'

export type { QRCodeInst, QRCodeLevel, QRCodeStatus }

export { QRCode as Vue3NextQrcode, props as qrcodeProps }
export default {
install(app: App) {
app.component(QRCode.name, QRCode)
app.component(QRCode.name as string, QRCode)
},
}
2 changes: 2 additions & 0 deletions es/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import QRCode, { props } from './qrcode/index';
import type { App } from 'vue';
import type { QRCodeInst, QRCodeLevel, QRCodeStatus } from './qrcode/src/types';
export type { QRCodeInst, QRCodeLevel, QRCodeStatus };
export { QRCode as Vue3NextQrcode, props as qrcodeProps };
declare const _default: {
install(app: App): void;
Expand Down
4 changes: 3 additions & 1 deletion es/qrcode/src/QRCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ const downloadBase64File = (base64, fileName) => {
const link = document.createElement("a");
link.href = base64;
link.download = fileName || (/* @__PURE__ */ new Date()).getTime() + ".png";
link.style.display = "none";
document.body.appendChild(link);
link.click();
link.remove();
document.body.removeChild(link);
};
const readGIFAsArrayBuffer = (url) => {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 2 additions & 0 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import QRCode, { props } from './qrcode/index';
import type { App } from 'vue';
import type { QRCodeInst, QRCodeLevel, QRCodeStatus } from './qrcode/src/types';
export type { QRCodeInst, QRCodeLevel, QRCodeStatus };
export { QRCode as Vue3NextQrcode, props as qrcodeProps };
declare const _default: {
install(app: App): void;
Expand Down
4 changes: 3 additions & 1 deletion lib/qrcode/src/QRCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const downloadBase64File = (base64, fileName) => {
const link = document.createElement("a");
link.href = base64;
link.download = fileName || (/* @__PURE__ */ new Date()).getTime() + ".png";
link.style.display = "none";
document.body.appendChild(link);
link.click();
link.remove();
document.body.removeChild(link);
};
const readGIFAsArrayBuffer = (url) => {
return new Promise((resolve, reject) => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue3-next-qrcode",
"private": false,
"version": "2.0.6",
"version": "2.0.7",
"type": "module",
"license": "MIT",
"author": "Ray",
Expand All @@ -25,14 +25,14 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.13"
"vue": "^3.3.13",
"awesome-qr": "2.1.5-rc.0"
},
"devDependencies": {
"@types/node": "^20.5.9",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.2",
"add": "^2.0.6",
"awesome-qr": "2.1.5-rc.0",
"prettier": "^3.0.3",
"sass": "^1.66.1",
"typescript": "^5.0.2",
Expand Down

0 comments on commit 175f775

Please sign in to comment.