feat: 低代码平台的页面使用低代码平台自身来制作

This commit is contained in:
wangxuefeng
2025-03-05 14:06:43 +08:00
parent 2d202cd6d7
commit 1d7b28160a
12 changed files with 606 additions and 598 deletions

8
apps/renderer/env.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
/// <reference types="vite/client" />
interface ImportMeta {
readonly env: {
NODE_ENV: "development" | "production";
VITE_API_BASE?: string;
};
}

View File

@@ -17,13 +17,13 @@
"@sy/low-code-shared": "workspace:*",
"@sy/web-vitals": "workspace:*",
"@tanstack/vue-query": "^5.66.9",
"@vtj/core": "^0.10.7",
"@vtj/pro": "^0.10.7",
"@vtj/ui": "^0.10.7",
"@vtj/web": "^0.10.7",
"@vtj/renderer": "^0.10.7",
"@vtj/icons": "0.10.7",
"@vtj/materials": "^0.10.7",
"@vtj/core": "^0.10.9",
"@vtj/icons": "0.10.9",
"@vtj/materials": "^0.10.9",
"@vtj/pro": "^0.10.9",
"@vtj/renderer": "^0.10.9",
"@vtj/ui": "^0.10.9",
"@vtj/web": "^0.10.9",
"axios": "^1.8.1",
"core-js": "^3.40.0",
"element-plus": "^2.9.4",
@@ -34,6 +34,7 @@
},
"devDependencies": {
"@farmfe/cli": "^1.0.4",
"@vtj/cli": "^0.10.2",
"@farmfe/core": "^1.6.6",
"@sy/vite-plugin-http2-proxy": "workspace:*",
"@vitejs/plugin-vue": "^5.2.1",

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
// @ts-nocheck
import { computed, watch, ref, getCurrentInstance } from 'vue'
import { ElLoading } from 'element-plus'
import Postmate from 'postmate'
@@ -7,8 +6,7 @@ import { createProvider } from '@vtj/web'
import { useQuery } from '@tanstack/vue-query'
import { LowCodeService } from './service'
import { getFile } from './io'
import * as VtjUI from '@vtj/ui'
console.log('VtjUI',VtjUI)
// import * as VtjUI from '@vtj/ui'
// 响应式状态
const renderer = ref()
@@ -42,9 +40,9 @@ const { data: file, isFetching } = useQuery({
nodeEnv: import.meta.env.NODE_ENV,
service: lowCodeService,
project: { id: model.projectId },
components: {
...VtjUI,
}
// components: {
// ...VtjUI,
// }
})
onReady(async () => {
const instance = getCurrentInstance()

View File

@@ -1,4 +1,3 @@
// @ts-nocheck
import { type ProjectSchema, type BlockSchema, ProjectModel } from "@vtj/core";
import { BaseService } from "@vtj/renderer";
import { getProject, getFile as getLowCodeFile } from "@/io";

View File

@@ -1,16 +1,15 @@
{
"extends": "./node_modules/@vtj/cli/config/tsconfig.web.json",
"compilerOptions": {
"module": "nodenext",
"lib": ["ESNext", "DOM"],
"moduleResolution": "nodenext",
"noUnusedLocals": false,
"noUnusedParameters": false,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"],
"$vtj/*": [".vtj/*"]
},
"lib": ["ES2022", "DOM"],
"module": "NodeNext",
"target": "ES2022",
"moduleResolution": "NodeNext"
"@/*": ["src/*"]
}
},
"include": ["src"],
"exclude": [".vtj"],