Skip to content
This repository was archived by the owner on Mar 30, 2022. It is now read-only.

Commit ae7c4f7

Browse files
author
innc11
committed
docs: correct some errors in readme.md
1 parent b2c447a commit ae7c4f7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Gravatar的默认头像,更多信息请查看[头像配置](https://waline.js.
165165
+ 默认值:`'https://www.gravatar.com/avatar/'`(官方API)
166166
+ 对应Waline选项:`avatarCDN`
167167

168-
设置Gravatar头像的镜像服务地址,默认是官方地址,但在国内访问较慢,可以设置为Ve2x提供的CDN提升头像加载速度`https://cdn.v2ex.com/gravatar/`(注意末尾需要加上`/`
168+
设置Gravatar头像的镜像服务地址,默认是官方地址,但在国内访问较慢,可以设置为Loli提供的CDN提升头像加载国内加载速度`https://gravatar.loli.net/avatar/`(注意末尾需要加上`/`
169169

170170
### avatarNocache
171171

@@ -199,6 +199,8 @@ Gravatar的默认头像,更多信息请查看[头像配置](https://waline.js.
199199

200200
是否自动聚焦到对应的评论上(当从通知邮件跳转过来时)
201201

202+
注意:此功能与hash路由冲突,history路由不受影响
203+
202204
### paginatorLength
203205

204206
+ 类型:`number`
@@ -392,7 +394,7 @@ var recentComments: object[] = comment.recent()
392394

393395
### 手动控制生命周期
394396

395-
在一些PJAX或者SPA场景中,切换页面时页面可能并不会重新加载,可能就会出现页面已经加载成新页面了,但是评论系统还没有跟过来的问题,这时就需要自己手动控制初始化和销毁了。
397+
在一些PJAX或者SPA(单页应用)场景中,切换页面时页面可能并不会重新加载,可能就会出现页面已经加载成新页面了,但是评论系统还没有跟过来的问题,这时就需要自己手动控制初始化和销毁了。
396398

397399
只需要在初始化时设置`manualMode: true`,然后在pjax回调函数或者对应的渲染回调函数中销毁AprilComment,然后更新`pathname`参数后再次重新初始化即可
398400

@@ -408,7 +410,7 @@ function cb_after_rendering() // 每次切换页面时会被调用一次
408410
if(!ac.isDestroyed())
409411
ac.destroy()
410412
ac.setOptions({ pathname: location.pathname })
411-
ac.mou()
413+
ac.mount()
412414
}
413415
```
414416

@@ -443,7 +445,7 @@ AprilComment.isProduction()
443445
+ 参数1:`optionsOverrode?: AprilCommentOptions`,新的参数对象
444446
+ 返回值:``
445447

446-
用于更新一些参数的值,此方法的参数和初始化AprilComment时传入的参数类型一致,也可以只更新部分参数
448+
用于更新一些参数的值,此方法的参数和初始化AprilComment时传入的参数类型一致,也可以只更新部分参数,传入的参数会以`深拷贝`的方式合并到当前options中
447449

448450
```js
449451
var ac = new AprilComment({

0 commit comments

Comments
 (0)