Skip to content

Commit d209fc7

Browse files
Remove excess words and fix minor language issues (#2266)
* Remove excess words and fix minor language issues Remove "at a time" which is redundant as "at most" is sufficient Replace "relevant tooling section" with the name of the section for better accessibility Make "Src" lowercase to be consistent with other use of tags and attributes in the Vue documentation, i.e. setup() and <script setup> * Wrap src in backticks Following your suggestion, I checked more of the docs and I agree that it should be wrapped in backticks here too. Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com> --------- Co-authored-by: skirtle <65301168+skirtles-code@users.noreply.github.com>
1 parent 8cfefd2 commit d209fc7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/api/sfc-spec.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@ export default {
3636

3737
### `<template>` {#template}
3838

39-
- Each `*.vue` file can contain at most one top-level `<template>` block at a time.
39+
- Each `*.vue` file can contain at most one top-level `<template>` block.
4040

4141
- Contents will be extracted and passed on to `@vue/compiler-dom`, pre-compiled into JavaScript render functions, and attached to the exported component as its `render` option.
4242

4343
### `<script>` {#script}
4444

45-
- Each `*.vue` file can contain at most one `<script>` block at a time (excluding [`<script setup>`](/api/sfc-script-setup)).
45+
- Each `*.vue` file can contain at most one `<script>` block (excluding [`<script setup>`](/api/sfc-script-setup)).
4646

4747
- The script is executed as an ES Module.
4848

4949
- The **default export** should be a Vue component options object, either as a plain object or as the return value of [defineComponent](/api/general#definecomponent).
5050

5151
### `<script setup>` {#script-setup}
5252

53-
- Each `*.vue` file can contain at most one `<script setup>` block at a time (excluding normal `<script>`).
53+
- Each `*.vue` file can contain at most one `<script setup>` block (excluding normal `<script>`).
5454

5555
- The script is pre-processed and used as the component's `setup()` function, which means it will be executed **for each instance of the component**. Top-level bindings in `<script setup>` are automatically exposed to the template. For more details, see [dedicated documentation on `<script setup>`](/api/sfc-script-setup).
5656

@@ -68,15 +68,15 @@ Additional custom blocks can be included in a `*.vue` file for any project-speci
6868
- [vite-plugin-vue-gql: `<gql>`](https://github.com/wheatjs/vite-plugin-vue-gql)
6969
- [vue-i18n: `<i18n>`](https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n#i18n-custom-block)
7070

71-
Handling of Custom Blocks will depend on tooling - if you want to build your own custom block integrations, see [relevant tooling section](/guide/scaling-up/tooling#sfc-custom-block-integrations) for more details.
71+
Handling of Custom Blocks will depend on tooling - if you want to build your own custom block integrations, see the [SFC custom block integrations tooling section](/guide/scaling-up/tooling#sfc-custom-block-integrations) for more details.
7272

7373
## Automatic Name Inference {#automatic-name-inference}
7474

7575
An SFC automatically infers the component's name from its **filename** in the following cases:
7676

7777
- Dev warning formatting
7878
- DevTools inspection
79-
- Recursive self-reference. E.g. a file named `FooBar.vue` can refer to itself as `<FooBar/>` in its template. This has lower priority than explicitly registered/imported components.
79+
- Recursive self-reference, e.g. a file named `FooBar.vue` can refer to itself as `<FooBar/>` in its template. This has lower priority than explicitly registered/imported components.
8080

8181
## Pre-Processors {#pre-processors}
8282

@@ -109,7 +109,7 @@ Note that integration with various pre-processors may differ by toolchain. Check
109109
- [Vue CLI](https://cli.vuejs.org/guide/css.html#pre-processors)
110110
- [webpack + vue-loader](https://vue-loader.vuejs.org/guide/pre-processors.html#using-pre-processors)
111111

112-
## Src Imports {#src-imports}
112+
## `src` Imports {#src-imports}
113113

114114
If you prefer splitting up your `*.vue` components into multiple files, you can use the `src` attribute to import an external file for a language block:
115115

0 commit comments

Comments
 (0)