feat: vue3渲染适配器
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sy/unified-login": "1.0.29",
|
||||
"@sy/vue3-renderer-adapter": "workspace:*",
|
||||
"@vben/access": "workspace:*",
|
||||
"@vben/common-ui": "workspace:*",
|
||||
"@vben/constants": "workspace:*",
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
import {
|
||||
LOW_CODE_APPLICATION_ID,
|
||||
@@ -25,18 +29,15 @@ const routes: Array<RouteRecordRaw> = [
|
||||
title: '权限列表',
|
||||
keepAlive: true,
|
||||
icon: 'ant-design:list',
|
||||
app: {
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-project-list',
|
||||
// sync: true,
|
||||
// alive: true,
|
||||
// degrade: true,
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '1hsd0407hf',
|
||||
},
|
||||
},
|
||||
component: () => import('#/components/renderer-adapter/index.vue'),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
|
||||
// 微前端路由
|
||||
@@ -19,20 +23,17 @@ const routes: Array<RouteRecordRaw> = [
|
||||
name: `${moduleName}-list`,
|
||||
meta: {
|
||||
title: '应用列表',
|
||||
keepAlive: true,
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:list',
|
||||
app: {
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-application-list',
|
||||
// sync: true,
|
||||
// alive: true,
|
||||
// degrade: true,
|
||||
applicationId: 0,
|
||||
projectId: 4,
|
||||
fileId: 'b91n1y9yr',
|
||||
},
|
||||
},
|
||||
component: () => import('#/components/renderer-adapter/index.vue'),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
import {
|
||||
LOW_CODE_APPLICATION_ID,
|
||||
@@ -25,39 +29,32 @@ const routes: Array<RouteRecordRaw> = [
|
||||
title: '项目列表',
|
||||
keepAlive: true,
|
||||
icon: 'ant-design:list',
|
||||
app: {
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-project-list',
|
||||
// sync: true,
|
||||
// alive: true,
|
||||
// degrade: true,
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '4g4mz6qi8u',
|
||||
},
|
||||
},
|
||||
component: () => import('#/components/renderer-adapter/index.vue'),
|
||||
}),
|
||||
},
|
||||
{
|
||||
path: 'file',
|
||||
name: `${moduleName}-file`,
|
||||
meta: {
|
||||
title: 'dsl 文件列表',
|
||||
keepAlive: true,
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:file',
|
||||
app: {
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-project-file',
|
||||
// sync: true,
|
||||
// alive: true,
|
||||
// degrade: true,
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
// cspell:disable-next-line
|
||||
fileId: '7pftwojzu',
|
||||
},
|
||||
},
|
||||
component: () => import('#/components/renderer-adapter/index.vue'),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import { h } from 'vue';
|
||||
|
||||
import RendererAdapter from '@sy/vue3-renderer-adapter';
|
||||
|
||||
import { VITE_RENDERER_URL } from '#/constants';
|
||||
import {
|
||||
LOW_CODE_APPLICATION_ID,
|
||||
@@ -25,15 +29,15 @@ const routes: Array<RouteRecordRaw> = [
|
||||
title: '静态文件列表',
|
||||
keepAlive: false,
|
||||
icon: 'ant-design:file',
|
||||
app: {
|
||||
},
|
||||
component: () =>
|
||||
h(RendererAdapter, {
|
||||
url: VITE_RENDERER_URL,
|
||||
name: 'y-code-platform-application-list',
|
||||
applicationId: LOW_CODE_APPLICATION_ID,
|
||||
projectId: LOW_CODE_PROJECT_ID,
|
||||
fileId: '7pfr394d6',
|
||||
},
|
||||
},
|
||||
component: () => import('#/components/renderer-adapter/index.vue'),
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
27
apps/platform/turbo.json
Normal file
27
apps/platform/turbo.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "https://turbo.build/schema.json",
|
||||
"ui": "tui",
|
||||
"globalDependencies": ["pnpm-lock.yaml"],
|
||||
"globalEnv": ["NODE_ENV"],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"dependsOn": ["@sy/vue3-renderer-adapter#build", "^build"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"preview": {
|
||||
"dependsOn": ["@sy/vue3-renderer-adapter#build", "^build"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"build:analyze": {
|
||||
"dependsOn": ["@sy/vue3-renderer-adapter#build", "^build"],
|
||||
"outputs": ["dist/**"]
|
||||
},
|
||||
"dev": {
|
||||
"dependsOn": ["@sy/vue3-renderer-adapter#build"],
|
||||
"outputs": [],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
},
|
||||
"extends": ["//"]
|
||||
}
|
||||
Reference in New Issue
Block a user