优化数据,增加默认的插件前缀
This commit is contained in:
parent
8bbc9e1a81
commit
f6845a7675
@ -1,6 +1,5 @@
|
|||||||
|
<!--应用插件开发示例-->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
|
||||||
import {GlobalInjectKeyConst, type GlobalInjectUploadFileToOSS} from "~/types";
|
import {GlobalInjectKeyConst, type GlobalInjectUploadFileToOSS} from "~/types";
|
||||||
import ImagePreviewWithUpload from "./ImagePreviewWithUpload.vue";
|
import ImagePreviewWithUpload from "./ImagePreviewWithUpload.vue";
|
||||||
import RecommendedImages from "./RecommendedImages.vue";
|
import RecommendedImages from "./RecommendedImages.vue";
|
||||||
|
@ -31,7 +31,7 @@ export interface IComponentMateInfo<
|
|||||||
export type ComponentDataMap = {
|
export type ComponentDataMap = {
|
||||||
[ComponentSceneConst.DrawPanne]: IDrawPanneData;
|
[ComponentSceneConst.DrawPanne]: IDrawPanneData;
|
||||||
[ComponentSceneConst.DynamicPage]: IDynamicPageData;
|
[ComponentSceneConst.DynamicPage]: IDynamicPageData;
|
||||||
[ComponentSceneConst.AppGuide]: undefined;
|
[ComponentSceneConst.AppGuide]: { label: string };
|
||||||
[ComponentSceneConst.Workflow]?: never;
|
[ComponentSceneConst.Workflow]?: never;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* 页面插件示例
|
||||||
|
*/
|
||||||
|
|
||||||
import {ComponentSceneConst, type IComponentMateInfo} from "~/composables";
|
import {ComponentSceneConst, type IComponentMateInfo} from "~/composables";
|
||||||
import {BuilderComponentGroupConst} from "~/composables/meta/interface/dynamicPage.interface";
|
import {BuilderComponentGroupConst} from "~/composables/meta/interface/dynamicPage.interface";
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
import { ComponentSceneConst, type IComponentMateInfo } from "~/composables";
|
import { ComponentSceneConst, type IComponentMateInfo } from "~/composables";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用右侧使用说明插件
|
||||||
|
*/
|
||||||
export default {
|
export default {
|
||||||
name: "StyleFusionGuide", // 组件名称
|
name: "StyleFusionGuide", // 组件名称
|
||||||
path: "./components/StyleFusionGuide/index.vue", // 组件路径
|
path: "./components/StyleFusionGuide/index.vue", // 组件路径
|
||||||
scenes: ComponentSceneConst.AppGuide, // 组件场景
|
scenes: ComponentSceneConst.AppGuide, // 组件场景
|
||||||
description: "应用引导-款式融合", // 组件描述
|
description: "应用引导-款式融合", // 组件描述
|
||||||
data: undefined
|
data: {
|
||||||
|
label: "应用使用指南", // 组件标签
|
||||||
|
}
|
||||||
} satisfies IComponentMateInfo<typeof ComponentSceneConst.AppGuide>;
|
} satisfies IComponentMateInfo<typeof ComponentSceneConst.AppGuide>;
|
||||||
|
@ -8,6 +8,9 @@ import { createInjectClassPlugin } from "./build/vite-plugins/injectClassPlugin"
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: "2025-05-15",
|
compatibilityDate: "2025-05-15",
|
||||||
devtools: { enabled: false },
|
devtools: { enabled: false },
|
||||||
|
app:{
|
||||||
|
baseURL: "/plugins/"
|
||||||
|
},
|
||||||
imports: {
|
imports: {
|
||||||
dirs: ["composables", "composables/**"],
|
dirs: ["composables", "composables/**"],
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "easyai-remote-ui-kit",
|
"name": "easyai-remote-ui-kit",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.2",
|
"version": "1.0.10",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "node scripts/updateVersion.js",
|
"prebuild": "node scripts/updateVersion.js",
|
||||||
|
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 {
|
try {
|
||||||
// Nuxt buildDir 是 .nuxt
|
// 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);
|
const { manifestInfo } = await import(manifestPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user