Skip to content

Commit

Permalink
timeout 16.6 -> 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dntzhang committed Nov 17, 2018
1 parent 6de5252 commit 860d736
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 50 deletions.
6 changes: 3 additions & 3 deletions packages/omi/dist/omi.dev.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/omi/dist/omi.dev.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/omi/dist/omi.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/omi/dist/omi.esm.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/omi/dist/omi.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/omi/dist/omi.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/omi/dist/omi.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/omi/dist/omi.min.js.map

Large diffs are not rendered by default.

43 changes: 11 additions & 32 deletions packages/omi/examples/tick/b.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/omi/examples/tick/b.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions packages/omi/examples/tick/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ define('todo-app', class extends WeElement {
// })
}

afterUpdate(){
console.log('afterUpdate')
}

installed() {
console.log('installed')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/omi/src/observe.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ export function proxyUpdate(ele) {
timeout = setTimeout(() => {
ele.update()
fireTick()
}, 16.6)
}, 0)
})
}
4 changes: 2 additions & 2 deletions packages/omi/src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ export function render(vnode, parent, store) {
timeout = setTimeout(() => {
update(patchs, store)
patchs = {}
}, 16.6)
}, 0)
} else {
const key = fixPath(patch.path)
patchs[key] = patch.value
timeout = setTimeout(() => {
update(patchs, store)
patchs = {}
}, 16.6)
}, 0)
}
})
parent.store = store
Expand Down

0 comments on commit 860d736

Please sign in to comment.