feat(renderer-adapter) : 增加 vue2 渲染适配器
This commit is contained in:
@@ -3,7 +3,7 @@ import type { AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
||||
|
||||
import type { Router, RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { onBeforeUnmount, onMounted } from 'vue';
|
||||
import { computed, onBeforeUnmount, onMounted } from 'vue';
|
||||
|
||||
import WujieVue from 'wujie-vue3';
|
||||
|
||||
@@ -84,6 +84,10 @@ const subAppProps = {
|
||||
},
|
||||
};
|
||||
|
||||
const finalUrl = computed(() => {
|
||||
return `${props.url}?fileId=${props.fileId}&projectId=${props.projectId}&applicationId=${props.applicationId}`;
|
||||
});
|
||||
|
||||
// 监听子应用的事件
|
||||
const handleReady = (data: any) => {
|
||||
console.log(`${props.name} 子应用就绪:`, data);
|
||||
@@ -120,7 +124,7 @@ onBeforeUnmount(() => {
|
||||
<template>
|
||||
<WujieVue
|
||||
:name="name || fileId"
|
||||
:url="url"
|
||||
:url="finalUrl"
|
||||
:sync="sync"
|
||||
width="100%"
|
||||
height="100%"
|
||||
|
||||
Reference in New Issue
Block a user