回车键搜索功能

ng-keyup="$ctrl.enterKeySearch($event)"

  

self.enterKeySearch = function (e) {
                var keycode = window.event ? e.keyCode : e.which;
                if (keycode == 13) {
                    self.searchColumn();  //当按下回车键时执行搜索函数
                }
            };

  

posted @ 2018-04-20 09:43  芒果加冰  阅读(815)  评论(0编辑  收藏  举报