优化数据,增加默认的插件前缀
This commit is contained in:
parent
8bbc9e1a81
commit
f6845a7675
@ -1,6 +1,5 @@
|
||||
<!--应用插件开发示例-->
|
||||
<script setup lang="ts">
|
||||
|
||||
|
||||
import {GlobalInjectKeyConst, type GlobalInjectUploadFileToOSS} from "~/types";
|
||||
import ImagePreviewWithUpload from "./ImagePreviewWithUpload.vue";
|
||||
import RecommendedImages from "./RecommendedImages.vue";
|
||||
|
@ -31,7 +31,7 @@ export interface IComponentMateInfo<
|
||||
export type ComponentDataMap = {
|
||||
[ComponentSceneConst.DrawPanne]: IDrawPanneData;
|
||||
[ComponentSceneConst.DynamicPage]: IDynamicPageData;
|
||||
[ComponentSceneConst.AppGuide]: undefined;
|
||||
[ComponentSceneConst.AppGuide]: { label: string };
|
||||
[ComponentSceneConst.Workflow]?: never;
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
/**
|
||||
* 页面插件示例
|
||||
*/
|
||||
|
||||
import {ComponentSceneConst, type IComponentMateInfo} from "~/composables";
|
||||
import {BuilderComponentGroupConst} from "~/composables/meta/interface/dynamicPage.interface";
|
||||
export default {
|
||||
|
@ -1,9 +1,14 @@
|
||||
import { ComponentSceneConst, type IComponentMateInfo } from "~/composables";
|
||||
|
||||
/**
|
||||
* 应用右侧使用说明插件
|
||||
*/
|
||||
export default {
|
||||
name: "StyleFusionGuide", // 组件名称
|
||||
path: "./components/StyleFusionGuide/index.vue", // 组件路径
|
||||
scenes: ComponentSceneConst.AppGuide, // 组件场景
|
||||
description: "应用引导-款式融合", // 组件描述
|
||||
data: undefined
|
||||
data: {
|
||||
label: "应用使用指南", // 组件标签
|
||||
}
|
||||
} satisfies IComponentMateInfo<typeof ComponentSceneConst.AppGuide>;
|
||||
|
@ -8,6 +8,9 @@ import { createInjectClassPlugin } from "./build/vite-plugins/injectClassPlugin"
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: "2025-05-15",
|
||||
devtools: { enabled: false },
|
||||
app:{
|
||||
baseURL: "/plugins/"
|
||||
},
|
||||
imports: {
|
||||
dirs: ["composables", "composables/**"],
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "easyai-remote-ui-kit",
|
||||
"private": true,
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.10",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prebuild": "node scripts/updateVersion.js",
|
||||
@ -66,4 +66,4 @@
|
||||
"vite-plugin-top-level-await": "^1.6.0"
|
||||
},
|
||||
"packageManager": "pnpm@9.7.0+sha512.dc09430156b427f5ecfc79888899e1c39d2d690f004be70e05230b72cb173d96839587545d09429b55ac3c429c801b4dc3c0e002f653830a420fa2dd4e3cf9cf"
|
||||
}
|
||||
}
|
15
pm2.config.js
Normal file
15
pm2.config.js
Normal file
@ -0,0 +1,15 @@
|
||||
export const apps = [
|
||||
{
|
||||
name: "easyai-plugins",
|
||||
script: "./.output/server/index.mjs",
|
||||
watch: false,
|
||||
ignore_watch: [".pm2", "node_modules", "logs"],
|
||||
exec_mode: "cluster", // 这一行开启集群模式
|
||||
instances: 4, // 自动根据CPU核心数启动对应数量的进程
|
||||
// env 块用于定义应用运行时要使用的环境变量
|
||||
env: {
|
||||
PORT: process.env.PORT || 3020, // 如果ENV中有PORT,就用ENV的,否则用3010
|
||||
NODE_ENV: process.env.NODE_ENV || "production", // 同理
|
||||
},
|
||||
},
|
||||
];
|
@ -17,10 +17,16 @@ export default defineEventHandler(async (event) => {
|
||||
|
||||
try {
|
||||
// Nuxt buildDir 是 .nuxt
|
||||
const manifestPath = join(process.cwd(), "public/generated/manifest.js");
|
||||
let manifestPath = join(process.cwd(), "public/generated/manifest.js");
|
||||
|
||||
// 检查文件是否存在
|
||||
await fs.access(manifestPath);
|
||||
try {
|
||||
await fs.access(manifestPath);
|
||||
} catch {
|
||||
// fallback 到 .output/public
|
||||
manifestPath = join(process.cwd(), ".output/public/generated/manifest.js");
|
||||
await fs.access(manifestPath);
|
||||
}
|
||||
|
||||
// 动态导入
|
||||
const { manifestInfo } = await import(manifestPath);
|
||||
|
Loading…
Reference in New Issue
Block a user