wg-basic-doc/docs/code-template/user-select.md
2022-08-15 15:17:10 +08:00

26 lines
762 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 用户选择
## 综合选择
```js
top.dialog.dialogData.selectedIdArray = ['627da8c0-3c75-4bf9-abc7-85a6f1c18ae9', 'fe594537-bb9d-4d4f-b5d6-c68b099eec58']
top.dialog.open({
url: top.restAjax.path('route/core/manage/list-department-user-select', []),
title: '用户选择',
width: '800px',
height: '500px',
onClose: function() {
var newSelectedArray = top.dialog.dialogData.newSelectedArray;
if(!newSelectedArray) {
return;
}
// 处理
console.log(newSelectedArray);
}
})
```
说明
`top.dialog.dialogData.selectedIdArray`回显的用户ID列表可以为null或[]
`top.dialog.dialogData.newSelectedArray`新选择的用户列表当没有任何操作时返回null。