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

能不能支持下返回事件通用方法 小程序 #2676

Closed
mienv567 opened this issue Apr 3, 2019 · 1 comment
Closed

能不能支持下返回事件通用方法 小程序 #2676

mienv567 opened this issue Apr 3, 2019 · 1 comment

Comments

@mienv567
Copy link

mienv567 commented Apr 3, 2019

能不能支持下返回事件通用方法 【小程序】
就是把Taro.navigateBack();放入公共文件然后在pages下调用此方法
import引入公共类文件,pages文件下只需要这样写 ,h5目前支持这个方法我测试过,小程序现在报错
编译失败!
Error: 组件事件传参只能在使用匿名箭头函数,或使用类作用域下的确切引用(this.handleXX || this.props.handleXX),或使用 bind。

381 | <AtNavBar
382 | className='nav'

383 | onClickLeftIcon={actionNavBack}
<AtNavBar
className='nav'
onClickLeftIcon={actionNavBack} 这里
color='#000'
title='八字'
leftIconType='chevron-left'
fixed
/>

/**

  • 通用的返回事件
    */
    export function actionNavBack() {
    Taro.navigateBack();
    }

@yuche

@taro-bot
Copy link

taro-bot bot commented Apr 3, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

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

1 participant