@gm-mobile/c-qrcode 3.12.12-beta.0 → 3.12.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# @gm-mobile/c-qrcode
|
|
2
|
+
|
|
3
|
+
## 简介
|
|
4
|
+
二维码组件包 - 提供跨平台的二维码渲染组件,支持 Web 端和小程序端。
|
|
5
|
+
|
|
6
|
+
## 安装
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm install @gm-mobile/c-qrcode
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### peerDependencies
|
|
13
|
+
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"qrcode.react": "^1.0.0",
|
|
17
|
+
"weapp-qrcode": "^1.0.0"
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## 使用
|
|
22
|
+
|
|
23
|
+
### 快速开始
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import { QRCode } from '@gm-mobile/c-qrcode'
|
|
27
|
+
|
|
28
|
+
<QRCode value="https://example.com" />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
### 导出列表
|
|
34
|
+
|
|
35
|
+
| 导出项 | 类型 | 说明 |
|
|
36
|
+
|--------|------|------|
|
|
37
|
+
| `QRCode` | 组件 | 二维码渲染组件 |
|
|
38
|
+
| `QRCodeProps` | 类型 | QRCode 组件的 Props 类型 |
|
|
39
|
+
|
|
40
|
+
## 示例
|
|
41
|
+
|
|
42
|
+
### 基础用法
|
|
43
|
+
|
|
44
|
+
```jsx
|
|
45
|
+
import { QRCode } from '@gm-mobile/c-qrcode'
|
|
46
|
+
|
|
47
|
+
const App = () => {
|
|
48
|
+
return (
|
|
49
|
+
<div>
|
|
50
|
+
<QRCode value="https://example.com" />
|
|
51
|
+
</div>
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 注意事项
|
|
57
|
+
- Web 端使用 `qrcode.react` 渲染二维码
|
|
58
|
+
- 小程序端使用 `weapp-qrcode` 渲染二维码
|
|
59
|
+
- 需要根据运行环境安装对应的 peerDependencies
|
|
60
|
+
|
|
61
|
+
## 相关包
|
|
62
|
+
- [@gm-mobile/c-react](../c-react) - 基础 React 组件
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gm-mobile/c-qrcode",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.13",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "liyatang <liyatang@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/gmfe/gm-mobile#readme",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/qrcode.react": "^1.0.1"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "f1807b01b33bb8ee331b6c713d52d85fda524bf7"
|
|
31
31
|
}
|