Skip to content

Commit 70ca08a

Browse files
authored
Update template-refs.md
Translation of comments in the code and the last note in Russian
1 parent 74f28ca commit 70ca08a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/guide/essentials/template-refs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<script setup>
1919
import { useTemplateRef, onMounted } from 'vue'
2020
21-
// the first argument must match the ref value in the template
21+
// первый аргумент должен совпадать с значением ref в шаблоне
2222
const input = useTemplateRef('my-input')
2323
2424
onMounted(() => {
@@ -236,7 +236,7 @@ import Child from './Child.vue'
236236
const childRef = useTemplateRef('child')
237237
238238
onMounted(() => {
239-
// childRef.value will hold an instance of <Child />
239+
// childRef.value будет содержать объект <Child />
240240
})
241241
</script>
242242
@@ -314,7 +314,7 @@ defineExpose({
314314

315315
Когда родитель получает экземпляр этого компонента через ссылки шаблона, полученный экземпляр будет иметь вид `{ a: number, b: number }` (ссылки автоматически разворачиваются, как и для обычных экземпляров).
316316

317-
Note that defineExpose must be called before any await operation. Otherwise, properties and methods exposed after the await operation will not be accessible.
317+
Обратите внимание, что defineExpose должен вызываться перед любой операцией await. В противном случае свойства и методы, раскрытые после операции await, будут недоступны.
318318

319319
См. также: [Типизированные ссылки на шаблоны компонентов](/guide/typescript/composition-api#typing-component-template-refs) <sup class="vt-badge ts" />
320320

0 commit comments

Comments
 (0)