Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit a1be2db
Author: Tenny <tenny.shu@foxmail.com>
Date:   Thu Aug 22 16:37:53 2024 +0800

    feat(QrCode): 新增二维码中间插入图标

    Signed-off-by: Tenny <tenny.shu@foxmail.com>

commit 3020909
Author: Tenny <tenny.shu@foxmail.com>
Date:   Fri Aug 16 16:56:38 2024 +0800

    chore: 增加提交发布脚本

    Signed-off-by: Tenny <tenny.shu@foxmail.com>

commit c8f1667
Author: Tenny <tenny.shu@foxmail.com>
Date:   Thu Aug 15 18:07:25 2024 +0800

    ci: 优化脚本

    Signed-off-by: Tenny <tenny.shu@foxmail.com>
  • Loading branch information
Tenny committed Aug 22, 2024
1 parent 12d1eb3 commit 3bfd596
Show file tree
Hide file tree
Showing 6 changed files with 333 additions and 305 deletions.
27 changes: 19 additions & 8 deletions docs/components/qrcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,29 @@

<ClientOnly><CodePreview>
<textarea lang="vue-html">
<nt-qrcode text="Hello World" fill="#4998f4" size="120"></nt-qrcode>
<nt-qrcode text="Hello World" fill="#4998f4" :size="120"></nt-qrcode>
</textarea>
</CodePreview></ClientOnly>

### 图标

可以将 `logo` 放入二维码

<ClientOnly>
<CodePreview>
<textarea lang="vue-html">
<nt-qrcode text="Hello World" icon-src="/neatui-vue/img_loading.png"></nt-qrcode>
</textarea>
</CodePreview>
</ClientOnly>

## API

### Qrcode Props

| 参数 | 说明 | 类型 | 默认值 |
| -------- | -------------------------------- | -------- | --------- |
| `text` | 二维码内容 | `string` ||
| `fill` | 二维码颜色 | `string` | `#000000` |
| `size` | 二维码大小 | `string` | `100` |
| `level` | 二维码容错率, `L``M``Q``H` | `string` | `L` |
| `margin` | 二维码边距 | `number` | `0` |
| 参数 | 说明 | 类型 | 默认值 |
| ------- | -------------------------------- | -------- | --------- |
| `text` | 二维码内容 | `string` ||
| `fill` | 二维码颜色 | `string` | `#000000` |
| `size` | 二维码大小 | `string` | `100` |
| `level` | 二维码容错率, `L``M``Q``H` | `string` | `M` |
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,24 @@
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs",
"inspect:eslint": "eslint --inspect-config"
"inspect:eslint": "eslint --inspect-config",
"push": "pwsh scripts/publish.ps1 push",
"publish": "./scripts/publish.ps1 publish"
},
"devDependencies": {
"@types/node": "^22.3.0",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@types/node": "^22.5.0",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"@vitejs/plugin-vue": "^5.1.2",
"eslint": "^9.9.0",
"eslint-plugin-vue": "^9.27.0",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"shiki": "^1.13.0",
"shiki": "^1.14.1",
"typescript": "^5.5.4",
"vite": "^5.4.0",
"vite": "^5.4.2",
"vite-plugin-dts": "4.0.3",
"vitepress": "^1.3.2",
"vitepress": "^1.3.3",
"vue-tsc": "^2.0.29"
},
"peerDependencies": {
Expand Down Expand Up @@ -65,7 +67,7 @@
"dependencies": {
"@tanstack/vue-table": "^8.20.4",
"ph-utils": "^0.8.4",
"qrcode-generator-es": "^0.0.4",
"qrcode-generator-es": "^1.0.1",
"vue-router": "^4.4.3"
},
"packageManager": "pnpm@9.0.2"
Expand Down
Loading

0 comments on commit 3bfd596

Please sign in to comment.