chore: 渲染器支持渲染 antdv
This commit is contained in:
parent
e6b8146ee0
commit
580468a3e9
@ -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:",
|
||||
|
@ -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)
|
||||
|
@ -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": {
|
||||
|
@ -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
841
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user