Skip to content

client

Modules

ModuleDescription
dayjs-

Interfaces

InterfaceDescription
BaseCategory基础分类
CategoryList-
CollectionConfig-
GetHeadersOptions-
Header-
ScrollToOptions-

Type Aliases

Type AliasDescription
AppContext-
AppSetup-
Categories-
Category-
MenuItem-
MermaidOptions-
MermaidSetup-
Tags-
UserModule-

Variables

VariableDescription
cdnPrefix-
contentUpdatedCallbacks-
dataSymbol-
emptyAddonName-
EXTERNAL_URL_RE-
LOCALE_PREFIX标识这是一个使用国际化的 key 从 locales/ 目录中获取对应的翻译
name-
resolvedHeaders-
runContentUpdated-
useAppStoreGlobal store for users
useCategory-
useRouterStore-
useSiteStorecache site global store - post - tag - category
useTag-
valaxyConfigRef-
valaxyConfigSymbol-
valaxyContextRef-

Functions

FunctionDescription
addToParent-
asAny-
buildTree-
dayjs-
defineAppSetup-
defineCollection-
defineMermaidSetup-
formatDateformat the date (dayjs) with default timezone
getHeadersget headers from document directly
initContext-
initValaxyConfig-
isCategoryListFor theme development, you can use this function to determine whether the category is a category list.
isEmptyAddon-
onClickHref-
onContentUpdatedRegister callback that is called every time the markdown content is updated in the DOM.
parseRangeString1,3-5,8 => [1, 3, 4, 5, 8]
random生成介于 min 与 max 之间的随机数
removeItemFromCategoryremove item from category
resolveHeaders-
runCbs-
scrollToFor theme developers, you can use this function to scroll to the target element. For example, when you click the anchor link in the markdown file, it will scroll to the target element.
serializeHeader-
sleep等待指定时间 (ms)
sortByDatesort posts by date
throttleAndDebounce-
tObjecttranslate object
useActiveAnchor-
useAplayeruse MetingJS and Aplayer
useBackback to previous page or home page
useBackToTopYou can use href="#" to back to top
useCategoriesget categories from posts category: A/B/C { name: 'A', total: 1, children: [ { name: 'B' total: 1, children: [{ name: 'C', total: 1, children: [{ title: '' }] }] } ] }
useCodePen-
useCollapseCode折叠代码块(允许设置最大高度)
useCollection获取当前集合
useCollectionsComposable for Collections /collections/:collectionId/:slug
useConfigalias for useSite
useCopyCode-
useDatainject pageData
useDecrypt-
useEncryptedContent获取加密文章数据
useEncryptedPhotosencryptedPhotos 获取加密相册数据
useFrontmatterGet route.meta.frontmatter from your markdown file
useFullUrlget full url
useFuseSearch-
useInvisibleElementtrigger show invisible element
useLayout-
useLocale-
useLocaleTitleget locale title
useMediumZoom-
useMobileis mobile media query
useOutlineexport headers & handleClick to generate outline
usePageListget all page in 'pages' folder
usePagination-
usePartiallyEncryptedContents获取部分加密内容
usePostListget post list in 'pages/posts' folder todo: use vue provide/inject to global
usePostTitle-
usePrevNextget prev and next post
useRuntimeConfig-
useScreenSizebreakpoints ref https://tailwindcss.com/docs/screens
useSidebarhelper for sidebar
useSiteConfigget valaxy config
useTagsget tag map [tagName]: count
useValaxyApp-
useValaxyConfigget valaxy config
useValaxyDark-
useValaxyHead-
useValaxyI18n$locale: 开头的 key 会被认为是国际化的 key 会从 locales/ 目录中获取对应的翻译
wrapwrap node
wrapTable包裹表格,添加 class 以控制 table 样式