diff --git a/.vitepress/theme/components/VueSchoolLink.vue b/.vitepress/theme/components/VueSchoolLink.vue new file mode 100644 index 000000000..fbb96aa06 --- /dev/null +++ b/.vitepress/theme/components/VueSchoolLink.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 72df24118..0072fce9e 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -3,6 +3,7 @@ import { h, App } from 'vue' import { VPTheme } from '@vue/theme' import Banner from './components/Banner.vue' import PreferenceSwitch from './components/PreferenceSwitch.vue' +import VueSchoolLink from './components/VueSchoolLink.vue' import { preferComposition, preferSFC, @@ -25,5 +26,6 @@ export default Object.assign({}, VPTheme, { app.provide('prefer-composition', preferComposition) app.provide('prefer-sfc', preferSFC) app.provide('filter-headers', filterHeadersByPreference) + app.component('VueSchoolLink', VueSchoolLink) } }) diff --git a/src/guide/components/events.md b/src/guide/components/events.md index ad9326e9f..82cb7e1af 100644 --- a/src/guide/components/events.md +++ b/src/guide/components/events.md @@ -2,6 +2,10 @@ > This page assumes you've already read the [Components Basics](/guide/essentials/component-basics). Read that first if you are new to components. +
+ ## Emitting and Listening to Events A component can emit custom events directly in template expressions (e.g. in a `v-on` handler) using the built-in `$emit` function: diff --git a/src/guide/components/props.md b/src/guide/components/props.md index 88b26f48e..d11fcc131 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -2,6 +2,10 @@ > This page assumes you've already read the [Components Basics](/guide/essentials/component-basics). Read that first if you are new to components. + + ## Props Declaration Vue components require explicit props declaration so that Vue knows what external props passed to the component should be treated as fallthrough attributes (which will be discussed in the next section). diff --git a/src/guide/components/slots.md b/src/guide/components/slots.md index 0111cc9fe..21315645f 100644 --- a/src/guide/components/slots.md +++ b/src/guide/components/slots.md @@ -2,6 +2,8 @@ > This page assumes you've already read the [Components Basics](/guide/essentials/component-basics). Read that first if you are new to components. +