chore: 是否文章判断

This commit is contained in:
xiaozzzi 2024-01-19 04:00:26 +08:00
parent 742ff035c1
commit 1b437b371b

View File

@ -1,3 +1,4 @@
import { isNull } from '@renderer/assets/utils/obj'
import Notify from '@renderer/scripts/notify'
import { isEmpty } from 'lodash'
import { Ref } from 'vue'
@ -36,6 +37,21 @@ export enum SortLevelColor {
FOUR = '#4AA40E93'
}
/**
*
* @param doc
* @returns true: ; false:
*/
export const isArticle = (doc: DocInfo | undefined): boolean => {
if (isNull(doc)) {
return false
}
if (isNull(doc!.type) || doc!.type != 3) {
return false
}
return true
}
/**
*
* @param level