Skip to content

Commit 42e594e

Browse files
committed
translate coplete example section
1 parent ab43aa3 commit 42e594e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/guide/render-function.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,14 @@ h(
164164
)
165165
```
166166

167-
## Complete Example
167+
## Exemplo completo
168168

169-
With this knowledge, we can now finish the component we started:
169+
Com este conhecimento, podemos agora finalizar o componente que começamos:
170170

171171
```js
172172
const app = Vue.createApp({})
173173

174-
/** Recursively get text from children nodes */
174+
/** Recupera o texto dos nós filhos recursivamente */
175175
function getChildrenTextContent(children) {
176176
return children
177177
.map(node => {
@@ -186,11 +186,11 @@ function getChildrenTextContent(children) {
186186

187187
app.component('anchored-heading', {
188188
render() {
189-
// create kebab-case id from the text contents of the children
189+
// cria um id em kebab-case a partir do texto dos filhos
190190
const headingId = getChildrenTextContent(this.$slots.default())
191191
.toLowerCase()
192-
.replace(/\W+/g, '-') // replace non-word characters with dash
193-
.replace(/(^-|-$)/g, '') // remove leading and trailing dashes
192+
.replace(/\W+/g, '-') // substitui caracteres não-texto por traços
193+
.replace(/(^-|-$)/g, '') // remove os traços iniciais e finais
194194

195195
return Vue.h('h' + this.level, [
196196
Vue.h(

0 commit comments

Comments
 (0)