easyai-plugin-dev-kit/app.vue
2025-10-06 16:08:44 +08:00

66 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<!-- 调试对象-->
<!-- 绘画面板-图片上传组件-->
<ImageUpload />
<!-- 首页-所有应用组件-->
<AllApps/>
<!-- 应用引导-款式融合-->
<StyleFusionGuide/>
<!-- 工作流节点-Markdown转Html-->
<Markdown2Html v-model:data="data"/>
</div>
</template>
<script lang="ts" setup>
import {
GlobalInjectKeyConst,
type GlobalInjectMaterials, type GlobalInjectWorkflowAppStatus
} from "~/types/common";
import { MockMaterials } from "~/composables/mock/material.data";
import { MorkWorkflows } from "~/composables/mock/workflow.data";
const materialData = ref(MockMaterials);
/**
* EasyAI平台已全局注入素材库库信息这里使用mock数据用于调试
*/
provide<GlobalInjectMaterials>(GlobalInjectKeyConst.AllMaterials, {
materials: materialData,
refreshMaterials: async () => void 0,
});
const workflowData = ref(MorkWorkflows)
/**
* EasyAI平台已全局注入工作流应用信息这里使用mock数据用于调试
*/
provide<GlobalInjectWorkflowAppStatus>(GlobalInjectKeyConst.AllWorkFlowApps, {
workflows : workflowData,
refreshAllWorkflows: async () => void 0,
});
const data = ref({
_meta: {
title: "markdown转html"
},
inputs: {},
data: {
method: 'POST', // 请求方法
url: 'http://localhost:3200/plugins/api/markdown2html', // 请求地址,节点的业务逻辑,需要在接口中完成
body: {
markdown: '1' // 接口请求体内容输入的markdown内容
},
headers: {
'Content-Type': 'application/json'
// 依据接口自行扩展,认证等信息
}
},
})
</script>