From b7ad3966b4c3791d69a966e8d3a2c4eac6b2a2c5 Mon Sep 17 00:00:00 2001 From: Kirill Safarchev <83013244+klirii@users.noreply.github.com> Date: Sat, 29 Mar 2025 07:50:38 +0400 Subject: [PATCH] Update props.md Translate Reactive Props Destructure in Russian --- src/guide/components/props.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/guide/components/props.md b/src/guide/components/props.md index bee3a08c..6e425309 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -119,44 +119,44 @@ defineProps<{
-## Reactive Props Destructure \*\* {#reactive-props-destructure} +## Деструктурирование реактивных свойств \*\* {#reactive-props-destructure} -Vue's reactivity system tracks state usage based on property access. E.g. when you access `props.foo` in a computed getter or a watcher, the `foo` prop gets tracked as a dependency. +Система реактивности Vue отслеживает использование состояния на основе доступа к свойствам. Например, когда вы обращаетесь к `props.foo` в вычисляемом геттере или наблюдателе, свойство `foo` отслеживается как зависимость. -So, given the following code: +И так, дан следующий код: ```js const { foo } = defineProps(['foo']) watchEffect(() => { - // runs only once before 3.5 - // re-runs when the "foo" prop changes in 3.5+ + // до версии 3.5 функция сработает только один раз + // перезапускается при изменении свойства "foo" в версии 3.5+ console.log(foo) }) ``` -In version 3.4 and below, `foo` is an actual constant and will never change. In version 3.5 and above, Vue's compiler automatically prepends `props.` when code in the same `