修改itemCatController.js
$scope.grade=1;//默认为1级
//设置级别
$scope.setGrade=function(value){
$scope.grade=value;
}
//读取列表
KaTeX parse error: Expected '}', got 'EOF' at end of input: …tity){ if(scope.grade1){//如果为1级
$scope.entity_1=null;
KaTeX parse error: Expected 'EOF', got '}' at position 24: …tity_2=null; }̲ if(scope.grade2){//如果为2级
$scope.entity_1=p_entity;
KaTeX parse error: Expected 'EOF', got '}' at position 24: …tity_2=null; }̲ if(scope.grade==3){//如果为3级
$scope.entity_2=p_entity;
}
$scope.findByParentId(p_entity.id); //查询此级下级列表
}
修改列表的查询下级按钮,设定级别值后 显示列表
查询下级
这里我们使用了ng-if指令,用于条件判断,当级别不等于3的时候才显示“查询下级”按钮
绑定面包屑:
面包屑简单实现
最新推荐文章于 2022-08-01 11:03:14 发布