From 63cdc835709b0c8cdab417ba51b781f8bce4cad9 Mon Sep 17 00:00:00 2001 From: Evgeniy Gromin Date: Fri, 21 Jun 2024 16:24:26 +0400 Subject: [PATCH] feat(docs): translate docs/2.guide/2.directory-structure/1.composables.md (#39) (#201) Signed-off-by: Evgeniy Gromin --- .../2.directory-structure/1.composables.md | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/2.guide/2.directory-structure/1.composables.md b/docs/2.guide/2.directory-structure/1.composables.md index 52b12d62c615..cb90030fe7ac 100644 --- a/docs/2.guide/2.directory-structure/1.composables.md +++ b/docs/2.guide/2.directory-structure/1.composables.md @@ -1,13 +1,13 @@ --- title: 'composables' head.title: 'composables/' -description: Use the composables/ directory to auto-import your Vue composables into your application. +description: Используйте директорию composables/ для автоматического импорта композаблов Vue в ваше приложение. navigation.icon: i-ph-folder-duotone --- ## Использование -**Method 1:** Using named export +**Метод 1:** Использование именованного экспорта ```js [composables/useFoo.ts] export const useFoo = () => { @@ -15,16 +15,16 @@ export const useFoo = () => { } ``` -**Method 2:** Using default export +**Метод 2:** Использование экспорта по умолчанию ```js [composables/use-foo.ts or composables/useFoo.ts] -// It will be available as useFoo() (camelCase of file name without extension) +// Композабл будет доступен как useFoo() (camelCase имени файла без расширения) export default function () { return useState('foo', () => 'bar') } ``` -**Usage:** You can now use auto imported composable in `.js`, `.ts` and `.vue` files +**Использование:** Теперь вы можете использовать автоматически импортируемый композабл в файлах `.js`, `.ts` и `.vue` ```vue [app.vue]