From 78d61f2dae1858153e35e0bc93052387c88d7a19 Mon Sep 17 00:00:00 2001 From: Bayn Web <73877052+Bayn-Web@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:14:41 +0800 Subject: [PATCH] doc(fix vuejs/core#11367):add a warn about '~' in src-imports (#3061) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc:add a warn about '~' in src-imports * Update src/api/sfc-spec.md Co-authored-by: Natalia Tepluhina * Update src/api/sfc-spec.md Co-authored-by: Natalia Tepluhina * doc(import statement): add import statement in script setup * doc(import statement): delete extraneous blank lines --------- Co-authored-by: εŒ…δΌŸζ–Œ <1813148814@qq.com> Co-authored-by: Natalia Tepluhina --- src/api/sfc-script-setup.md | 14 ++++++++++++++ src/api/sfc-spec.md | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index 9dcfa290..89bd6f44 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -479,6 +479,20 @@ In addition, the awaited expression will be automatically compiled in a format t `async setup()` must be used in combination with [`Suspense`](/guide/built-ins/suspense.html), which is currently still an experimental feature. We plan to finalize and document it in a future release - but if you are curious now, you can refer to its [tests](https://github.com/vuejs/core/blob/main/packages/runtime-core/__tests__/components/Suspense.spec.ts) to see how it works. ::: +## Import Statements {#imports-statements} + +Import statements in vue follow [ECMAScript module specification](https://nodejs.org/api/esm.html). +In addition, you can use aliases defined in your build tool configuration: + +```vue + +``` + ## Generics {#generics} Generic type parameters can be declared using the `generic` attribute on the `