feat(renderer-adapter) : 增加 vue2 渲染适配器

This commit is contained in:
wangxuefeng
2025-03-21 09:49:54 +08:00
parent 4e584fccf3
commit c3ac1584c3
4 changed files with 164 additions and 117 deletions

View File

@@ -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%"