當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript sp-lodash-subset.escape函數代碼示例

本文整理匯總了TypeScript中@microsoft/sp-lodash-subset.escape函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript escape函數的具體用法?TypeScript escape怎麽用?TypeScript escape使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了escape函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: _renderPlaceholder

  @override
  public _renderPlaceholder(): void {

    if (!this._dueTasks || !this._dueTasks.length)
      return;

    // Handling the top placeholder
    if (!this._topPlaceholder) {
      this._topPlaceholder = this.context.placeholderProvider.tryCreateContent(
        PlaceholderName.Top,
        {
          onDispose: this._onDispose
        });
    }

    if (this._topPlaceholder && this._topPlaceholder.domElement) {
      this._topPlaceholder.domElement.innerHTML = `
                <div class="${styles.app}">
                  <div class="ms-bgColor-themeDark ms-fontColor-white ${styles.header}">
                    <i class="ms-Icon ms-Icon--Info" aria-hidden="true"></i> ${escape(strings.Message)}&nbsp;
                    <a href="${this._viewUrl}" target="_blank">${escape(strings.GoToList)}</a>
                  </div>
                </div>`;
    }
  }
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:25,代碼來源:DueTasksApplicationCustomizer.ts

示例2: render

 public render(): void {
   this.domElement.innerHTML = `
     <div class="${styles.helloWorld}">
       <div class="${styles.container}">
         <div class="ms-Grid-row ms-bgColor-themeDark ms-fontColor-white ${styles.row}">
           <div class="ms-Grid-col ms-lg10 ms-xl8 ms-xlPush2 ms-lgPush1">
             <span class="ms-font-xl ms-fontColor-white">Welcome to SharePoint!</span>
             <p class="ms-font-l ms-fontColor-white">Customize SharePoint experiences using Web Parts.</p>
             <p class="ms-font-l ms-fontColor-white">${escape(this.properties.description)}</p>
             <p class="ms-font-l ms-fontColor-white">${escape(this.properties.test2)}</p>
             <p class="ms-font-l ms-fontColor-white">Loading from ${escape(this.context.pageContext.web.title)}</p>
             <a href="https://aka.ms/spfx" class="${styles.button}">
               <span class="${styles.label}">Learn more</span>
             </a>
           </div>
         </div>
       </div>
     </div>`;
 }
開發者ID:Peteperson,項目名稱:test2017,代碼行數:19,代碼來源:HelloWorldWebPart.ts

示例3:

 }).then((result: any) => {
   // Set headerstring to the groups display name
   let headerString: string = result.displayName;
   let emailString: string = result.mail;
   let descriptionString: string = result.description;
   
   if (!headerString) {
       headerString = '(Header property was not defined.)';
     }
     if (this._headerPlaceholder.domElement) {
       this._headerPlaceholder.domElement.innerHTML = `
             <div class="${styles.app}">
               <div class="ms-bgColor-themeDark ms-fontColor-white ${styles.header}">
                 <b>${escape(headerString)}</b>&nbsp;<i>(${escape(emailString)})</i>: 
                 ${escape(descriptionString)}
               </div>
             </div>`;
     }
 });
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:19,代碼來源:GraphAppCustomApplicationCustomizer.ts

示例4: _createNotification

 private _createNotification(title: string, link: string): void {
   if (this._topPlaceholder.domElement) {
     this._topPlaceholder.domElement.innerHTML = `
                   <div class="${styles.app}">
                     <div class="ms-bgColor-themeDark ms-fontColor-white ${styles.top}">
                       <i class="ms-Icon ms-Icon--Info" aria-hidden="true"></i>
                       ${escape(title)}
                       </br>
                       <a href="${link}">Click here for more detail</a>
                     </div>
                   </div>`;
   }
 }
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:13,代碼來源:WebhooksToastNotificationsApplicationCustomizer.ts

示例5: render

  public render(): void {

    this.context.msGraphClientFactory.getClient().then((client:MSGraphClient):void =>{
var content={"message": {"subject": "Hello Guys!Meet for lunch?", "body": {
      "contentType": "Text",
      "content": "The new cafeteria is open."
    },
    "toRecipients": [
      {
        "emailAddress": {
          "address": "ramcts@ramcts.onmicrosoft.com"
        }
      }
    ],
    
  },
  "saveToSentItems": "false"
};
//client.api("/me/mailFolders/AAMkAGMwYjhjOTdkLTk0ZWItNDRlNC1iN2RlLTRiYjE0Y2Y3ZDRhYgAuAAAAAADLNNuaWUwNTYuIOsdOe2FYAQB06bCmaxbCTJXvFWsW58fKAAAAAAEMAAA=/messages").get((error, rawResponse?: any) => {
  client.api("/users/ram@spcrackers.onmicrosoft.com/sendmail").post(content,this.Gcallback);
  
    client.api("/users/606e8b6c-36c2-4294-ab69-14944b5764a2/manager").get().then(response=>{
      console.log("Managere",response);
      console.log(response.mail);
    });
    client.api("/users/606e8b6c-36c2-4294-ab69-14944b5764a2/photo/$value").get().then(response=>{
      console.log("Managere",response);
     let  imgblob = response.blob();
      let imgsrc = window.URL.createObjectURL(imgblob);
      console.log(imgsrc);
    });
  });
    this.domElement.innerHTML = `
      <div class="${ styles.getUnreadEmails }">
        <div class="${ styles.container }">
          <div class="${ styles.row }">
            <div class="${ styles.column }">
              <span class="${ styles.title }">Welcome to SharePoint!</span>
              <p class="${ styles.subTitle }">Customize SharePoint experiences using Web Parts.</p>
              <p class="${ styles.description }">${escape(this.properties.description)}</p>
              <a href="https://aka.ms/spfx" class="${ styles.button }">
                <span class="${ styles.label }">Learn more</span>
                
              </a>
            </div>
          </div>
        </div>
      </div>`;
  }
