|
@@ -70,18 +70,17 @@ export class AppMsgQueen5Controller extends AppMsgRecvController {
|
|
|
return true;
|
|
|
});
|
|
|
|
|
|
- // this.addWebpackuriListener(
|
|
|
- // "添加3D组件",
|
|
|
- // async (url: string, name: string, thumbnail: string) => {
|
|
|
- // console.log("url", url, name, thumbnail);
|
|
|
+ this.addListener("webpackuri", "添加3D组件", async (data: any) => {
|
|
|
+ const { thumbnail, link } = data.payload;
|
|
|
+ // console.log("推送 url", link, thumbnail);
|
|
|
+
|
|
|
+ await this.editor.actions.clickCompToDesign("Web3D", (comp) => {
|
|
|
+ comp.value.url = link;
|
|
|
+ comp.value.poster = thumbnail;
|
|
|
+ });
|
|
|
+ return true;
|
|
|
+ });
|
|
|
|
|
|
- // await this.editor.actions.clickCompToDesign("Web3D", (comp) => {
|
|
|
- // comp.value.url = url;
|
|
|
- // comp.value.poster = thumbnail;
|
|
|
- // });
|
|
|
- // return true;
|
|
|
- // }
|
|
|
- // );
|
|
|
this.emitChange();
|
|
|
}
|
|
|
}
|