本文介绍了完成签入后,我的自定义人员选择器控件未显示在SharePoint 2013的UI中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$( function  () {

$(function () {

   ;  initializePeoplePicker( 'peoplePickerDiv' );

         });

       });

功能   initializePeoplePicker(peoplePickerElementId) {

function initializePeoplePicker(peoplePickerElementId) {

 

   ;   // 创建一个架构来存储选择器属性,然后设置属性.

    // Create a schema to store picker properties, and set the properties.

   ;   var 模式 = {};

    var schema = {};

   ;  schema [ "PrincipalAccountType" ] =  'User,DL,SecGroup,SPGroup' ;

    schema['PrincipalAccountType'] = 'User,DL,SecGroup,SPGroup';

   ;  schema [ 'SearchPrincipalSource' ] = 15;

    schema['SearchPrincipalSource'] = 15;

   ;  schema [ "ResolvePrincipalSource" ] = 15;

    schema['ResolvePrincipalSource'] = 15;

   ;  schema [ "AllowMultipleValues" ] =  true ;

    schema['AllowMultipleValues'] = true;

   ;  schema [ 'MaximumEntitySuggestions' ] = 50;

    schema['MaximumEntitySuggestions'] = 50;

   ;  schema [ 宽度" ] =  '280px' ;

    schema['Width'] = '280px';

 

   ;   // 渲染并初始化选择器.

    // Render and initialize the picker.

   ;   // 传递包含选择器的DOM元素的ID,该元素是一个初始数组

    // Pass the ID of the DOM element that contains the picker, an array of initial

   ;   // PickerEntity对象,用于设置Picker值,以及定义

    // PickerEntity objects to set the picker value, and a schema that defines

   ;   // 选择器属性.

    // picker properties.

   ;   this .SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, 空 , 模式);

    this.SPClientPeoplePicker_InitStandaloneControlWrapper(peoplePickerElementId, null, schema);

}

  HTML :

< !DOCTYPE   html >

 

< html   lang ="en"   xmlns =&"; http://www.w3.org/1999/xhtml >

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">

< head >

   ;   < meta   字符集 ="utf-8& quot; />

   ;   < 脚本   type =" text/ja vascript" src =&"; https://one.net/sites/Dev/POC/Scripts/jquery-3.2.1.js "></ 脚本 >

    <script type="text/javascript" src="https://one.net/sites/Dev/POC/Scripts/jquery-3.2.1.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/clienttemplates.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/clienttemplates.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/clientforms.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/clientforms.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/clientpeoplepicker.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/clientpeoplepicker.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/autofill.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/autofill.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/sp.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/sp.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/sp.runtime.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/sp.runtime.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/sp.core.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/sp.core.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =""/_ layouts/15/sp.userprofiles.js"></ 脚本 >

    <script type="text/javascript" src="/_layouts/15/sp.userprofiles.js"></script>

   ;   < 脚本   type =" text/ja vascript" src =&"; https://one.net/sites/Dev/POC/Documents/PeoplePicker.js ></ 脚本 >

    <script type="text/javascript"src="https://one.net/sites/Dev/POC/Documents/PeoplePicker.js"></script>

   ;   < 标题 > test </ 标题 >

</ 头部 >

<body>

<div id="peoplePickerDiv"></div>

</body>

</html>

Manoj Nagasarapu

Manoj Nagasarapu

推荐答案

Please re-open the page instead of refreshing the page, see if the people picker appears on the page.

Use F12 developer tools to debug the page to see if there are any errors when loading the page.

最好的问候,

Linda(张)


这篇关于完成签入后,我的自定义人员选择器控件未显示在SharePoint 2013的UI中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 12:31