We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export default class extends wepy.mixin { func1 = function () {} func2 () {} }
如上的 mixin ,在 pages 的 this 中,只能调用 this.func1, 不能调用 this.func2 ,func2 没有挂载到 this 上。具体原因,初步推断为 class 的 prototype 属性不能枚举造成的。而实例属性能枚举,因此能挂载,所以 this 上能调用。
mixin
pages
this
this.func1
this.func2
func2
class
prototype
The text was updated successfully, but these errors were encountered:
已修复。532bcd3#diff-2e8f61a24923c497c1695aa78eba09e2R59
Sorry, something went wrong.
现在可以在page访问,不过会报一个Missing files 的錯誤
No branches or pull requests
如上的
mixin
,在pages
的this
中,只能调用this.func1
, 不能调用this.func2
,func2
没有挂载到this
上。具体原因,初步推断为class
的prototype
属性不能枚举造成的。而实例属性能枚举,因此能挂载,所以this
上能调用。The text was updated successfully, but these errors were encountered: