搜索按钮如何根据获取到的数据类型去搜索?
我也踩过这个坑( 1 )
详细描述
截图
代码
编辑于2024-11-24
-
[北京|结业弟子]JS-肖明明0
可以写一个search-params的自定义指令指令
angular.module('admin').directive('search', function () {return {templateUrl: 'js/directives/searchParams/search-params.html',replace: true,restrict: 'E',scope: {params: '='},controller: function ($scope, $state, commonUtil) {$scope.search = function () {$state.go($state.current, commonUtil.querySearchParams($scope.params), { reload: true })};$scope.clean = function () {angular.forEach($scope.params, function(data, index){if (index !== 'size') {$scope.params[index] = '';}})$state.go($state.current, commonUtil.querySearchParams($scope.params), { reload: true })}}}});编辑于2019-08-10
- 去第 页