artalk 2.2.10 → 2.2.11
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/dist/Artalk.es.js +7 -5
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/package.json +1 -1
- package/src/components/list-lite.ts +4 -1
- package/src/defaults.ts +4 -2
- package/types/artalk-config.d.ts +3 -0
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@ export default class ListLite extends Component {
|
|
|
25
25
|
public flatMode = false
|
|
26
26
|
|
|
27
27
|
/** 嵌套模式 */
|
|
28
|
-
public nestSortBy
|
|
28
|
+
public nestSortBy!: ListNest.SortByType
|
|
29
29
|
|
|
30
30
|
/** 分页 */
|
|
31
31
|
public pageMode: 'pagination'|'read-more' = 'pagination'
|
|
@@ -58,6 +58,9 @@ export default class ListLite extends Component {
|
|
|
58
58
|
// 评论为空时显示字符
|
|
59
59
|
if (ctx.conf.noComment) this.noCommentText = ctx.conf.noComment
|
|
60
60
|
|
|
61
|
+
// 嵌套排序方式
|
|
62
|
+
this.nestSortBy = this.ctx.conf.nestSort || 'DATE_ASC'
|
|
63
|
+
|
|
61
64
|
// 评论时间自动更新
|
|
62
65
|
window.setInterval(() => {
|
|
63
66
|
this.$el.querySelectorAll<HTMLElement>('[data-atk-comment-date]').forEach(el => {
|
package/src/defaults.ts
CHANGED
|
@@ -12,6 +12,10 @@ const defaults: ArtalkConfig = {
|
|
|
12
12
|
darkMode: false,
|
|
13
13
|
editorTravel: true,
|
|
14
14
|
|
|
15
|
+
flatMode: 'auto',
|
|
16
|
+
nestMax: 2,
|
|
17
|
+
nestSort: 'DATE_ASC',
|
|
18
|
+
|
|
15
19
|
emoticons: "https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json",
|
|
16
20
|
|
|
17
21
|
vote: true,
|
|
@@ -19,8 +23,6 @@ const defaults: ArtalkConfig = {
|
|
|
19
23
|
uaBadge: true,
|
|
20
24
|
listSort: true,
|
|
21
25
|
pvEl: '#ArtalkPV',
|
|
22
|
-
flatMode: 'auto',
|
|
23
|
-
nestMax: 2,
|
|
24
26
|
|
|
25
27
|
gravatar: {
|
|
26
28
|
default: 'mp',
|