本文整理汇总了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)}
<a href="${this._viewUrl}" target="_blank">${escape(strings.GoToList)}</a>
</div>
</div>`;
}
}
示例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>`;
}
示例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> <i>(${escape(emailString)})</i>:
${escape(descriptionString)}
</div>
</div>`;
}
});
示例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>`;
}
示例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>`;
}
示例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>`;
}
示例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)}`;
});
示例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>`;
}
}
}
}