Skip to content

1.0.3 绑定click事件加过滤器后,不能找到绑定的方法! #1656

@rendongsc

Description

@rendongsc

以官方的grid示例为列!
1、html代码

<div @click="sortBy(column) | expression column.sortable">

2、自定义过滤器expression代码:

  Vue.filter('expression', function (handler, expression) {
    if (!handler) return;
    if (expression) {
        return function (e) {
            return handler.call(this, e)
        }
    }
});

-------------------------------------报错--------------------------------------------
[Vue warn]: v-on:click="sortBy(column)" expects a function value, got undefined

说明:0.12版本是没有任何问题的!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions