feat: vue3渲染适配器

This commit is contained in:
wangxuefeng
2025-03-12 18:10:47 +08:00
parent bcdb4e8c95
commit 5f8609fc02
20 changed files with 398 additions and 150 deletions

View File

@@ -1,5 +1,9 @@
import type { RouteRecordRaw } from 'vue-router';
import { h } from 'vue';
import RendererAdapter from '@sy/vue3-renderer-adapter';
import { VITE_DESIGNER_URL, VITE_V1_URL } from '#/constants';
const moduleName = 'micro';
@@ -18,18 +22,15 @@ const routes: Array<RouteRecordRaw> = [
name: `${moduleName}-designer`,
meta: {
title: '低代码编辑器',
keepAlive: true,
keepAlive: false,
icon: 'ant-design:edit-outlined',
app: {
},
component: () =>
h(RendererAdapter, {
url: VITE_DESIGNER_URL,
name: 'y-code-designer',
projectId: 4,
sync: true,
alive: true,
degrade: true,
},
},
component: () => import('#/components/renderer-adapter/index.vue'),
}),
},
{
path: 'y-code-v1',
@@ -47,7 +48,14 @@ const routes: Array<RouteRecordRaw> = [
degrade: true,
},
},
component: () => import('#/components/renderer-adapter/index.vue'),
component: () =>
h(RendererAdapter, {
url: VITE_V1_URL,
name: 'y-code-v1',
// sync: true,
// alive: true,
degrade: true,
}),
},
],
},