Skip to content

Commit 2dbc6cc

Browse files
committed
fix: rename count to itemCount
1 parent 6916eea commit 2dbc6cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/model/post-cat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export class PostCat {
55
visible = true
66
description = ''
77
updateTime: Date = new Date()
8-
count = 0
8+
itemCount = 0
99
order?: number
1010
childCount = 0
1111
visibleChildCount = 0
@@ -31,4 +31,4 @@ export type PostCatAddDto = {
3131
visible: boolean
3232
description: string
3333
}
34-
export type PostCatUpdateDto = Pick<PostCat, 'categoryId' | 'description' | 'count' | 'title' | 'order' | 'visible'>
34+
export type PostCatUpdateDto = Pick<PostCat, 'categoryId' | 'description' | 'itemCount' | 'title' | 'order' | 'visible'>

src/tree-view/convert.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ const postConverter: Converter<Post> = obj => {
5151
})
5252
}
5353

54-
const categoryConverter: Converter<PostCat> = ({ title, count }) =>
55-
Object.assign<TreeItem, TreeItem>(new TreeItem(`${title}(${count})`), {
56-
collapsibleState: count > 0 ? TreeItemCollapsibleState.Collapsed : TreeItemCollapsibleState.None,
54+
const categoryConverter: Converter<PostCat> = ({ title, itemCount }) =>
55+
Object.assign<TreeItem, TreeItem>(new TreeItem(`${title}(${itemCount})`), {
56+
collapsibleState: itemCount > 0 ? TreeItemCollapsibleState.Collapsed : TreeItemCollapsibleState.None,
5757
iconPath: categoryIcon(),
5858
contextValue: 'cnb-post-category',
5959
})

0 commit comments

Comments
 (0)