【发布时间】:2021-12-27 03:28:18
【问题描述】:
我正在使用 MGT(Microsoft Graph Toolkit)并且想知道是否可以对属性进行切片。 这是我的代码:
<mgt-person person-query="me">
<template>
<div>
{{person.displayName}}
</div>
</template>
<template data-type="loading">
Loading
</template>
</mgt-person>
person.DisplayName 返回:“史密斯,约翰”
如何从中获取名字?我想切掉姓氏和“,”。
我知道 {{person.givenName}} 会给你名字,但由于各种原因,一些用户在显示名称中使用了不同的名字,他们更喜欢被称呼。
请帮忙。
【问题讨论】:
标签: typescript sharepoint-online innerhtml spfx msgraph