diff --git a/.gitignore b/.gitignore index 8b7ec505e3..57d2a7d39c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ public/ .deploy*/ src/_drafts package-lock.json +.idea diff --git a/README.md b/README.md index 69395ba4f9..01f7f5c5b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# vuejs.org +# vuejs.org > Important: This repository is for Vue 1.x and 2.x only. Issues and pull requests related to 3.x are managed in the [v3 doc repo](https://github.com/vuejs/docs-next). @@ -106,6 +106,12 @@ Russian translation is maintained by Translation Gang. - [Pablo Kz](https://github.com/pabloKz) - [Leonardo Fagundez](https://github.com/lfgdzdev) | [Twitter](https://twitter.com/Lfgdz) +### Ukrainian + +Ukrainian translation is maintained by: +- [Serhii Matrunchyk](https://github.com/matruncyk) + +Please join a Telegram channel [Vue.JS Ukraine](https://t.me/vuejs_ukraine) in order to join to UA translators team. ### Vietnamese diff --git a/assets/lifecycle.ai b/assets/lifecycle.ai index 5aa705583c..a8a32bbb94 100644 Binary files a/assets/lifecycle.ai and b/assets/lifecycle.ai differ diff --git a/package.json b/package.json index e3640cc3fa..030bfdfb41 100644 --- a/package.json +++ b/package.json @@ -29,4 +29,4 @@ "hoek": "^6.1.2", "request": "^2.85.0" } -} \ No newline at end of file +} diff --git a/src/images/lifecycle.png b/src/images/lifecycle.png index f8cd62c51f..75ad2b3a62 100644 Binary files a/src/images/lifecycle.png and b/src/images/lifecycle.png differ diff --git a/src/resources/partners.md b/src/resources/partners.md index dab1a2b483..d8305f1c77 100644 --- a/src/resources/partners.md +++ b/src/resources/partners.md @@ -1,7 +1,7 @@ --- type: partners partners: true -title: Vue Partners +title: Партнери Vue proficiencies_urls: VueJs: https://vuejs.org Laravel: https://laravel.com diff --git a/src/resources/themes.md b/src/resources/themes.md index 5dc004a80b..03a1e399a1 100644 --- a/src/resources/themes.md +++ b/src/resources/themes.md @@ -1,5 +1,5 @@ --- -title: Themes +title: Теми type: resources order: 804 --- @@ -10,8 +10,8 @@ order: 804

- Want to feature your themes here? - Contact us! + Хочете розмістити Ваші теми тут? + Напишіть нам!

