所以我尝试从 GitHub https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-save-attachments 安装这个 Outlook 插件。我已经在我的 Outlook Web 上成功安装了这个加载项。所以我注意到 manifest.xml 上的源位置是这样的 https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da
。首先,我认为不能在桌面上工作,因为它无法读取 SharePointTenantUrl,所以我将其更改为我的 SharePoint 地址。但是当我安装它时,应用程序仍然没有显示在我的 Outlook 桌面上。
这是 manifest.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<Id>04634d50-d72c-45ec-81d0-7b1f803800da</Id>
<Version>1.0.0.0</Version>
<ProviderName>SPFx Provider</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Save Attachments"/>
<Description DefaultValue="An SPFx Outlook addin that lets users copy email attachments to OneDrive folders."/>
<IconUrl DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
<HighResolutionIconUrl DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
<SupportUrl DefaultValue="https://localhost:4321/help"/>
<AppDomains>
<AppDomain>https://login.microsoftonline.com</AppDomain>
<AppDomain>https://login.windows.net</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.4" />
<Set Name="SharePointHostedAddin" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="GroupLabel" />
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="TaskpaneButton.Label" />
<Supertip>
<Title resid="TaskpaneButton.Label" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://cdn.graph.office.net/prod/media/shared/addin-icon.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Taskpane.Url" DefaultValue="https://_SharePointTenantUrl_/_layouts/15/outlookhostedapp.aspx?componentId=04634d50-d72c-45ec-81d0-7b1f803800da" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="GroupLabel" DefaultValue="Add-in groupLabel"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens taskpane."/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>
答案 0 :(得分:0)
该存储库用于 SPFx Web 部件,必须安装在 SharePoint 应用目录中。
<块引用>此存储库包含社区示例,这些示例演示了不同的 SharePoint 框架客户端 Web 部件的使用模式。
[...]
SharePoint 客户端 Web 部件是出现在 SharePoint 页面但在浏览器中本地运行。他们是建筑 出现在 SharePoint 网站上的页面块。
您的 SharePoint 管理员可以帮助您为租户设置应用程序目录。如果您是 SharePoint 管理员,则可能需要参考 https://docs.microsoft.com/en-us/sharepoint/use-app-catalog