This repository was archived by the owner on Mar 30, 2022. It is now read-only.
Commit ae7c4f7 innc11
committed
1 parent b2c447a commit ae7c4f7 Copy full SHA for ae7c4f7
File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ Gravatar的默认头像,更多信息请查看[头像配置](https://waline.js.
165
165
+ 默认值:` 'https://www.gravatar.com/avatar/' ` (官方API)
166
166
+ 对应Waline选项:` avatarCDN `
167
167
168
- 设置Gravatar头像的镜像服务地址,默认是官方地址,但在国内访问较慢,可以设置为Ve2x提供的CDN提升头像加载速度 ` https://cdn.v2ex.com/gravatar / ` (注意末尾需要加上` / ` )
168
+ 设置Gravatar头像的镜像服务地址,默认是官方地址,但在国内访问较慢,可以设置为Loli提供的CDN提升头像加载国内加载速度 ` https://gravatar.loli.net/avatar / ` (注意末尾需要加上` / ` )
169
169
170
170
### avatarNocache
171
171
@@ -199,6 +199,8 @@ Gravatar的默认头像,更多信息请查看[头像配置](https://waline.js.
199
199
200
200
是否自动聚焦到对应的评论上(当从通知邮件跳转过来时)
201
201
202
+ 注意:此功能与hash路由冲突,history路由不受影响
203
+
202
204
### paginatorLength
203
205
204
206
+ 类型:` number `
@@ -392,7 +394,7 @@ var recentComments: object[] = comment.recent()
392
394
393
395
### 手动控制生命周期
394
396
395
- 在一些PJAX或者SPA场景中 ,切换页面时页面可能并不会重新加载,可能就会出现页面已经加载成新页面了,但是评论系统还没有跟过来的问题,这时就需要自己手动控制初始化和销毁了。
397
+ 在一些PJAX或者SPA(单页应用)场景中 ,切换页面时页面可能并不会重新加载,可能就会出现页面已经加载成新页面了,但是评论系统还没有跟过来的问题,这时就需要自己手动控制初始化和销毁了。
396
398
397
399
只需要在初始化时设置` manualMode: true ` ,然后在pjax回调函数或者对应的渲染回调函数中销毁AprilComment,然后更新` pathname ` 参数后再次重新初始化即可
398
400
@@ -408,7 +410,7 @@ function cb_after_rendering() // 每次切换页面时会被调用一次
408
410
if(!ac.isDestroyed())
409
411
ac.destroy()
410
412
ac.setOptions({ pathname: location.pathname })
411
- ac.mou ()
413
+ ac.mount ()
412
414
}
413
415
```
414
416
@@ -443,7 +445,7 @@ AprilComment.isProduction()
443
445
+ 参数1:` optionsOverrode?: AprilCommentOptions ` ,新的参数对象
444
446
+ 返回值:` 无 `
445
447
446
- 用于更新一些参数的值,此方法的参数和初始化AprilComment时传入的参数类型一致,也可以只更新部分参数
448
+ 用于更新一些参数的值,此方法的参数和初始化AprilComment时传入的参数类型一致,也可以只更新部分参数,传入的参数会以 ` 深拷贝 ` 的方式合并到当前options中
447
449
448
450
``` js
449
451
var ac = new AprilComment ({
You can’t perform that action at this time.
0 commit comments