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

@ -25,6 +25,7 @@
"@vtj/ui": "^0.11.5",
"@vtj/utils": "^0.11.5",
"@vtj/web": "^0.11.5",
"ant-design-vue": "catalog:",
"axios": "catalog:",
"core-js": "catalog:",
"element-plus": "catalog:",

View File

@ -5,6 +5,7 @@ import { VueQueryPlugin } from '@tanstack/vue-query';
import * as VtjCharts from '@vtj/charts';
import { IconsPlugin } from '@vtj/icons';
import * as VtjUI from '@vtj/ui';
import Antd from 'ant-design-vue';
import ElementPlus from 'element-plus';
import App from './App.vue';
@ -36,7 +37,9 @@ Object.entries(VtjUI).forEach(([name, component]) => {
Object.entries(VtjCharts).forEach(([name, component]) => {
app.component(name, component);
});
app
.use(Antd)
.use(ElementPlus)
.use(IconsPlugin)
.use(VueQueryPlugin)

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>

841
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff