mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-14 05:33:42 +08:00
fix aside
This commit is contained in:
@@ -3,8 +3,19 @@ import { http, HttpResponse } from "msw";
|
||||
|
||||
export default [
|
||||
http.post("/ai/chat", () => {
|
||||
const response = new HttpResponse(
|
||||
`data: ${faker.lorem.sentence({ min: 10, max: 100 })}\n\n`,
|
||||
{
|
||||
headers: {
|
||||
"Content-Type": "text/event-stream",
|
||||
},
|
||||
},
|
||||
);
|
||||
return response;
|
||||
}),
|
||||
http.post("/ai/action/chat", () => {
|
||||
const response = HttpResponse.json({
|
||||
message: faker.lorem.sentence({ min: 100, max: 300 }),
|
||||
action: "CREATE_USER",
|
||||
});
|
||||
return response;
|
||||
}),
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
class="flex flex-col box-border px-3 scroll-auto overflow-auto fixed top-0 right-0 w-64 border-gray-200 border-l min-h-screen"
|
||||
<div class="h-[calc(100vh-3.5rem)] flex flex-col box-border p-3 overflow-y-auto w-72 border-gray-200 border-l"
|
||||
ref="chatContainer">
|
||||
<div class="flex flex-col gap-y-5 flex-1">
|
||||
<div class="flex flex-col gap-y-5 flex-1 pb-2">
|
||||
<li v-for="chatElement in messages" :key="chatElement.content"
|
||||
:class="['flex items-start gap-2.5', chatElement.isUser ? 'flex-row-reverse' : 'flex-row']">
|
||||
<img class="w-8 h-8 rounded-full" :src="chatElement.isUser ? '/java.svg' : '/trump.jpg'" alt="avatar">
|
||||
@@ -143,10 +142,6 @@ const commandContentMap: Record<string, string> = {
|
||||
DELETE_DEPARTMENT: "删除部门",
|
||||
};
|
||||
|
||||
const toggleMode = () => {
|
||||
isCommandMode.value = !isCommandMode.value;
|
||||
};
|
||||
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
|
||||
@@ -9,8 +9,13 @@ import Assistant from "./Assistant.vue";
|
||||
<Headbar></Headbar>
|
||||
<Sidebar>
|
||||
</Sidebar>
|
||||
<article class="flex flex-row ml-44 mr-64 scroll-auto overflow-auto mt-14">
|
||||
<RouterView></RouterView>
|
||||
</article>
|
||||
<Assistant></Assistant>
|
||||
<!-- 主内容区域 -->
|
||||
<div class="flex flex-row h-[calc(100vh-3.5rem)] mt-14"> <!-- 减去Headbar高度 -->
|
||||
<!-- 文章内容区域 -->
|
||||
<article class="flex-1 ml-44 overflow-y-auto">
|
||||
<RouterView></RouterView>
|
||||
</article>
|
||||
<Assistant></Assistant>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="px-4 pt-6 xl:grid-cols-3 xl:gap-4 sm:rounded-lg">
|
||||
<div class="px-4 pt-6 xl:grid-cols-3 xl:gap-4 sm:rounded-lg ">
|
||||
<div class="mb-4 col-span-full">
|
||||
<Breadcrumbs :names="['用户管理']" />
|
||||
<h1 class="text-xl font-semibold text-gray-900 sm:text-2xl ">用户管理</h1>
|
||||
|
||||
Reference in New Issue
Block a user