mirror of
https://github.com/pengzhanbo/vuepress-theme-plume.git
synced 2026-04-23 10:58:13 +08:00
chore: tweak
This commit is contained in:
parent
e5a7fbce4d
commit
830bae053f
@ -1,13 +1,13 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import VPPostList from '@theme/Blog/VPPostList.vue'
|
||||
import VPBlogArchives from '@theme/Blog/VPBlogArchives.vue'
|
||||
import VPBlogAside from '@theme/Blog/VPBlogAside.vue'
|
||||
import VPBlogExtract from '@theme/Blog/VPBlogExtract.vue'
|
||||
import VPBlogTags from '@theme/Blog/VPBlogTags.vue'
|
||||
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
||||
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPTransitionFadeSlideY from '../VPTransitionFadeSlideY.vue'
|
||||
import VPPostList from './VPPostList.vue'
|
||||
import VPBlogArchives from './VPBlogArchives.vue'
|
||||
import VPBlogAside from './VPBlogAside.vue'
|
||||
import VPBlogExtract from './VPBlogExtract.vue'
|
||||
import VPBlogTags from './VPBlogTags.vue'
|
||||
import VPBlogNav from './VPBlogNav.vue'
|
||||
|
||||
const { theme, page } = useData()
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
||||
import { useArchives, useBlogExtract } from '../../composables/blog.js'
|
||||
import VPShortPostList from './VPShortPostList.vue'
|
||||
|
||||
const { archives: archivesLink } = useBlogExtract()
|
||||
const { archives } = useArchives()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import VPBlogNav from '@theme/Blog/VPBlogNav.vue'
|
||||
import VPBlogProfile from '@theme/Blog/VPBlogProfile.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPBlogNav from './VPBlogNav.vue'
|
||||
import VPBlogProfile from './VPBlogProfile.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -3,10 +3,10 @@ import { useScrollLock } from '@vueuse/core'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { useRoute, withBase } from 'vuepress/client'
|
||||
import { isLinkHttp } from 'vuepress/shared'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import { useBlogExtract } from '../../composables/blog.js'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import { inBrowser } from '../../utils/index.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
const route = useRoute()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRoute } from 'vuepress/client'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import { useBlogExtract } from '../../composables/blog.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
isLocal?: boolean
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
import { computed } from 'vue'
|
||||
import { withBase } from 'vuepress/client'
|
||||
import { isLinkHttp } from 'vuepress/shared'
|
||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPSocialLinks from '../VPSocialLinks.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
const avatar = computed(() => theme.value.avatar)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPShortPostList from '@theme/Blog/VPShortPostList.vue'
|
||||
import { useBlogExtract, useTags } from '../../composables/blog.js'
|
||||
import VPShortPostList from './VPShortPostList.vue'
|
||||
|
||||
const { tags, currentTag, postList, handleTagClick } = useTags()
|
||||
const { tags: tagsLink } = useBlogExtract()
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import type { PlumeThemeBlogPostItem } from '../../../shared/index.js'
|
||||
import { useTagColors } from '../../composables/tag-colors.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
post: PlumeThemeBlogPostItem
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import VPTransitionDrop from '@theme/VPTransitionDrop.vue'
|
||||
import VPPostItem from '@theme/Blog/VPPostItem.vue'
|
||||
import VPPagination from '@theme/Blog/VPPagination.vue'
|
||||
import { usePostListControl } from '../../composables/blog.js'
|
||||
import VPTransitionDrop from '../VPTransitionDrop.vue'
|
||||
import VPPostItem from './VPPostItem.vue'
|
||||
import VPPagination from './VPPagination.vue'
|
||||
|
||||
const {
|
||||
postList,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
|
||||
defineProps<{
|
||||
postList: {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { type Component, computed, nextTick, onUnmounted, resolveComponent, watch } from 'vue'
|
||||
import VPHomeBanner from '@theme/Home/VPHomeBanner.vue'
|
||||
import VPHomeHero from '@theme/Home/VPHomeHero.vue'
|
||||
import VPHomeFeatures from '@theme/Home/VPHomeFeatures.vue'
|
||||
import VPHomeTextImage from '@theme/Home/VPHomeTextImage.vue'
|
||||
import VPHomeProfile from '@theme/Home/VPHomeProfile.vue'
|
||||
import VPHomeCustom from '@theme/Home/VPHomeCustom.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPHomeBanner from './VPHomeBanner.vue'
|
||||
import VPHomeHero from './VPHomeHero.vue'
|
||||
import VPHomeFeatures from './VPHomeFeatures.vue'
|
||||
import VPHomeTextImage from './VPHomeTextImage.vue'
|
||||
import VPHomeProfile from './VPHomeProfile.vue'
|
||||
import VPHomeCustom from './VPHomeCustom.vue'
|
||||
|
||||
const components: Record<string, Component<any, any, any>> = {
|
||||
'banner': VPHomeBanner,
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
import { withBase } from 'vuepress/client'
|
||||
import { isLinkHttp } from 'vuepress/shared'
|
||||
import { computed } from 'vue'
|
||||
import VPButton from '@theme/VPButton.vue'
|
||||
import type { PlumeThemeHomeBanner } from '../../../shared/index.js'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPButton from '../VPButton.vue'
|
||||
|
||||
const props = defineProps<PlumeThemeHomeBanner>()
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { Content } from 'vuepress/client'
|
||||
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
||||
import type { PlumeThemeHomeCustom } from '../../../shared/index.js'
|
||||
import VPHomeBox from './VPHomeBox.vue'
|
||||
|
||||
const props = defineProps<PlumeThemeHomeCustom>()
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPImage from '@theme/VPImage.vue'
|
||||
import type { PlumeThemeHomeFeature } from '../../../shared/index.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPImage from '../VPImage.vue'
|
||||
|
||||
defineProps<PlumeThemeHomeFeature>()
|
||||
</script>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import VPHomeFeature from '@theme/Home/VPHomeFeature.vue'
|
||||
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
||||
import type { PlumeThemeHomeFeatures } from '../../../shared/index.js'
|
||||
import VPHomeFeature from './VPHomeFeature.vue'
|
||||
import VPHomeBox from './VPHomeBox.vue'
|
||||
|
||||
const props = defineProps<PlumeThemeHomeFeatures>()
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import { withBase } from 'vuepress/client'
|
||||
import { isLinkHttp } from 'vuepress/shared'
|
||||
import { computed, ref } from 'vue'
|
||||
import VPButton from '../VPButton.vue'
|
||||
import VPButton from '@theme/VPButton.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import { useHomeHeroTintPlate } from '../../composables/home.js'
|
||||
import type { PlumeThemeHomeHero } from '../../../shared/index.js'
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import VPImage from '@theme/VPImage.vue'
|
||||
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
||||
import type { PlumeThemeHomeProfile } from '../../../shared/index.js'
|
||||
import VPImage from '../VPImage.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPHomeBox from './VPHomeBox.vue'
|
||||
|
||||
const props = defineProps<PlumeThemeHomeProfile>()
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import VPImage from '@theme/VPImage.vue'
|
||||
import VPHomeBox from '@theme/Home/VPHomeBox.vue'
|
||||
import type { PlumeThemeHomeTextImage } from '../../../shared/index.js'
|
||||
import VPImage from '../VPImage.vue'
|
||||
import VPHomeBox from './VPHomeBox.vue'
|
||||
|
||||
const props = defineProps<PlumeThemeHomeTextImage>()
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, provide, watchEffect } from 'vue'
|
||||
import VPNavbar from '@theme/Nav/VPNavBar.vue'
|
||||
import VPNavScreen from '@theme/Nav/VPNavScreen.vue'
|
||||
import { useNav } from '../../composables/nav.js'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import { inBrowser } from '../../utils/index.js'
|
||||
import VPNavbar from './VPNavBar.vue'
|
||||
import VPNavScreen from './VPNavScreen.vue'
|
||||
|
||||
const { page, frontmatter } = useData()
|
||||
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
<script lang="ts" setup>
|
||||
import { useWindowScroll } from '@vueuse/core'
|
||||
import { ref, watchPostEffect } from 'vue'
|
||||
import { useSidebar } from '../../composables/sidebar.js'
|
||||
import VPNavBarAppearance from '@theme/Nav/VPNavBarAppearance.vue'
|
||||
import VPNavBarExtra from '@theme/Nav/VPNavBarExtra.vue'
|
||||
import VPNavBarHamburger from '@theme/Nav/VPNavBarHamburger.vue'
|
||||
import VPNavBarMenu from '@theme/Nav/VPNavBarMenu.vue'
|
||||
import VPNavBarSearch from '@theme/Nav/VPNavBarSearch.vue'
|
||||
import VPNavBarSocialLinks from '@theme/Nav/VPNavBarSocialLinks.vue'
|
||||
import VPNavBarTitle from '@theme/Nav/VPNavBarTitle.vue'
|
||||
import VPNavBarTranslations from '@theme/Nav/VPNavBarTranslations.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPNavBarAppearance from './VPNavBarAppearance.vue'
|
||||
import VPNavBarExtra from './VPNavBarExtra.vue'
|
||||
import VPNavBarHamburger from './VPNavBarHamburger.vue'
|
||||
import VPNavBarMenu from './VPNavBarMenu.vue'
|
||||
import VPNavBarSearch from './VPNavBarSearch.vue'
|
||||
import VPNavBarSocialLinks from './VPNavBarSocialLinks.vue'
|
||||
import VPNavBarTitle from './VPNavBarTitle.vue'
|
||||
import VPNavBarTranslations from './VPNavBarTranslations.vue'
|
||||
import { useSidebar } from '../../composables/sidebar.js'
|
||||
|
||||
defineProps<{
|
||||
isScreenOpen: boolean
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPSwitchAppearance from '../VPSwitchAppearance.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPFlyout from '@theme/VPFlyout.vue'
|
||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||
import { useLangs } from '../../composables/langs.js'
|
||||
import VPFlyout from '../VPFlyout.vue'
|
||||
import VPMenuLink from '../VPMenuLink.vue'
|
||||
import VPSocialLinks from '../VPSocialLinks.vue'
|
||||
import VPSwitchAppearance from '../VPSwitchAppearance.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
|
||||
const { theme } = useData()
|
||||
const { localeLinks, currentLang } = useLangs()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import VPNavBarMenuGroup from '@theme/Nav/VPNavBarMenuGroup.vue'
|
||||
import VPNavBarMenuLink from '@theme/Nav/VPNavBarMenuLink.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPNavBarMenuGroup from './VPNavBarMenuGroup.vue'
|
||||
import VPNavBarMenuLink from './VPNavBarMenuLink.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { resolveRouteFullPath } from 'vuepress/client'
|
||||
import VPFlyout from '@theme/VPFlyout.vue'
|
||||
import type { NavItem, NavItemWithChildren } from '../../../shared/index.js'
|
||||
import { isActive } from '../../utils/index.js'
|
||||
import VPFlyout from '../VPFlyout.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { resolveRoutePath } from 'vuepress/client'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import type { NavItemWithLink } from '../../../shared/index.js'
|
||||
import { isActive } from '../../utils/index.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPIcon from '../VPIcon.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
|
||||
defineProps<{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPSocialLinks from '../VPSocialLinks.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { useRouteLocale } from 'vuepress/client'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPImage from '@theme/VPImage.vue'
|
||||
import { useSidebar } from '../../composables/sidebar.js'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPImage from '../VPImage.vue'
|
||||
|
||||
const { theme, site } = useData()
|
||||
const { hasSidebar } = useSidebar()
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import VPFlyout from '@theme/VPFlyout.vue'
|
||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||
import { useLangs } from '../../composables/langs.js'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPFlyout from '../VPFlyout.vue'
|
||||
import VPMenuLink from '../VPMenuLink.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
const { currentLang, localeLinks } = useLangs()
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import { useScrollLock } from '@vueuse/core'
|
||||
import VPNavScreenAppearance from '@theme/Nav/VPNavScreenAppearance.vue'
|
||||
import VPNavScreenMenu from '@theme/Nav/VPNavScreenMenu.vue'
|
||||
import VPNavScreenSocialLinks from '@theme/Nav/VPNavScreenSocialLinks.vue'
|
||||
import VPNavScreenTranslates from '@theme/Nav/VPNavScreenTranslations.vue'
|
||||
import { inBrowser } from '../../utils/index.js'
|
||||
import VPNavScreenAppearance from './VPNavScreenAppearance.vue'
|
||||
import VPNavScreenMenu from './VPNavScreenMenu.vue'
|
||||
import VPNavScreenSocialLinks from './VPNavScreenSocialLinks.vue'
|
||||
import VPNavScreenTranslates from './VPNavScreenTranslations.vue'
|
||||
|
||||
defineProps<{
|
||||
open: boolean
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPSwitchAppearance from '@theme/VPSwitchAppearance.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPSwitchAppearance from '../VPSwitchAppearance.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import VPNavScreenMenuGroup from '@theme/Nav/VPNavScreenMenuGroup.vue'
|
||||
import VPNavScreenMenuLink from '@theme/Nav/VPNavScreenMenuLink.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPNavScreenMenuGroup from './VPNavScreenMenuGroup.vue'
|
||||
import VPNavScreenMenuLink from './VPNavScreenMenuLink.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import VPIcon from '../VPIcon.vue'
|
||||
import VPNavScreenMenuGroupLink from './VPNavScreenMenuGroupLink.vue'
|
||||
import VPNavScreenMenuGroupSection from './VPNavScreenMenuGroupSection.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import VPNavScreenMenuGroupLink from '@theme/Nav/VPNavScreenMenuGroupLink.vue'
|
||||
import VPNavScreenMenuGroupSection from '@theme/Nav/VPNavScreenMenuGroupSection.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
text: string
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { inject } from 'vue'
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPIcon from '../VPIcon.vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
|
||||
defineProps<{
|
||||
icon?: string | { svg: string }
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import VPNavScreenMenuGroupLink from '@theme/Nav/VPNavScreenMenuGroupLink.vue'
|
||||
import type { NavItemWithLink } from '../../../shared/index.js'
|
||||
import VPIcon from '../VPIcon.vue'
|
||||
import VPNavScreenMenuGroupLink from './VPNavScreenMenuGroupLink.vue'
|
||||
|
||||
defineProps<{
|
||||
icon?: string | { svg: string }
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { inject } from 'vue'
|
||||
import VPLink from '../VPLink.vue'
|
||||
import VPIcon from '../VPIcon.vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
|
||||
defineProps<{
|
||||
text: string
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPSocialLinks from '@theme/VPSocialLinks.vue'
|
||||
import { useData } from '../../composables/data.js'
|
||||
import VPSocialLinks from '../VPSocialLinks.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import { useLangs } from '../../composables/langs.js'
|
||||
import VPLink from '../VPLink.vue'
|
||||
|
||||
const { localeLinks, currentLang } = useLangs()
|
||||
const isOpen = ref(false)
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import VPBlog from '@theme/Blog/VPBlog.vue'
|
||||
import VPDoc from '@theme/VPDoc.vue'
|
||||
import VPPage from '@theme/VPPage.vue'
|
||||
import VPHome from '@theme/Home/VPHome.vue'
|
||||
import VPFriends from '@theme/VPFriends.vue'
|
||||
import { useData, useSidebar } from '../composables/index.js'
|
||||
import VPBlog from './Blog/VPBlog.vue'
|
||||
import VPDoc from './VPDoc.vue'
|
||||
import VPPage from './VPPage.vue'
|
||||
import VPHome from './Home/VPHome.vue'
|
||||
import VPFriends from './VPFriends.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
isNotFound?: boolean
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { useRoute } from 'vuepress/client'
|
||||
import { useData } from '../composables/data.js'
|
||||
import { useSidebar } from '../composables/sidebar.js'
|
||||
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
||||
import VPDocAside from '@theme/VPDocAside.vue'
|
||||
import VPDocFooter from '@theme/VPDocFooter.vue'
|
||||
import VPEncryptPage from '@theme/VPEncryptPage.vue'
|
||||
import VPDocMeta from '@theme/VPDocMeta.vue'
|
||||
import { usePageEncrypt } from '../composables/encrypt.js'
|
||||
import VPTransitionFadeSlideY from './VPTransitionFadeSlideY.vue'
|
||||
import VPDocAside from './VPDocAside.vue'
|
||||
import VPDocFooter from './VPDocFooter.vue'
|
||||
import VPEncryptPage from './VPEncryptPage.vue'
|
||||
import VPDocMeta from './VPDocMeta.vue'
|
||||
import { useSidebar } from '../composables/sidebar.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
|
||||
const { page, theme, frontmatter, isDark } = useData()
|
||||
const route = useRoute()
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import VPDocAsideOutline from './VPDocAsideOutline.vue'
|
||||
import VPDocAsideOutline from '@theme/VPDocAsideOutline.vue'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref } from 'vue'
|
||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
||||
import { type MenuItem, getHeaders, useActiveAnchor } from '../composables/outline.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPDocOutlineItem from './VPDocOutlineItem.vue'
|
||||
|
||||
const { theme, frontmatter } = useData()
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import {
|
||||
useContributors,
|
||||
useEditNavLink,
|
||||
@ -7,7 +8,6 @@ import {
|
||||
usePageNav,
|
||||
} from '../composables/page.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPLink from './VPLink.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
const editNavLink = useEditNavLink()
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import VPFooter from '@theme/VPFooter.vue'
|
||||
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
||||
import { useData } from '../composables/data.js'
|
||||
import { useGlobalEncrypt } from '../composables/encrypt.js'
|
||||
import VPFooter from './VPFooter.vue'
|
||||
import VPEncryptForm from './VPEncryptForm.vue'
|
||||
|
||||
const { theme, site } = useData()
|
||||
const { compareGlobal } = useGlobalEncrypt()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import VPEncryptForm from '@theme/VPEncryptForm.vue'
|
||||
import { usePageEncrypt } from '../composables/encrypt.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPEncryptForm from './VPEncryptForm.vue'
|
||||
|
||||
const { theme } = useData()
|
||||
const { comparePage } = usePageEncrypt()
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import VPMenu from '@theme/VPMenu.vue'
|
||||
import { useFlyout } from '../composables/flyout.js'
|
||||
import VPIcon from './VPIcon.vue'
|
||||
import VPMenu from './VPMenu.vue'
|
||||
|
||||
defineProps<{
|
||||
prefixIcon?: string | { svg: string }
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPFriendsItem from '@theme/VPFriendsItem.vue'
|
||||
import VPFriendsGroup from '@theme/VPFriendsGroup.vue'
|
||||
import { useEditNavLink } from '../composables/page.js'
|
||||
import VPLink from './VPLink.vue'
|
||||
import VPFriendsItem from './VPFriendsItem.vue'
|
||||
import VPFriendsGroup from './VPFriendsGroup.vue'
|
||||
import { useData } from '../composables/data.js'
|
||||
|
||||
const editNavLink = useEditNavLink()
|
||||
const { frontmatter: matter } = useData<'friends'>()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPFriendsItem from '@theme/VPFriendsItem.vue'
|
||||
import type { FriendGroup } from '../../shared/index.js'
|
||||
import VPFriendsItem from './VPFriendsItem.vue'
|
||||
|
||||
defineProps<{
|
||||
group: FriendGroup
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { isPlainObject } from '@vuepress/helper/client'
|
||||
import { computed } from 'vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import type { FriendsItem } from '../../shared/index'
|
||||
import { useDarkMode } from '../composables/dark-mode.js'
|
||||
import VPLink from './VPLink.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
friend: FriendsItem
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
import { useWindowScroll } from '@vueuse/core'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { onContentUpdated } from '@vuepress-plume/plugin-content-update/client'
|
||||
import VPLocalNavOutlineDropdown from '@theme/VPLocalNavOutlineDropdown.vue'
|
||||
import { useSidebar } from '../composables/sidebar.js'
|
||||
import { type MenuItem, getHeaders } from '../composables/outline.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPLocalNavOutlineDropdown from './VPLocalNavOutlineDropdown.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
open: boolean
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { onClickOutside } from '@vueuse/core'
|
||||
import { nextTick, ref, watch } from 'vue'
|
||||
import VPDocOutlineItem from '@theme/VPDocOutlineItem.vue'
|
||||
import type { MenuItem } from '../composables/outline.js'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPDocOutlineItem from './VPDocOutlineItem.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
headers: MenuItem[]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPMenuGroup from './VPMenuGroup.vue'
|
||||
import VPMenuLink from './VPMenuLink.vue'
|
||||
import VPMenuGroup from '@theme/VPMenuGroup.vue'
|
||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||
|
||||
defineProps<{
|
||||
items?: any[]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPIcon from './VPIcon.vue'
|
||||
import VPMenuLink from './VPMenuLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import VPMenuLink from '@theme/VPMenuLink.vue'
|
||||
|
||||
defineProps<{
|
||||
text?: string
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import { useData } from '../composables/data.js'
|
||||
import { isActive } from '../utils/index.js'
|
||||
import VPLink from './VPLink.vue'
|
||||
import VPIcon from './VPIcon.vue'
|
||||
|
||||
defineProps<{
|
||||
item: any
|
||||
|
||||
@ -2,10 +2,10 @@
|
||||
import { useScrollLock } from '@vueuse/core'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { useRoutePath } from 'vuepress/client'
|
||||
import VPSidebarItem from '@theme/VPSidebarItem.vue'
|
||||
import VPTransitionFadeSlideY from '@theme/VPTransitionFadeSlideY.vue'
|
||||
import { useSidebar } from '../composables/sidebar.js'
|
||||
import { inBrowser } from '../utils/index.js'
|
||||
import VPSidebarItem from './VPSidebarItem.vue'
|
||||
import VPTransitionFadeSlideY from './VPTransitionFadeSlideY.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
open: boolean
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import type { NotesSidebarItem } from '@vuepress-plume/plugin-notes-data'
|
||||
import { computed } from 'vue'
|
||||
import VPLink from '@theme/VPLink.vue'
|
||||
import VPIcon from '@theme/VPIcon.vue'
|
||||
import { useSidebarControl } from '../composables/sidebar.js'
|
||||
import VPLink from './VPLink.vue'
|
||||
import VPIcon from './VPIcon.vue'
|
||||
|
||||
const props = defineProps<{
|
||||
item: NotesSidebarItem
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import VPSocialLink from '@theme/VPSocialLink.vue'
|
||||
import type { SocialLink as SocialLinkType } from '../../shared/index.js'
|
||||
import VPSocialLink from './VPSocialLink.vue'
|
||||
|
||||
defineProps<{
|
||||
links: SocialLinkType[]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, ref } from 'vue'
|
||||
import VPSwitch from '@theme/VPSwitch.vue'
|
||||
import { useData } from '../composables/data.js'
|
||||
import VPSwitch from './VPSwitch.vue'
|
||||
|
||||
const checked = ref(false)
|
||||
const { theme, isDark } = useData()
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { Page, Theme } from 'vuepress/core'
|
||||
import { fs } from 'vuepress/utils'
|
||||
import { isPlainObject } from '@vuepress/helper'
|
||||
import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js'
|
||||
import { getPlugins } from './plugins/index.js'
|
||||
@ -43,6 +44,20 @@ export function plumeTheme({
|
||||
|
||||
clientConfigFile: resolve('client/config.js'),
|
||||
|
||||
alias: {
|
||||
...Object.fromEntries(
|
||||
fs.readdirSync(
|
||||
resolve('client/components'),
|
||||
{ encoding: 'utf-8', recursive: true },
|
||||
)
|
||||
.filter(file => file.endsWith('.vue'))
|
||||
.map(file => [
|
||||
`@theme/${file}`,
|
||||
resolve('client/components', file),
|
||||
]),
|
||||
),
|
||||
},
|
||||
|
||||
plugins: getPlugins({ app, pluginOptions, localeOptions, encrypt, hostname }),
|
||||
|
||||
onInitialized: async (app) => {
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
],
|
||||
"vuepress-plugin-md-power": [
|
||||
"./plugins/plugin-md-power/src/node/index.ts"
|
||||
],
|
||||
"@theme/*": [
|
||||
"./theme/src/client/components/*"
|
||||
]
|
||||
},
|
||||
"types": ["webpack-env", "vite/client", "vuepress/client-types"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user