Skip to content

Commit

Permalink
chore: update intro
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed May 28, 2024
1 parent 8233ca8 commit 90b2639
Show file tree
Hide file tree
Showing 4 changed files with 6,094 additions and 4,779 deletions.
140 changes: 11 additions & 129 deletions .valaxy/typed-router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,18 @@
// It's recommended to commit this file.
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.

/// <reference types="unplugin-vue-router/client" />
declare module 'vue-router/auto-routes' {
import type {
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,
} from 'unplugin-vue-router/types'

import type {
// type safe route locations
RouteLocationTypedList,
RouteLocationResolvedTypedList,
RouteLocationNormalizedTypedList,
RouteLocationNormalizedLoadedTypedList,
RouteLocationAsString,
RouteLocationAsRelativeTypedList,
RouteLocationAsPathTypedList,

// helper types
// route definitions
RouteRecordInfo,
ParamValue,
ParamValueOneOrMore,
ParamValueZeroOrMore,
ParamValueZeroOrOne,

// vue-router extensions
_RouterTyped,
RouterLinkTyped,
RouterLinkPropsTyped,
NavigationGuard,
UseLinkFnTyped,

// data fetching
_DataLoader,
_DefineLoaderOptions,
} from 'unplugin-vue-router/types'

declare module 'vue-router/auto/routes' {
/**
* Route name map generated by unplugin-vue-router
*/
export interface RouteNamedMap {
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
'/_drafts/a-story-about-coc-22': RouteRecordInfo<'/_drafts/a-story-about-coc-22', '/_drafts/a-story-about-coc-22', Record<never, never>, Record<never, never>>,
Expand Down Expand Up @@ -162,100 +141,3 @@ declare module 'vue-router/auto/routes' {
'/tags/': RouteRecordInfo<'/tags/', '/tags', Record<never, never>, Record<never, never>>,
}
}

declare module 'vue-router/auto' {
import type { RouteNamedMap } from 'vue-router/auto/routes'

export type RouterTyped = _RouterTyped<RouteNamedMap>

/**
* Type safe version of `RouteLocationNormalized` (the type of `to` and `from` in navigation guards).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationNormalized<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationNormalizedTypedList<RouteNamedMap>[Name]

/**
* Type safe version of `RouteLocationNormalizedLoaded` (the return type of `useRoute()`).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationNormalizedLoaded<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[Name]

/**
* Type safe version of `RouteLocationResolved` (the returned route of `router.resolve()`).
* Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationResolved<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationResolvedTypedList<RouteNamedMap>[Name]

/**
* Type safe version of `RouteLocation` . Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocation<Name extends keyof RouteNamedMap = keyof RouteNamedMap> = RouteLocationTypedList<RouteNamedMap>[Name]

/**
* Type safe version of `RouteLocationRaw` . Allows passing the name of the route to be passed as a generic.
*/
export type RouteLocationRaw<Name extends keyof RouteNamedMap = keyof RouteNamedMap> =
| RouteLocationAsString<RouteNamedMap>
| RouteLocationAsRelativeTypedList<RouteNamedMap>[Name]
| RouteLocationAsPathTypedList<RouteNamedMap>[Name]

/**
* Generate a type safe params for a route location. Requires the name of the route to be passed as a generic.
*/
export type RouteParams<Name extends keyof RouteNamedMap> = RouteNamedMap[Name]['params']
/**
* Generate a type safe raw params for a route location. Requires the name of the route to be passed as a generic.
*/
export type RouteParamsRaw<Name extends keyof RouteNamedMap> = RouteNamedMap[Name]['paramsRaw']

export function useRouter(): RouterTyped
export function useRoute<Name extends keyof RouteNamedMap = keyof RouteNamedMap>(name?: Name): RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[Name]

export const useLink: UseLinkFnTyped<RouteNamedMap>

export function onBeforeRouteLeave(guard: NavigationGuard<RouteNamedMap>): void
export function onBeforeRouteUpdate(guard: NavigationGuard<RouteNamedMap>): void

export const RouterLink: RouterLinkTyped<RouteNamedMap>
export const RouterLinkProps: RouterLinkPropsTyped<RouteNamedMap>

// Experimental Data Fetching

export function defineLoader<
P extends Promise<any>,
Name extends keyof RouteNamedMap = keyof RouteNamedMap,
isLazy extends boolean = false,
>(
name: Name,
loader: (route: RouteLocationNormalizedLoaded<Name>) => P,
options?: _DefineLoaderOptions<isLazy>,
): _DataLoader<Awaited<P>, isLazy>
export function defineLoader<
P extends Promise<any>,
isLazy extends boolean = false,
>(
loader: (route: RouteLocationNormalizedLoaded) => P,
options?: _DefineLoaderOptions<isLazy>,
): _DataLoader<Awaited<P>, isLazy>

export {
_definePage as definePage,
_HasDataLoaderMeta as HasDataLoaderMeta,
_setupDataFetchingGuard as setupDataFetchingGuard,
_stopDataFetchingScope as stopDataFetchingScope,
} from 'unplugin-vue-router/runtime'
}

declare module 'vue-router' {
import type { RouteNamedMap } from 'vue-router/auto/routes'

export interface TypesConfig {
beforeRouteUpdate: NavigationGuard<RouteNamedMap>
beforeRouteLeave: NavigationGuard<RouteNamedMap>

$route: RouteLocationNormalizedLoadedTypedList<RouteNamedMap>[keyof RouteNamedMap]
$router: _RouterTyped<RouteNamedMap>

RouterLink: RouterLinkTyped<RouteNamedMap>
}
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "2.0.0",
"private": true,
"packageManager": "pnpm@8.15.2",
"packageManager": "pnpm@9.1.3",
"description": "YunYouJun Blog",
"author": {
"email": "[email protected]",
Expand Down Expand Up @@ -44,18 +44,18 @@
"typecheck": "vue-tsc --noEmit"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.4",
"@antfu/eslint-config": "^2.19.1",
"@explosions/fireworks": "^0.0.2",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"typescript": "^5.3.3",
"valaxy": "^0.18.1",
"eslint": "^9.3.0",
"typescript": "^5.4.5",
"valaxy": "^0.18.7",
"valaxy-addon-algolia": "^0.0.3",
"valaxy-addon-components": "^0.0.2",
"valaxy-addon-waline": "^0.1.1",
"valaxy-theme-yun": "^0.18.1",
"valaxy-addon-waline": "^0.1.4",
"valaxy-theme-yun": "^0.18.7",
"vite-plugin-remote-assets": "^0.4.1",
"vue-gtag-next": "^1.14.0",
"vue-tsc": "^1.8.27"
"vue-tsc": "^2.0.19"
}
}
21 changes: 11 additions & 10 deletions pages/about/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,28 @@ iconify: true
</div>
</div>

> ~~24 岁,是学生。死宅二次元。~~ 成长 ing。
> <span class="heimu">在下年满十八,遵纪守法,爱国爱家,不碰烟酒,善养鸡鸭,多素少荤,爱吃西瓜。</span>
<!-- -->

见字如面,很高兴能够在此与你相遇。
<div class="bg-$smc-c-text hover:bg-$va-c-bg transition">= =|| 以前的自我介绍怎么这么中二啊,删掉了……</div>

> 见字如面,很高兴能够在此与你相遇。
简单做一下自我介绍:

<img src="https://cdn.jsdelivr.net/gh/YunYouJun/yun/images/yun-alpha-compressed.webp" width="200" alt="小云" />_[不是本人,是看板娘小云](https://github.com/YunYouJun/yun)_
<img src="https://cdn.jsdelivr.net/gh/YunYouJun/yun/images/yun-alpha-compressed.webp" width="200" alt="小云" />_[并非本人,但小云很可爱](https://github.com/YunYouJun/yun)_

我目前是国内的一名在读研究生,主修计算机专业,也辅修过动画,但可惜学艺不精。
业余热衷开源与前端方面,主要包括写各种奇奇怪怪的小网站(雾)和开源项目,也有尝试写一些科幻小说。(还是个死宅二次元)
对了,目前我也是 [Element Plus](https://github.com/element-plus/element-plus) 团队成员,不知有没有听说过?
我目前是某互联网公司的一名前端工程师,~~打工牛马~~
业余热衷开源与前端方面,[Element Plus](https://github.com/element-plus/element-plus) Maintainer,此外也喜欢写各种奇奇怪怪的小网站(雾)和开源项目,有尝试写一些科幻小说。(还是个死宅二次元)

我喜欢夏日冰凉的西瓜、在悠闲的午后睡觉,以及像哆啦 A 梦一样可以承载想象的动漫与科幻故事,还有可爱又有趣的女孩子,啊不对,是一切有趣的事物。我也想希望自己可以成为一个有趣的人,并创造出可以成为他人回忆的事物。
我喜欢夏日冰凉的西瓜、在悠闲的午后睡觉,以及像哆啦 A 梦一样可以承载想象的动漫与科幻故事,~~还有可爱又有趣的女孩子,啊不对,~~是一切有趣的事物。
我也想希望自己可以成为一个有趣的人,并创造出可以成为他人回忆的事物。

> 但凡人能想象到的事物,必定有人能将它实现。
> ——儒勒·凡尔纳
目前养家糊口的目标是成为一名可以独当一面的前端工程师,不出意外的话明年毕业应该会加入支付宝的蚂蚁互动团队,主要业务就是大家可能有所耳闻的蚂蚁森林、蚂蚁庄园以及过年时候的五福打年兽之类的内容啦。
<!-- TODO 善养鸡鸭 -->

当然我也有几个隐藏的有些不切实际的梦想,比如成为一名独立游戏开发者、漫画家、作家、动画人、全职开源作者。
当然我也有许多不切实际的梦想,比如成为一名独立游戏开发者、漫画家、作家、动画人、全职开源作者。
简而言之就是可以不用上班,自己在家做觉得有趣的事情的人!(想必大家也是)

~~欢迎给我[打钱](https://sponsors.yunyoujun.cn),助我圆梦!~~
Expand Down
Loading

0 comments on commit 90b2639

Please sign in to comment.