Skip to content
New issue

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

组件中使用mixins,发现事件没执行 #177

Closed
wanghaixu opened this issue Jun 2, 2017 · 1 comment
Closed

组件中使用mixins,发现事件没执行 #177

wanghaixu opened this issue Jun 2, 2017 · 1 comment

Comments

@wanghaixu
Copy link

例子是使用【wepy new XX】生成的。我写了一个mixins应用到组件中,发现事件没触发。文档中有page使用mixins的例子,但是没有组件的,API文档又提到可以用mixins,是我的使用姿势不对吗?

import wepy from 'wepy';
export default class testMixin02 extends wepy.mixin {
  onLoad() {
       console.log(23423);
  }
}

在/src/components/counter.wpy中使用。

import testMixin02 from '../mixins/testMixin02 ';
// 省略....
mixins = [testMixin02]
// 省略....
@Gcaufy
Copy link
Collaborator

Gcaufy commented Jun 5, 2017

当前只支持 page 中的 mixin 的 onLoad 事件。已修复

dlhandsome pushed a commit to dlhandsome/wepy that referenced this issue Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants