[bugfix] functional component multi listeners (#2717)

This commit is contained in:
neverland
2019-02-12 10:44:40 +08:00
committed by GitHub
parent 0bf4a9e799
commit e6584a28d3
11 changed files with 45 additions and 29 deletions

View File

@@ -1,5 +1,5 @@
import { use, noop } from '../utils';
import { inheritContext } from '../utils/functional';
import { inherit } from '../utils/functional';
import Icon from '../icon';
const [sfc, bem] = use('nav-bar');
@@ -31,7 +31,7 @@ export default sfc({
<div
class={[bem({ fixed: props.fixed }), { 'van-hairline--bottom': props.border }]}
style={{ zIndex: props.zIndex }}
{...inheritContext(context)}
{...inherit(context)}
>
<div class={bem('left')} onClick={listeners['click-left'] || noop}>
{slots.left || [