chore: 渲染器支持渲染 antdv

This commit is contained in:
wangxuefeng
2025-03-21 20:56:42 +08:00
parent e6b8146ee0
commit 580468a3e9
5 changed files with 457 additions and 418 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@sy/wujie-vue3-renderer-adapter",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.12",
"description": "wujie-vue3 ycode renderer adapter",
"type": "module",
"scripts": {

View File

@@ -50,19 +50,19 @@ const props = withDefaults(
const { bus } = WujieVue;
// 定义无界插件
const wujiePlugins = [
{
patchElementHook(element: Element, iframeWindow: Window) {
if (element.nodeName === 'STYLE') {
element.insertAdjacentElement = function (_position, ele) {
iframeWindow.document.head.append(ele);
};
}
},
},
InstanceofPlugin(),
];
// // 定义无界插件
// const wujiePlugins = [
// {
// patchElementHook(element: Element, iframeWindow: Window) {
// if (element.nodeName === 'STYLE') {
// element.insertAdjacentElement = function (_position, ele) {
// iframeWindow.document.head.append(ele);
// };
// }
// },
// },
// // InstanceofPlugin(),
// ];
// 生命周期钩子
const beforeLoad = (appWindow: Window) => {
@@ -125,7 +125,6 @@ onBeforeUnmount(() => {
<template>
<WujieVue
:id="`wujie-vue3-adapter-${fileId}`"
:name="name || fileId"
:url="finalUrl"
:sync="sync"
@@ -134,6 +133,5 @@ onBeforeUnmount(() => {
:before-load="beforeLoad"
:after-mount="afterMount"
:interceptors="interceptors"
:plugins="wujiePlugins"
/>
</template>