client
Modules
Module | Description |
---|---|
dayjs | - |
Interfaces
Interface | Description |
---|---|
BaseCategory | 基础分类 |
CategoryList | - |
CollectionConfig | - |
GetHeadersOptions | - |
Header | - |
ScrollToOptions | - |
Type Aliases
Type Alias | Description |
---|---|
AppContext | - |
AppSetup | - |
Categories | - |
Category | - |
MenuItem | - |
MermaidOptions | - |
MermaidSetup | - |
Tags | - |
UserModule | - |
Variables
Variable | Description |
---|---|
cdnPrefix | - |
contentUpdatedCallbacks | - |
dataSymbol | - |
emptyAddonName | - |
EXTERNAL_URL_RE | - |
LOCALE_PREFIX | 标识这是一个使用国际化的 key 从 locales/ 目录中获取对应的翻译 |
name | - |
resolvedHeaders | - |
runContentUpdated | - |
useAppStore | Global store for users |
- | |
useRouterStore | - |
useSiteStore | cache site global store - post - tag - category |
- | |
valaxyConfigRef | - |
valaxyConfigSymbol | - |
valaxyContextRef | - |
Functions
Function | Description |
---|---|
addToParent | - |
asAny | - |
buildTree | - |
dayjs | - |
defineAppSetup | - |
defineCollection | - |
defineMermaidSetup | - |
formatDate | format the date (dayjs) with default timezone |
getHeaders | get headers from document directly |
initContext | - |
initValaxyConfig | - |
isCategoryList | For theme development, you can use this function to determine whether the category is a category list. |
isEmptyAddon | - |
onClickHref | - |
onContentUpdated | Register callback that is called every time the markdown content is updated in the DOM. |
parseRangeString | 1,3-5,8 => [1, 3, 4, 5, 8] |
random | 生成介于 min 与 max 之间的随机数 |
removeItemFromCategory | remove item from category |
resolveHeaders | - |
runCbs | - |
scrollTo | For 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) |
sortByDate | sort posts by date |
throttleAndDebounce | - |
tObject | translate object |
useActiveAnchor | - |
use MetingJS and Aplayer | |
useBack | back to previous page or home page |
useBackToTop | You can use href="#" to back to top |
useCategories | get categories from posts category: A/B/C { name: 'A', total: 1, children: [ { name: 'B' total: 1, children: [{ name: 'C', total: 1, children: [{ title: '' }] }] } ] } |
- | |
useCollapseCode | 折叠代码块(允许设置最大高度) |
useCollection | 获取当前集合 |
useCollections | Composable for Collections /collections/:collectionId/:slug |
useConfig | alias for useSite |
useCopyCode | - |
useData | inject pageData |
useDecrypt | - |
useEncryptedContent | 获取加密文章数据 |
useEncryptedPhotos | encryptedPhotos 获取加密相册数据 |
useFrontmatter | Get route.meta.frontmatter from your markdown file |
useFullUrl | get full url |
useFuseSearch | - |
useInvisibleElement | trigger show invisible element |
useLayout | - |
useLocale | - |
useLocaleTitle | get locale title |
useMediumZoom | - |
useMobile | is mobile media query |
useOutline | export headers & handleClick to generate outline |
usePageList | get all page in 'pages' folder |
usePagination | - |
usePartiallyEncryptedContents | 获取部分加密内容 |
usePostList | get post list in 'pages/posts' folder todo: use vue provide/inject to global |
usePostTitle | - |
usePrevNext | get prev and next post |
useRuntimeConfig | - |
useScreenSize | breakpoints ref https://tailwindcss.com/docs/screens |
useSidebar | helper for sidebar |
useSiteConfig | get valaxy config |
useTags | get tag map [tagName]: count |
useValaxyApp | - |
useValaxyConfig | get valaxy config |
useValaxyDark | - |
useValaxyHead | - |
useValaxyI18n | 以 $locale: 开头的 key 会被认为是国际化的 key 会从 locales/ 目录中获取对应的翻译 |
wrap | wrap node |
wrapTable | 包裹表格,添加 class 以控制 table 样式 |