diff --git a/src/v2/api/index.md b/src/v2/api/index.md index 90cec3d0f0..97986c04e2 100644 --- a/src/v2/api/index.md +++ b/src/v2/api/index.md @@ -3,31 +3,31 @@ title: API type: api --- -## Global Config +## Глобальні налаштування -`Vue.config` is an object containing Vue's global configurations. You can modify its properties listed below before bootstrapping your application: +`Vue.config` є об'єктом, який містить глобальні налаштування Vue. Ви можете змінювати його властивості, перелічені знизу перед стартом вашого додатку: ### silent -- **Type:** `boolean` +- **Тип:** `boolean` -- **Default:** `false` +- **По замовчуванню:** `false` -- **Usage:** +- **Використання:** ``` js Vue.config.silent = true ``` - Suppress all Vue logs and warnings. + Вимикає всі попередження та логування Vue. ### optionMergeStrategies -- **Type:** `{ [key: string]: Function }` +- **Тип:** `{ [key: string]: Function }` -- **Default:** `{}` +- **По замовчуванню:** `{}` -- **Usage:** +- **Використання:** ``` js Vue.config.optionMergeStrategies._my_option = function (parent, child, vm) { @@ -41,40 +41,39 @@ type: api // Profile.options._my_option = 2 ``` - Define custom merging strategies for options. + Задає власні стратегії об'єднування опцій. - The merge strategy receives the value of that option defined on the parent and child instances as the first and second arguments, respectively. The context Vue instance is passed as the third argument. + Стратегія об'єднування отримує значення опції, яка була оголошена в батьківському та дочірньому інстансах як перший та другий аргументи відповідно. Третім аргументом передається Vue інстанс в якості контексту. -- **See also:** [Custom Option Merging Strategies](../guide/mixins.html#Custom-Option-Merge-Strategies) +- **See also:** [Власні стратегії об'єднання опцій](../guide/mixins.html#Custom-Option-Merge-Strategies) ### devtools -- **Type:** `boolean` +- **Тип:** `boolean` -- **Default:** `true` (`false` in production builds) +- **По замовчуванню:** `true` (`false` в продакшн-білдах) -- **Usage:** +- **Використання:** ``` js - // make sure to set this synchronously immediately after loading Vue + // переконайтеся, що ви встановили цю властивість синхронно відразу після старту Vue Vue.config.devtools = true ``` - Configure whether to allow [vue-devtools](https://github.com/vuejs/vue-devtools) inspection. This option's default value is `true` in development builds and `false` in production builds. You can set it to `true` to enable inspection for production builds. + Задає, чи дозволяти інспекцію Вашого додатку плагіном [vue-devtools](https://github.com/vuejs/vue-devtools). Значення по замовчуванню є `true` в середовищі розробника та `false` в продакшн-середовищі. ### errorHandler -- **Type:** `Function` +- **Тип:** `Function` -- **Default:** `undefined` +- **По замовчуванню:** `undefined` -- **Usage:** +- **Використання:** ``` js Vue.config.errorHandler = function (err, vm, info) { - // handle error - // `info` is a Vue-specific error info, e.g. which lifecycle hook - // the error was found in. Only available in 2.2.0+ + // управління помилкою + // В змінній `info` знаходиться специфічна для Vue інформація про помилку, наприклад, який хук циклу життя компоненти, в якій було знайдено помилку. Доступно лише в 2.2.0+ } ``` diff --git a/src/v2/guide/class-and-style.md b/src/v2/guide/class-and-style.md index 60171d440b..da37c6dd44 100644 --- a/src/v2/guide/class-and-style.md +++ b/src/v2/guide/class-and-style.md @@ -1,5 +1,5 @@ --- -title: Class and Style Bindings +title: Класи та стилі type: guide order: 6 --- diff --git a/src/v2/guide/comparison.md b/src/v2/guide/comparison.md index 7b33c7f70d..24a77077f6 100644 --- a/src/v2/guide/comparison.md +++ b/src/v2/guide/comparison.md @@ -1,5 +1,5 @@ --- -title: Comparison with Other Frameworks +title: Порівняння з іншими фреймворками type: guide order: 801 --- diff --git a/src/v2/guide/components-custom-events.md b/src/v2/guide/components-custom-events.md index 1df316204a..23841ddcbb 100644 --- a/src/v2/guide/components-custom-events.md +++ b/src/v2/guide/components-custom-events.md @@ -1,37 +1,37 @@ --- -title: Custom Events +title: Спеціальні події type: guide order: 103 --- -> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components. +> Даний розділ передбачає, що ви вже знайомі [компонентами](components.html). Прочитайте його, якщо це не так. -
Learn how to work with custom events in a free Vue School lesson
+
Дізнайтеся, як працювати із спеціальними подіями на безкоштовному уроці в Vue School lesson
-## Event Names +## Імена подій -Unlike components and props, event names don't provide any automatic case transformation. Instead, the name of an emitted event must exactly match the name used to listen to that event. For example, if emitting a camelCased event name: +На відміну від компонентів та вхідних параметрів, імена подій не трансформуються автоматично. Навпаки, ім'я згенерованої події має бути точно таким самим, як і ім'я, що використовується для її відстежування. Ось приклад, якщо згенероване ім'я події в стилі camelCase: ```js this.$emit('myEvent') ``` -Listening to the kebab-cased version will have no effect: +Відстежуванні події за її іменем в стилі kebab-cased не працюватиме: ```html - + ``` -Unlike components and props, event names will never be used as variable or property names in JavaScript, so there's no reason to use camelCase or PascalCase. Additionally, `v-on` event listeners inside DOM templates will be automatically transformed to lowercase (due to HTML's case-insensitivity), so `v-on:myEvent` would become `v-on:myevent` -- making `myEvent` impossible to listen to. +На відміну від компонентів та вхідних параметрів, імена подій не будуть використовуватися як змінна або властивість в JavaScript, тому нема змісту використовувати camelCase чи PascalCase. Крім того, слухач подій `v-on` всередині DOM шаблонів будуть автоматично трансформовані до нижнього регістру (у зв'язку з ігноруванням регістру в стандарті HTML), тому `v-on:myEvent` стане `v-on:myevent`, роблячи `myEvent` неможливим для відстежування. -For these reasons, we recommend you **always use kebab-case for event names**. +З цих причин, ми радимо вам **завжди задавати імена подій в стилі kebab-case**. -## Customizing Component `v-model` +## Налаштування `v-model` компонента -> New in 2.2.0+ +> Нове в 2.2.0+ -By default, `v-model` on a component uses `value` as the prop and `input` as the event, but some input types such as checkboxes and radio buttons may want to use the `value` attribute for a [different purpose](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Value). Using the `model` option can avoid a conflict in such cases: +За замовчуванням, `v-model` в компонента використовує `value` як вхідний параметр та `input` як ім'я події, але деякі типи елементів введення, такі як прапорці та радіо кнопки можуть використовувати атрибут `value` [різних потреб (англ.)](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#Value). Використання параметру `model` може запобігти конфліктів у випадках: ```js Vue.component('base-checkbox', { @@ -52,25 +52,25 @@ Vue.component('base-checkbox', { }) ``` -Now when using `v-model` on this component: +Тепер при використанні у цьому компоненті `v-model`: ```html ``` -the value of `lovingVue` will be passed to the `checked` prop. The `lovingVue` property will then be updated when `` emits a `change` event with a new value. +значення властивості `lovingVue` буде передане до вхідного параметра `checked`. Властивість `lovingVue` буде оновлена згодом, коли `` згенерує подію `change` із новим значенням. -

Note that you still have to declare the checked prop in the component's props option.

+

Зверніть увагу, що ви все одно повинні оголосити вхідний параметр checked в об'єкті props компонента.

-## Binding Native Events to Components +## Зв'язування рідних подій в компоненті -There may be times when you want to listen directly to a native event on the root element of a component. In these cases, you can use the `.native` modifier for `v-on`: +Інколи може виникати необхідність, коли ви хочете відстежувати рідну подію на кореневому елементі компонента. В такому разі, ви можете використовувати модифікатор `.native` при`v-on`: ```html ``` -This can be useful sometimes, but it's not a good idea when you're trying to listen on a very specific element, like an ``. For example, the `` component above might refactor so that the root element is actually a `