From 7f5558934b13e824a1a571377a72b5f07fcd31d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Se=C4=8Dk=C3=A1r?= Date: Wed, 4 Sep 2024 05:46:57 +0200 Subject: [PATCH] docs: remarks about minor versions (#2990) docs: remarks about minor version (follow up to b6339b62a9522eb195a24ef74ee6392d65d2bfd7) --- src/api/application.md | 4 ++-- src/api/built-in-special-attributes.md | 4 +++- src/api/composition-api-dependency-injection.md | 4 ++-- src/api/options-rendering.md | 4 +++- src/api/reactivity-utilities.md | 4 ++-- src/api/sfc-script-setup.md | 9 +++++---- src/api/utility-types.md | 12 ++++++------ 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/api/application.md b/src/api/application.md index 2ff3d787fe..382386a9c6 100644 --- a/src/api/application.md +++ b/src/api/application.md @@ -285,10 +285,10 @@ Provide a value that can be injected in all descendant components within the app ## app.runWithContext() {#app-runwithcontext} -Execute a callback with the current app as injection context. - - Only supported in 3.3+ +Execute a callback with the current app as injection context. + - **Type** ```ts diff --git a/src/api/built-in-special-attributes.md b/src/api/built-in-special-attributes.md index 3dfb752308..edacf3ea2c 100644 --- a/src/api/built-in-special-attributes.md +++ b/src/api/built-in-special-attributes.md @@ -91,7 +91,9 @@ Used for binding [dynamic components](/guide/essentials/component-basics#dynamic - **Expects:** `string | Component` -- **Usage on native elements** 3.1+ +- **Usage on native elements** + + - Only supported in 3.1+ When the `is` attribute is used on a native HTML element, it will be interpreted as a [Customized built-in element](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-customized-builtin-example), which is a native web platform feature. diff --git a/src/api/composition-api-dependency-injection.md b/src/api/composition-api-dependency-injection.md index 89df326578..f2ec5127fb 100644 --- a/src/api/composition-api-dependency-injection.md +++ b/src/api/composition-api-dependency-injection.md @@ -109,10 +109,10 @@ Injects a value provided by an ancestor component or the application (via `app.p ## hasInjectionContext() {#has-injection-context} -Returns true if [inject()](#inject) can be used without warning about being called in the wrong place (e.g. outside of `setup()`). This method is designed to be used by libraries that want to use `inject()` internally without triggering a warning to the end user. - - Only supported in 3.3+ +Returns true if [inject()](#inject) can be used without warning about being called in the wrong place (e.g. outside of `setup()`). This method is designed to be used by libraries that want to use `inject()` internally without triggering a warning to the end user. + - **Type** ```ts diff --git a/src/api/options-rendering.md b/src/api/options-rendering.md index a10c4c8212..55b64860a6 100644 --- a/src/api/options-rendering.md +++ b/src/api/options-rendering.md @@ -86,7 +86,9 @@ Configure runtime compiler options for the component's template. ## slots {#slots} -An option to assist with type inference when using slots programmatically in render functions. Only supported in 3.3+. +- Only supported in 3.3+ + +An option to assist with type inference when using slots programmatically in render functions. - **Details** diff --git a/src/api/reactivity-utilities.md b/src/api/reactivity-utilities.md index 18bce64988..684d49ea45 100644 --- a/src/api/reactivity-utilities.md +++ b/src/api/reactivity-utilities.md @@ -134,12 +134,12 @@ Can also be used to create a ref for a property on a source reactive object. The ## toValue() {#tovalue} +- Only supported in 3.3+ + Normalizes values / refs / getters to values. This is similar to [unref()](#unref), except that it also normalizes getters. If the argument is a getter, it will be invoked and its return value will be returned. This can be used in [Composables](/guide/reusability/composables.html) to normalize an argument that can be either a value, a ref, or a getter. -- Only supported in 3.3+ - - **Type** ```ts diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index 116233c30c..9dcfa2909d 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -379,7 +379,9 @@ defineExpose({ When a parent gets an instance of this component via template refs, the retrieved instance will be of the shape `{ a: number, b: number }` (refs are automatically unwrapped just like on normal instances). -## defineOptions() {#defineoptions} +## defineOptions() {#defineoptions} + +- Only supported in 3.3+ This macro can be used to declare component options directly inside ` ``` -- Only supported in 3.3+. - This is a macro. The options will be hoisted to module scope and cannot access local variables in ` ``` -- Only supported in 3.3+. - ## `useSlots()` & `useAttrs()` {#useslots-useattrs} Usage of `slots` and `attrs` inside `