格式选项卡内的可视部分不会出现在“常规”部分旁边: 教程中的照片(https://github.com/autodesk-platform-services/aps-powerbi-tools/tree/develop/visuals/aps-viewer-visual)显示:
我使用“npm start”命令启动了 Javascript 环境并激活了开发人员设置,然后我在可视化部分中选择了开发人员视觉效果,但是当选择报告中的白色视觉框并查看格式选项卡以插入需要的内容时从访问令牌和 GUID 和 urn 我似乎没有找到可视部分(只有一般);
我所看到的:
我遇到的错误:
Access to fetch at cvSandboxPack.cshtml:1
'https://app.powerbi.com/13.0.22683.73/cvSandboxPack.cshtml?locale=en-
US&emCVBundle=1&pbiglobals=1' from origin 'null' has been blocked by
CORS policy: No 'Access-Control-Allow-Origin' header is present on the
requested resource. If an opaque response serves your needs, set the
request's mode to 'no-cors' to fetch the resource with CORS disabled.
visual.ts:146
`GET https://app.powerbi.com/13.0.22683.73/cvSandboxPack.cshtml?
locale=en-US&emCVBundle=1&pbiglobals=1 net::ERR_FAILED 200 (OK)`
`visual.ts:154 TypeError: Failed to fetch
at Visual.getAccessToken (<anonymous>:299:36)
at initializeAuth (envinit.js:604:35)
at eval (envinit.js:519:13)
at new Promise (<anonymous>)
at initializeAuthPromise (envinit.js:518:16)
at Object.Initializer (envinit.js:764:24)
at <anonymous>:78:62
at new Promise (<anonymous>)
at <anonymous>:78:20
at async Visual.initializeViewer (<anonymous>:278:13)`
谢谢您的提醒。看起来 PowerBI 已经改变了自定义视觉效果定义其自定义设置的方式。而不是像这样定义设置:
export class VisualSettingsModel extends Model {
viewerCard = new ViewerCard();
designCard = new DesignCard();
Card = [this.viewerCard, this.designCard];
}
它们现在应该看起来像这样:
export class VisualSettingsModel extends Model {
viewerCard = new ViewerCard();
designCard = new DesignCard();
cards = [this.viewerCard, this.designCard];
}
我刚刚更新了代码,视觉设置再次出现。