Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将人员选取器添加到sharepoint online web部件_Sharepoint_Typescript Typings - Fatal编程技术网

将人员选取器添加到sharepoint online web部件

将人员选取器添加到sharepoint online web部件,sharepoint,typescript-typings,Sharepoint,Typescript Typings,我有这个代码,想从中添加人员选择器 从'@microsoft/sp core library'导入{Version}; 进口{ BaseClientSideWebPart, IPropertyPaneConfiguration, PropertyPaneTextField }来自“@microsoft/sp Web部件库”; 从'@microsoft/sp lodash subset'导入{escape}; 从“/FinanceSysAccWebPart.module.scss”导入样式; 从“

我有这个代码,想从中添加人员选择器

从'@microsoft/sp core library'导入{Version};
进口{
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField
}来自“@microsoft/sp Web部件库”;
从'@microsoft/sp lodash subset'导入{escape};
从“/FinanceSysAccWebPart.module.scss”导入样式;
从“FinanceSysAccWebPartStrings”导入*作为字符串;
从“@microsoft/sp http”导入{SPHttpClient,SPHttpClientResponse};
从“./app/interfaces/IListItem”导入{IListItem};
导出接口IFinanceSysAccWebPartProps{
listName:string;
}
导出接口ISpFxPureWebPartProps{
描述:字符串;
}
导出默认类FinanceSysAccWebPart扩展BaseClientSideWebPart
{
私有listItemEntityTypeName:string=未定义;
公共呈现():void{
this.doElement.innerHTML=`
财务系统访问请求表

名称:${escape(this.properties.listName)}

名字: 姓氏:
      `; //让FirstName=(document.getElementById(“txtFirstName”).value; this.setButtonsEventHandlers();
}


最好的方法是什么?我看不到Web部件中的脚本标记。

在SPFx解决方案中使用本机JavaScript比经典页面更复杂,并且没有编译错误/提示

我建议您在解决方案中使用


我已经输入了所有的代码。要测试Pnp选取器,它说要导航到/\u layouts/15/workbench.aspx。在代码中,我可以看到我要更新的列表的URL吗?如何将人员添加到人员选取器中,例如Joe Bloggs等。请检查此线程,这很好。谢谢。
import { Version } from '@microsoft/sp-core-library';

import {
BaseClientSideWebPart,
IPropertyPaneConfiguration,
PropertyPaneTextField
} from '@microsoft/sp-webpart-base';
import { escape } from '@microsoft/sp-lodash-subset';

import styles from './FinanceSysAccWebPart.module.scss';
import * as strings from 'FinanceSysAccWebPartStrings';
import { SPHttpClient, SPHttpClientResponse } from '@microsoft/sp-http';
import { IListItem } from './app/interfaces/IListItem';


export interface IFinanceSysAccWebPartProps {
listName: string;
}
export interface ISpFxPureWebPartProps {
  description: string;
}


export default class FinanceSysAccWebPart extends BaseClientSideWebPart<IFinanceSysAccWebPartProps> 
{

private listItemEntityTypeName: string = undefined;  
public render(): void {
this.domElement.innerHTML = `


  <div class="${ styles.financeSysAcc }">
    <div class="${ styles.container }">
      <div class="${ styles.row }">
        <div class="${ styles.column }">
          <span class="${ styles.title }">Finance System Access Request Form</span>


          <p class="${styles.description}">Name: ${escape(this.properties.listName)}</p>  
          <table>
            <tr>
              <td>First Name: </td>
              <td><input id="txtFirstName" name="txtFirstName" type="text" /></td>
            </tr>
            <tr>
              <td>Last Name: </td>
              <td><input id="txtSurName" name="txtSurName" type="text" /></td>
            </tr>
          </table>



          <div class="ms-Grid-row ms-bgColor-themeDark ms-fontColor-white ${styles.row}">  
            <div class="ms-Grid-col ms-u-lg10 ms-u-xl8 ms-u-xlPush2 ms-u-lgPush1">  
              <div class="status"></div>  
              <ul class="items"><ul>  
            </div>  
          </div>  

        </div>  
      </div>  
    </div>
  </div>

  `;
  //let FirstName = (<HTMLInputElement> document.getElementById("txtFirstName")).value; 
   this.setButtonsEventHandlers();