diff --git a/docs/themes/default/extending.md b/docs/themes/default/extending.md index c4b45f2504..857d3ae34a 100644 --- a/docs/themes/default/extending.md +++ b/docs/themes/default/extending.md @@ -87,7 +87,7 @@ export default defineUserConfig({ ## Modifying Behavior -Most of the core behaviors of the default theme have been extracted into a composable API, and also provide [aliases](https://v2.vuepress.vuejs.org/zh/reference/plugin-api.html#alias) with the `@theme` prefix. +Most of the core behaviors of the default theme have been extracted into a composable API or util function, and also provide [aliases](https://v2.vuepress.vuejs.org/zh/reference/plugin-api.html#alias) with the `@theme` prefix. For example, if you want to add some default values ​​to the theme data of the default theme, you can override the `useThemeData` function of `@theme/useThemeData`. diff --git a/docs/zh/themes/default/extending.md b/docs/zh/themes/default/extending.md index 3c409790d8..1228ef1a66 100644 --- a/docs/zh/themes/default/extending.md +++ b/docs/zh/themes/default/extending.md @@ -87,7 +87,7 @@ export default defineUserConfig({ ## 修改行为 -默认主题的核心行为大多都被抽离成可组合式 API,并同样提供了 `@theme` 前缀的 [alias](https://v2.vuepress.vuejs.org/zh/reference/plugin-api.html#alias)。 +默认主题的核心行为大多都被抽离成可组合式 API 或工具函数,并同样提供了 `@theme` 前缀的 [alias](https://v2.vuepress.vuejs.org/zh/reference/plugin-api.html#alias)。 比如,如果你想为默认主题的主题数据添加一些默认值,你可以通过覆盖 `@theme/useThemeData` 的 `useThemeData` 函数来实现。 diff --git a/themes/theme-default/src/client/components/VPAutoLink.vue b/themes/theme-default/src/client/components/VPAutoLink.vue new file mode 100644 index 0000000000..7862a6b703 --- /dev/null +++ b/themes/theme-default/src/client/components/VPAutoLink.vue @@ -0,0 +1,32 @@ + + + diff --git a/themes/theme-default/src/client/components/VPHomeHero.vue b/themes/theme-default/src/client/components/VPHomeHero.vue index 8e3a57b7a4..306f9875a3 100644 --- a/themes/theme-default/src/client/components/VPHomeHero.vue +++ b/themes/theme-default/src/client/components/VPHomeHero.vue @@ -1,9 +1,9 @@