開發者ID:kskramki,項目名稱:kskramki-SharePoint,代碼行數:49,代碼來源:GetUnreadEmailsWebPart.ts

示例6: render

 public render(): void {
     this.domElement.innerHTML = `
     <div class="${styles.myApplication}">
         <div class="${styles.container}">
         <div class="${styles.row}">
             <div class="${styles.column}">
             <span class="${styles.title}">Welcome to SharePoint!</span>
             <p class="${styles.subtitle}">Customize SharePoint experiences using Web Parts.</p>
             <p class="${styles.description}">${escape(this.properties.description)}</p>
             <a href="https://aka.ms/spfx" class="${styles.button}">
                 <span class="${styles.label}">Learn more</span>
             </a>
             </div>
         </div>
         </div>
     </div>`;
 }
開發者ID:karamem0,項目名稱:Samples,代碼行數:17,代碼來源:MyApplicationWebPart.ts

示例7: render

 public render(): void {
   this.domElement.innerHTML = `
     <div class="${styles.row}">
       <div class="${styles.column}">
         <span class="${styles.title}">
           Welcome to SharePoint!
         </span>
         <p class="${styles.subtitle}">
           Customize SharePoint experiences using Web Parts.
         </p>
         <p class="${styles.description}">
           ${escape(this.properties.description)}
         </p>
         <a class="ms-Button ${styles.button}" href="https://github.com/SharePoint/sp-dev-docs/wiki">
           <span class="ms-Button-label">
             Learn more
           </span>
         </a>
       </div>
     </div>`;
 }
開發者ID:,項目名稱:,代碼行數:21,代碼來源:

示例8:

 pnp.sp.web.lists.getByTitle(this.properties.tasksListTitle).views.getByTitle('Late Tasks').inBatch(batch).get().then((view: any) => {
   this._viewUrl = `${view.ServerRelativeUrl}?FilterField1=AssignedTo&FilterValue1=${escape(this.context.pageContext.user.displayName)}`;
 });
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:3,代碼來源:DueTasksApplicationCustomizer.ts

示例9: _renderPlaceHolders

  private _renderPlaceHolders(): void {

    console.log('HelloWorldApplicationCustomizer._renderPlaceHolders()');
    console.log('Available placeholders: ',
      this.context.placeholderProvider.placeholderNames.map(name => PlaceholderName[name]).join(', '));

    // Handling the top placeholder
    if (!this._topPlaceholder) {
      this._topPlaceholder =
        this.context.placeholderProvider.tryCreateContent(
          PlaceholderName.Top,
          { onDispose: this._onDispose });

      // The extension should not assume that the expected placeholder is available.
      if (!this._topPlaceholder) {
        console.error('The expected placeholder (Top) was not found.');
        return;
      }

      if (this.properties) {
        let topString: string = this.properties.Top;
        if (!topString) {
          topString = '(Top property was not defined.)';
        }

        if (this._topPlaceholder.domElement) {
          this._topPlaceholder.domElement.innerHTML = `
                    <div class="${styles.app}">
                      <div class="ms-bgColor-themeDark ms-fontColor-white ${styles.top}">
                        <i class="ms-Icon ms-Icon--Info" aria-hidden="true"></i> ${escape(topString)}
                      </div>
                    </div>`;
        }
      }
    }

    // Handling the bottom placeholder
    if (!this._bottomPlaceholder) {
      this._bottomPlaceholder =
        this.context.placeholderProvider.tryCreateContent(
          PlaceholderName.Bottom,
          { onDispose: this._onDispose });

      // The extension should not assume that the expected placeholder is available.
      if (!this._bottomPlaceholder) {
        console.error('The expected placeholder (Bottom) was not found.');
        return;
      }

      if (this.properties) {
        let bottomString: string = this.properties.Bottom;
        if (!bottomString) {
          bottomString = '(Bottom property was not defined.)';
        }

        if (this._bottomPlaceholder.domElement) {
          this._bottomPlaceholder.domElement.innerHTML = `
                    <div class="${styles.app}">
                      <div class="ms-bgColor-themeDark ms-fontColor-white ${styles.bottom}">
                        <i class="ms-Icon ms-Icon--Info" aria-hidden="true"></i> ${escape(bottomString)}
                      </div>
                    </div>`;
        }
      }
    }
  }
開發者ID:AdrianDiaz81,項目名稱:sp-dev-fx-extensions,代碼行數:66,代碼來源:HelloWorldApplicationCustomizer.ts


注:本文中的@microsoft/sp-lodash-subset.escape函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。