omi-mp - fix parse error

This commit is contained in:
张磊 2018-12-05 19:07:06 +08:00
parent aab73e10ba
commit 84602146c1
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ class Element extends WeElement {
install() {
this.properties = this.props
Object.keys(mpOption).forEach(key => {
if (typeof mpOption[key] === 'function') {
Element.prototype[key] = mpOption[key].bind(this)
}
})
}
uninstall = mpOption.onUnload || function() {}