feat(@vben/web-antd): 集成 Ant Design 组件库
- 在项目中引入 Antd 组件库和样式 - 优化聊天流接口调用,支持获取聊天列表 - 新增 PPT模板生成相关功能和界面- 调整静态资源代理配置,支持 PPT 文件加载
This commit is contained in:
parent
7020672e57
commit
e39433e49c
@ -22,21 +22,39 @@ export namespace ChatflowApi {
|
||||
limit: string;
|
||||
content?: string | undefined;
|
||||
}
|
||||
|
||||
export interface ChatListResult {
|
||||
id: string;
|
||||
name: string;
|
||||
inputs: {
|
||||
[key: string]: any;
|
||||
};
|
||||
status: string;
|
||||
introduction: string;
|
||||
createAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
}
|
||||
|
||||
// 聊天流
|
||||
export function sendChatflow(
|
||||
export async function sendChatflow(
|
||||
params: ChatflowApi.ChatParams,
|
||||
data: ChatflowApi.CompletionsBody,
|
||||
) {
|
||||
return requestClient.post(`/v1/chat/completions/${params.appid}`, data);
|
||||
}
|
||||
|
||||
export function getChatList(
|
||||
export async function getChatList(
|
||||
params: ChatflowApi.ChatParams,
|
||||
data: ChatflowApi.ChatListBody,
|
||||
) {
|
||||
return requestClient.post(`/v1/chat/conversations/${params.appid}`, data);
|
||||
const url = params.appid
|
||||
? `/v1/chat/conversations/${params.appid}`
|
||||
: '/v1/chat/conversations/';
|
||||
return requestClient.request<ChatflowApi.ChatListResult[]>(url, {
|
||||
data,
|
||||
method: 'POST',
|
||||
});
|
||||
}
|
||||
|
||||
// export function stopChatflow(data){
|
||||
|
@ -8,6 +8,7 @@ import '@vben/styles';
|
||||
import '@vben/styles/antd';
|
||||
|
||||
import { useTitle } from '@vueuse/core';
|
||||
import Antd from 'ant-design-vue';
|
||||
|
||||
import { $t, setupI18n } from '#/locales';
|
||||
|
||||
@ -15,6 +16,8 @@ import { initComponentAdapter } from './adapter/component';
|
||||
import App from './app.vue';
|
||||
import { router } from './router';
|
||||
|
||||
import 'ant-design-vue/dist/reset.css';
|
||||
|
||||
async function bootstrap(namespace: string) {
|
||||
// 初始化组件适配器
|
||||
await initComponentAdapter();
|
||||
@ -66,7 +69,7 @@ async function bootstrap(namespace: string) {
|
||||
}
|
||||
});
|
||||
|
||||
app.mount('#app');
|
||||
app.use(Antd).mount('#app');
|
||||
}
|
||||
|
||||
export { bootstrap };
|
||||
|
@ -267,7 +267,7 @@ const [agent] = useXAgent({
|
||||
appid: 'baca08c1-e92b-4dc9-a445-3584803f54d4',
|
||||
},
|
||||
{
|
||||
userId: '1562',
|
||||
userId: '1563',
|
||||
conversationId: '',
|
||||
files: [],
|
||||
inputs: {
|
||||
@ -385,7 +385,7 @@ const getConversationList = async () => {
|
||||
appid: '363b9580-ae60-4a40-ae7d-ec434e86e326',
|
||||
},
|
||||
{
|
||||
userId: '1562',
|
||||
userId: '1563',
|
||||
lastId: '4dfa17e1-364a-4c98-af5d-1109c8f28212',
|
||||
sortBy: '',
|
||||
limit: '5',
|
||||
|
@ -17,9 +17,8 @@ export default defineConfig(async () => {
|
||||
target: 'http://localhost:8081/v1',
|
||||
rewrite: (path) => path.replace(/^\/v1/, ''),
|
||||
changeOrigin: true,
|
||||
ws: true,
|
||||
},
|
||||
'/static/*.pptx': {
|
||||
'/static': {
|
||||
target: 'http://47.112.173.8:6802',
|
||||
changeOrigin: true,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user