We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 974043c commit 6c3accfCopy full SHA for 6c3accf
README.md
@@ -22,8 +22,15 @@ import Vcode from 'react-vcode';
22
<Vcode />
23
24
````
25
+## 3. 服务端渲染
26
+```
27
+import Vcode from 'react-vcode';
28
-## 3. 自定义参数
29
+ <Vcode id="vcode" />
30
31
+ 需要自己加个id, 不然服务端渲染和本地渲染,id变了会报错,因为Vcode内部使用了随机值
32
+
33
+## 4. 自定义参数
34
35
可自行设置覆盖原有值
36
@@ -89,14 +96,14 @@ options:{ // 验证码相关自定义参数
89
96
/>
90
97
91
98
92
-## 4. 手动刷新验证码
99
+## 5. 手动刷新验证码
93
100
```javascript
94
101
<Vcode ref={(obj)=>this.vcode = obj} />
95
102
103
this.vcode.onClick(); // 调用内部的onClick方法可刷新验证码
104
```
105
-## 5. 额外说明
106
+## 6. 额外说明
107
108
- 之前用过一个验证码插件叫 vcode.js, 不知道作者。 本react-vcode是通过vcode.js的源码进行修改加工,转成了react组件。感谢原作者。
109
0 commit comments