我不断收到“您只能输入一个名字”的消息。在我使用以下代码创建的 peoplepicker 输入框(div)中:
// Render and initialize the client-side People Picker.
function initializePeoplePicker(peoplePickerElementId) {
// Create a schema to store picker properties, and set the properties.
var schema = {};
schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';
schema['SearchPrincipalSource'] = 15;
schema['ResolvePrincipalSource'] = 15;
schema['AllowMultipleValues'] = true;
schema['MaximumEntitySuggestions'] = 50;
schema['Width'] = '280px';
// Render and initialize the picker.
// Pass the ID of the DOM element that contains the picker, an array of initial
// PickerEntity objects to set the picker value, and a schema that defines
// picker properties.
this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);
}
即使它具有“模式['AllowMultipleValues'] = true;” 声明,在我必须将用户输入 peoplepicker 放入的 div 中,我仍然得到唯一一个名称允许的消息。为什么?
它允许我输入多个名称并从弹出的下拉列表中选择名称,但似乎不允许我在收集名称时从输入框中收集所有名称。