test: 渲染器加载测试
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<div id="low-code-platform"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
"pinia": "catalog:",
|
||||
"postmate": "1.5.2",
|
||||
"vue": "catalog:",
|
||||
"vue-router": "catalog:"
|
||||
"vue-router": "catalog:",
|
||||
"wujie-vue3": "catalog:"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/postmate": "catalog:",
|
||||
|
||||
@@ -10,6 +10,7 @@ import '@vben/styles/ele';
|
||||
|
||||
import { useTitle } from '@vueuse/core';
|
||||
import { ElLoading } from 'element-plus';
|
||||
// import WujieVue from 'wujie-vue3';
|
||||
|
||||
import { $t, setupI18n } from '#/locales';
|
||||
|
||||
@@ -29,6 +30,7 @@ async function bootstrap(namespace: string) {
|
||||
// zIndex: 2000,
|
||||
// });
|
||||
const app = createApp(App);
|
||||
// app.use(WujieVue);
|
||||
|
||||
// 注册Element Plus提供的v-loading指令
|
||||
app.directive('loading', ElLoading.directive);
|
||||
@@ -67,7 +69,7 @@ async function bootstrap(namespace: string) {
|
||||
}
|
||||
});
|
||||
|
||||
app.mount('#app');
|
||||
app.mount('#low-code-platform');
|
||||
}
|
||||
|
||||
export { bootstrap };
|
||||
|
||||
@@ -24,15 +24,14 @@ const routes: RouteRecordRaw[] = [
|
||||
title: '静态文件列表',
|
||||
},
|
||||
props: {
|
||||
// url: 'https://y-code-renderer.shiyue.com/',
|
||||
url: `${VITE_RENDERER_URL}?fileId=7pfr394d6&projectId=4`,
|
||||
// url: `${VITE_RENDERER_URL}`,
|
||||
// accessToken: localStorage.getItem('y-code-access-token'),
|
||||
fileId: '7pfr394d6',
|
||||
projectId: '4',
|
||||
projectId: 4,
|
||||
name: 'StaticFileList',
|
||||
sync: true,
|
||||
degrade: true,
|
||||
// url: 'https://react.dev/',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -130,12 +130,12 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<div style="padding: 20px">
|
||||
<component :is="renderer" v-if="renderer" :wujie-props="wujieProps" />
|
||||
<div
|
||||
<component :is="renderer" :wujie-props="wujieProps" />
|
||||
<!-- <div
|
||||
v-else-if="!isLoading"
|
||||
style="margin-top: 50px; color: red; text-align: center"
|
||||
>
|
||||
组件加载失败,请检查控制台日志
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -13,7 +13,7 @@ export default defineConfig(({ mode }) => {
|
||||
server: isDev
|
||||
? {
|
||||
port: Number(env.VITE_PORT),
|
||||
cors: true,
|
||||
// cors: true,
|
||||
}
|
||||
: undefined,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user