Commit 69bf20fe authored by JingChao's avatar JingChao

Updates angular/hlsUtil.md

Auto commit by GitBook Editor
parent 615a554e
...@@ -282,25 +282,16 @@ vm.test = {} ...@@ -282,25 +282,16 @@ vm.test = {}
- 参数4 `function`回调函数function,返回index 选择的list集合的index和下拉框的父对象,会在对象中插入code和code_n字段 - 参数4 `function`回调函数function,返回index 选择的list集合的index和下拉框的父对象,会在对象中插入code和code_n字段
- 调用实例如下 - 调用实例如下
```javascript ```javascript
vm.test = {} vm.selectBrand = function () {
vm.selectBpType = function () { hlsUtil.selectSearchList(vm.brands, 'brand_id', vm.test, function (index, result) {
var list = [ console.log(angular.toJson(vm.brands[index]));
{
"code": "NP",
"code_name": "个人"
}, {
"code": "ORG",
"code_name": "企业"
}
];
var ttile = '客户分类';
hlsUtil.selectList(list, ttile, 'bp_type', vm.test, function (index, result) {
console.log(angular.toJson(list[index]));
console.log(angular.toJson(result));//{"bp_type":"NP","bp_type_n":"个人"}
vm.test = result; vm.test = result;
}); });
} };
``` ```
- 实现效果如下
![](/img/selectSearchlist.png)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment