Skip to content

Commit f071406

Browse files
committed
Finished translate of framework to Pt-Br
1 parent f61b365 commit f071406

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

Framework/vue-br.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,12 @@ function flushSchedulerQueue() {
122122
for (index = 0; index < queue.length; index++) {
123123
watcher = queue[index]
124124
if (watcher.before) {
125-
watcher.before() // call `beforeUpdate`
125+
watcher.before() // chama `beforeUpdate`
126126
}
127127
id = watcher.id
128128
has[id] = null
129129
watcher.run()
130-
// in dev build, check and stop circular updates.
130+
// no dev build, verifca e para check and stop circular updates.
131131
if (process.env.NODE_ENV !== 'production' && has[id] != null) {
132132
circular[id] = (circular[id] || 0) + 1
133133
if (circular[id] > MAX_UPDATE_COUNT) {
@@ -157,50 +157,50 @@ function callUpdatedHooks(queue) {
157157
}
158158
```
159159

160-
There are two lifecycle functions that aren’t mentioned in the above diagram, `activated` and `deactivated`, and only the `kee-alive` component has these two life cycles. Components wrapped with `keep-alive` will not be destroyed during the switch, but be cached in memory and execute the `deactivated` hook function, and execute the `actived` hook function after matching the cache and rendering.
160+
Existem duas funções do ciclo de vida que não são mencionada no diagrama acima, `activated` e `deactivated`, e apenas o componente `kee-alive` possui esses dois ciclos. Componente encapsulado com `keep-alive` não serão destruídos durante o switch, mas sera cacheado em memória e executado a função gancho `deactivated`, e executar a função `actived` depois de coincidir o cache e a renderização.
161161

162-
Finally, let’s see the hook function that used to destroy the component.
162+
Finalmente, vamos olhar a função gancho usada para destruir o componente.
163163

164164
```js
165165
Vue.prototype.$destroy = function() {
166166
// ...
167167
callHook(vm, 'beforeDestroy')
168168
vm._isBeingDestroyed = true
169-
// remove self from parent
169+
// remove se mesmo a partir do pai
170170
const parent = vm.$parent
171171
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
172172
remove(parent.$children, vm)
173173
}
174-
// teardown watchers
174+
// destroi watchers
175175
if (vm._watcher) {
176176
vm._watcher.teardown()
177177
}
178178
let i = vm._watchers.length
179179
while (i--) {
180180
vm._watchers[i].teardown()
181181
}
182-
// remove reference from data ob
183-
// frozen object may not have observer.
182+
// remove a referência a partir do dado ob
183+
// objeto congelados não devem ter um observador.
184184
if (vm._data.__ob__) {
185185
vm._data.__ob__.vmCount--
186186
}
187-
// call the last hook...
187+
// chame o último gancho...
188188
vm._isDestroyed = true
189-
// invoke destroy hooks on current rendered tree
190-
vm.__patch__(vm._vnode, null)
191-
// fire destroyed hook
189+
// invoque ganchos destruídos na árvore atualmente renderizada
190+
// dispare o gancho destruído
192191
callHook(vm, 'destroyed')
193-
// turn off all instance listeners.
192+
// desligo todos os ouvintes da instância.
194193
vm.$off()
195194
// remove __vue__ reference
195+
// remove __vue__ reference
196196
if (vm.$el) {
197197
vm.$el.__vue__ = null
198198
}
199-
// release circular reference (#6759)
199+
// lance uma referência circular (#6759)
200200
if (vm.$vnode) {
201201
vm.$vnode.parent = null
202202
}
203203
}
204204
```
205205

206-
The `beforeDestroy` hook function will be called before the destroy operation is performed, and then a series of destruction operations are performed. If there are child components, they will be destroyed recursively, and only when all the child components are destroyed, the hook `destroyed` of the root component will be executed.
206+
A função `beforeDestroy` será chamada antes da operação de destruir ser desempenhada, e então uma série de operações de destruição são desempenhadas. Se existe um componente filho, eles serão destruidos recursivamente, e apenas quando todos os componente filhos são destruídos, o gancho `destroyed` do componente raíz será executado.

0 commit comments

Comments
 (0)