Commit 8013d513 authored by JingChao's avatar JingChao

Updates angular/hlsUtil.md

Auto commit by GitBook Editor
parent af9a2bc7
...@@ -244,6 +244,37 @@ vm.showSheet = function () { ...@@ -244,6 +244,37 @@ vm.showSheet = function () {
``` ```
![](/img/bigPicture.png) ![](/img/bigPicture.png)
##### 16.下拉框
- 参数1 `list`下拉框数据来源,必须包含`code`与`code_name`
- 参数2 `title`下拉框title
- 参数3 `code`下拉框对弈的code
- 参数4 `object`当前下拉框的父对象
- 参数5 `function`回调函数function,返回index 选择的list集合的index和下拉框的父对象,会在对象中插入code和code_n字段
- 调用实例如下
```javascript
vm.test = {}
vm.selectBpType = function () {
var list = [
{
"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;
});
}
```
......
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