From f97821825753995e7612d0d517d306064bf84714 Mon Sep 17 00:00:00 2001 From: Nikita Perfilyev Date: Tue, 3 Oct 2023 09:54:35 +0900 Subject: [PATCH] (fix): Add ru localization for api/built-in-directives.md --- src/api/built-in-directives.md | 280 ++++++++++++++++----------------- 1 file changed, 140 insertions(+), 140 deletions(-) diff --git a/src/api/built-in-directives.md b/src/api/built-in-directives.md index fbfd992c..7b7fd3b4 100644 --- a/src/api/built-in-directives.md +++ b/src/api/built-in-directives.md @@ -1,40 +1,40 @@ -# Built-in Directives {#built-in-directives} +# Встроенные директивы {#built-in-directives} ## v-text {#v-text} -Update the element's text content. +Обновление текстового содержимого элемента. - **Ожидает:** `string` - **Подробности:** - `v-text` works by setting the element's [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) property, so it will overwrite any existing content inside the element. If you need to update the part of `textContent`, you should use [mustache interpolations](/guide/essentials/template-syntax.html#text-interpolation) instead. + `v-text` работает путем установки свойства [textContent](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) элемента, поэтому он будет перезаписывать все существующее содержимое внутри элемента. Если необходимо обновить часть `textContent`, то вместо этого следует использовать [текстовые интерполяции](/guide/essentials/template-syntax.html#text-interpolation). - **Пример:** ```vue-html - + {{msg}} ``` -- **См. также:** [Template Syntax - Text Interpolation](/guide/essentials/template-syntax.html#text-interpolation) +- **См. также:** [Синтаксис шаблонов - Текстовые интерполяции](/guide/essentials/template-syntax.html#text-interpolation) ## v-html {#v-html} -Update the element's [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML). +Обновление свойства [innerHTML](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML) элемента. - **Ожидает:** `string` - **Подробности:** - Contents of `v-html` are inserted as plain HTML - Vue template syntax will not be processed. If you find yourself trying to compose templates using `v-html`, try to rethink the solution by using components instead. + Содержимое `v-html` вставляется как обычный HTML - синтаксис шаблонов Vue не обрабатывается. Если вы пытаетесь составить шаблоны с помощью `v-html`, попробуйте переосмыслить решение, используя вместо этого компоненты. :::warning Примечание о безопасности - Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use `v-html` on trusted content and **never** on user-provided content. + Динамический рендеринг произвольного HTML на вашем сайте может быть очень опасен, поскольку легко может привести к [XSS-атакам](https://en.wikipedia.org/wiki/Cross-site_scripting). Используйте `v-html` только для доверенного содержимого и **никогда** для содержимого, предоставляемого пользователем. ::: - In [Single-File Components](/guide/scaling-up/sfc), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](./sfc-css-features.html#css-modules) or an additional, global `