omi-cli - update omi-mp template

This commit is contained in:
张磊 2018-12-05 19:19:37 +08:00
parent a94933b190
commit 7d2bd68e0d
3 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{
"name": "omi-cli",
"version": "3.0.28",
"version": "3.0.29",
"description": "Create website with no build configuration. be friendly to [Omi](https://github.com/Tencent/omi) framework.",
"main": "bin/omi",
"engines": {

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() {}

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() {}