Skip to content

Commit

Permalink
chore: upgrade deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
scopewu committed Oct 10, 2023
1 parent b6c14c4 commit c090ce2
Show file tree
Hide file tree
Showing 7 changed files with 296 additions and 215 deletions.
5 changes: 2 additions & 3 deletions README-zh_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

一款 Vue.js 二维码组件.

[![Build Status](https://travis-ci.org/scopewu/qrcode.vue.svg?branch=master)](https://travis-ci.org/scopewu/qrcode.vue)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/master/LICENSE)

## 快速开始
Expand Down Expand Up @@ -101,7 +100,7 @@ createApp({

### `render-as`

- 类型:`string('canvas' | 'svg')`
- 类型:`RenderAs('canvas' | 'svg')`
- 默认值:`canvas`

生成二维码的 HTML 标签,可选 `canvas` 或 `svg`。其中 `svg` 可以用于 SSR。
Expand All @@ -115,7 +114,7 @@ createApp({

### `level`

- 类型:`string('L' | 'M' | 'Q' | 'H')`
- 类型:`Level('L' | 'M' | 'Q' | 'H')`
- 默认值:`H`

二维码的容错能力等级,取值为 'L', 'M', 'Q', 'H' 之一。了解更多,[维基百科:QR_code](https://en.wikipedia.org/wiki/QR_code#Error_correction)。
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

A Vue.js component to generate [QRCode](https://en.wikipedia.org/wiki/QR_code).

[![Build Status](https://travis-ci.org/scopewu/qrcode.vue.svg?branch=master)](https://travis-ci.org/scopewu/qrcode.vue)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/scopewu/qrcode.vue/blob/master/LICENSE)

[中文](./README-zh_cn.md)
Expand Down Expand Up @@ -103,7 +102,7 @@ The size of qrcode element.

### `render-as`

- Type: `string('canvas' | 'svg')`
- Type: `RenderAs('canvas' | 'svg')`
- Default: `canvas`

Generate QRcode as `canvas` or `svg`. The prop `svg` can work on SSR.
Expand All @@ -117,7 +116,7 @@ Define how much wide the quiet zone should be.

### `level`

- Type: `string('L' | 'M' | 'Q' | 'H')`
- Type: `Level('L' | 'M' | 'Q' | 'H')`
- Default: `H`

qrcode Error correction level (one of 'L', 'M', 'Q', 'H'). Know more, [wikipedia: QR_code](https://en.wikipedia.org/wiki/QR_code#Error_correction).
Expand Down
4 changes: 4 additions & 0 deletions example/webpack.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
border-width: 6px !important;
}

.qrcode {
vertical-align: middle;
}

@media screen and (min-width: 768px) {
.container-fluid {
max-width: 798px;
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@
},
"dependencies": {},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-terser": "^0.4.4",
"@vue/compiler-sfc": "^3.3.4",
"@vue/server-renderer": "^3.3.4",
"html-webpack-plugin": "^5.5.3",
"rollup": "^3.25.3",
"rollup-plugin-typescript2": "^0.35.0",
"ts-loader": "^9.4.3",
"typescript": "^5.1.3",
"rollup": "^4.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"ts-loader": "^9.5.0",
"typescript": "^5.2.2",
"vue": "^3.3.4",
"vue-loader": "^17.2.2",
"webpack": "^5.88.0",
"vue-loader": "^17.3.0",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type RenderAs = 'canvas' | 'svg'

const defaultErrorCorrectLevel = 'H'

const ErrorCorrectLevelMap : Record<Level, QR.QrCode.Ecc> = {
const ErrorCorrectLevelMap : Readonly<Record<Level, QR.QrCode.Ecc>> = {
L: QR.QrCode.Ecc.LOW,
M: QR.QrCode.Ecc.MEDIUM,
Q: QR.QrCode.Ecc.QUARTILE,
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"moduleResolution": "node"
}
}
478 changes: 278 additions & 200 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit c090ce2

Please sign in to comment.