提交 8810ae91 编写于 作者: fxy060608's avatar fxy060608

feat(wxs): add getBoundingClientRect,setTimeout,clearTimeout

上级 3178d290
......@@ -225,7 +225,7 @@ export default {
this.__handleTouchMove = function (event) {
if (touchStart === null) return
var x = event.touches[0].pageX
var y = event.touches[0].pageY
var main = self.$refs.main
......
......@@ -160,6 +160,18 @@ class ComponentDescriptor {
// TODO options
return (this.$vm.$emit(eventName, detail), this)
}
setTimeout (handler: TimerHandler, timeout ? : number) {
return window.setTimeout(handler, timeout)
}
clearTimeout (handle ? : number) {
return window.clearTimeout(handle)
}
getBoundingClientRect () {
return this.$el.getBoundingClientRect()
}
}
export function createComponentDescriptor (vm, isOwnerInstance = true) {
......@@ -174,4 +186,4 @@ export function createComponentDescriptor (vm, isOwnerInstance = true) {
}
return vm.__wxsComponentDescriptor
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册