fix: ele lint
This commit is contained in:
@@ -411,8 +411,8 @@ async function doSendMessageStream(userMessage: AiChatMessageApi.ChatMessage) {
|
||||
const lastMessage =
|
||||
activeMessageList.value[activeMessageList.value.length - 1];
|
||||
// 累加推理内容
|
||||
lastMessage.reasoningContent =
|
||||
(lastMessage.reasoningContent || '') +
|
||||
lastMessage!.reasoningContent =
|
||||
(lastMessage!.reasoningContent || '') +
|
||||
data.receive.reasoningContent;
|
||||
}
|
||||
|
||||
@@ -563,9 +563,9 @@ onMounted(async () => {
|
||||
/>
|
||||
|
||||
<!-- 右侧:详情部分 -->
|
||||
<ElContainer direction="vertical" class="bg-card mx-4 flex-1">
|
||||
<ElContainer direction="vertical" class="mx-4 flex-1 bg-card">
|
||||
<ElHeader
|
||||
class="!bg-card border-border flex !h-12 items-center justify-between border-b !px-4"
|
||||
class="flex !h-12 items-center justify-between border-b border-border !bg-card !px-4"
|
||||
>
|
||||
<div class="text-lg font-bold">
|
||||
{{ activeConversation?.title ? activeConversation?.title : '对话' }}
|
||||
@@ -632,9 +632,9 @@ onMounted(async () => {
|
||||
</div>
|
||||
</ElMain>
|
||||
|
||||
<ElFooter height="auto" class="!bg-card flex flex-col !p-0">
|
||||
<ElFooter height="auto" class="flex flex-col !bg-card !p-0">
|
||||
<form
|
||||
class="border-border mx-4 mb-8 mt-2 flex flex-col rounded-xl border p-2"
|
||||
class="mx-4 mb-8 mt-2 flex flex-col rounded-xl border border-border p-2"
|
||||
>
|
||||
<textarea
|
||||
class="box-border h-24 resize-none overflow-auto rounded-md p-2 focus:outline-none"
|
||||
|
||||
@@ -421,7 +421,7 @@ onMounted(async () => {
|
||||
|
||||
<!-- 左底部:工具栏 -->
|
||||
<div
|
||||
class="bg-card absolute bottom-1 left-0 right-0 mb-4 flex items-center justify-between px-5 leading-9 text-gray-400 shadow-sm"
|
||||
class="absolute bottom-1 left-0 right-0 mb-4 flex items-center justify-between bg-card px-5 leading-9 text-gray-400 shadow-sm"
|
||||
>
|
||||
<div
|
||||
class="flex cursor-pointer items-center text-gray-400"
|
||||
|
||||
@@ -138,14 +138,14 @@ async function uploadFile(fileItem: FileItem) {
|
||||
fileItem.progress = 100;
|
||||
|
||||
// 调试日志
|
||||
console.log('上传响应:', response);
|
||||
console.warn('上传响应:', response);
|
||||
|
||||
// 兼容不同的返回格式:{ url: '...' } 或 { data: '...' } 或直接是字符串
|
||||
const fileUrl =
|
||||
(response as any)?.url || (response as any)?.data || response;
|
||||
fileItem.url = fileUrl;
|
||||
|
||||
console.log('提取的文件 URL:', fileUrl);
|
||||
console.warn('提取的文件 URL:', fileUrl);
|
||||
|
||||
// 只有当 URL 有效时才添加到列表
|
||||
if (fileUrl && typeof fileUrl === 'string') {
|
||||
@@ -242,7 +242,7 @@ onUnmounted(() => {
|
||||
<!-- Hover 显示的文件列表 -->
|
||||
<div
|
||||
v-if="hasFiles && showTooltip"
|
||||
class="animate-in fade-in slide-in-from-bottom-1 absolute bottom-[calc(100%+8px)] left-1/2 z-[1000] min-w-[240px] max-w-[320px] -translate-x-1/2 rounded-lg border border-gray-200 bg-white p-2 shadow-lg duration-200"
|
||||
class="absolute bottom-[calc(100%+8px)] left-1/2 z-[1000] min-w-[240px] max-w-[320px] -translate-x-1/2 rounded-lg border border-gray-200 bg-white p-2 shadow-lg duration-200 animate-in fade-in slide-in-from-bottom-1"
|
||||
@mouseenter="showTooltipHandler"
|
||||
@mouseleave="hideTooltipHandler"
|
||||
>
|
||||
|
||||
@@ -66,7 +66,7 @@ function handleClick(doc: any) {
|
||||
<div
|
||||
v-for="(doc, index) in documentList"
|
||||
:key="index"
|
||||
class="bg-card cursor-pointer rounded-lg p-2 px-3 transition-all hover:bg-blue-50"
|
||||
class="cursor-pointer rounded-lg bg-card p-2 px-3 transition-all hover:bg-blue-50"
|
||||
@click="handleClick(doc)"
|
||||
>
|
||||
<div class="mb-1 text-sm text-gray-600">
|
||||
|
||||
@@ -233,7 +233,7 @@ onMounted(async () => {
|
||||
<!-- 回到底部按钮 -->
|
||||
<div
|
||||
v-if="isScrolling"
|
||||
class="z-1000 absolute bottom-0 right-1/2"
|
||||
class="absolute bottom-0 right-1/2 z-1000"
|
||||
@click="handleGoBottom"
|
||||
>
|
||||
<ElButton circle>
|
||||
|
||||
@@ -107,7 +107,7 @@ async function handleTabsScroll() {
|
||||
<ElDropdownItem @click="handleMoreClick('edit', role)">
|
||||
<div class="flex items-center">
|
||||
<IconifyIcon icon="lucide:edit" color="#787878" />
|
||||
<span class="text-primary ml-2">编辑</span>
|
||||
<span class="ml-2 text-primary">编辑</span>
|
||||
</div>
|
||||
</ElDropdownItem>
|
||||
</ElDropdownMenu>
|
||||
|
||||
@@ -183,12 +183,12 @@ onMounted(async () => {
|
||||
<template>
|
||||
<Drawer>
|
||||
<ElContainer
|
||||
class="bg-card absolute inset-0 flex h-full w-full flex-col overflow-hidden"
|
||||
class="absolute inset-0 flex h-full w-full flex-col overflow-hidden bg-card"
|
||||
>
|
||||
<FormModal @success="handlerAddRoleSuccess" />
|
||||
|
||||
<ElMain class="relative m-0 flex-1 overflow-hidden p-0">
|
||||
<div class="z-100 absolute right-5 top-5 flex items-center">
|
||||
<div class="absolute right-5 top-5 z-100 flex items-center">
|
||||
<!-- 搜索输入框 -->
|
||||
<ElInput
|
||||
v-model="search"
|
||||
|
||||
@@ -89,7 +89,7 @@ onMounted(async () => {
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<div class="absolute inset-0 m-4 flex h-full w-full flex-row">
|
||||
<div class="bg-card left-0 mr-4 flex w-96 flex-col rounded-lg p-4">
|
||||
<div class="left-0 mr-4 flex w-96 flex-col rounded-lg bg-card p-4">
|
||||
<div class="flex justify-center">
|
||||
<ElSegmented v-model="selectPlatform" :options="platformOptions" />
|
||||
</div>
|
||||
@@ -120,7 +120,7 @@ onMounted(async () => {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-card flex-1">
|
||||
<div class="flex-1 bg-card">
|
||||
<ImageList ref="imageListRef" @on-regeneration="handleRegeneration" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -231,7 +231,7 @@ defineExpose({ settingValues });
|
||||
@click="handleSizeClick(imageSize)"
|
||||
>
|
||||
<div
|
||||
class="bg-card flex h-12 w-12 flex-col items-center justify-center rounded-lg border p-0"
|
||||
class="flex h-12 w-12 flex-col items-center justify-center rounded-lg border bg-card p-0"
|
||||
:class="[
|
||||
selectSize === imageSize.key ? 'border-blue-500' : 'border-white',
|
||||
]"
|
||||
|
||||
@@ -144,7 +144,7 @@ async function handleImageMidjourneyButtonClick(
|
||||
const data = {
|
||||
id: imageDetail.id,
|
||||
customId: button.customId,
|
||||
} as AiImageApi.ImageMidjourneyActionVO;
|
||||
} as AiImageApi.ImageMidjourneyAction;
|
||||
// 2. 发送 action
|
||||
await midjourneyAction(data);
|
||||
// 3. 刷新列表
|
||||
@@ -206,7 +206,7 @@ onUnmounted(async () => {
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="bg-card sticky bottom-0 z-50 flex h-16 items-center justify-center shadow-sm"
|
||||
class="sticky bottom-0 z-50 flex h-16 items-center justify-center bg-card shadow-sm"
|
||||
>
|
||||
<ElPagination
|
||||
:total="pageTotal"
|
||||
|
||||
@@ -179,7 +179,7 @@ defineExpose({ settingValues });
|
||||
@click="handleSizeClick(imageSize)"
|
||||
>
|
||||
<div
|
||||
class="bg-card flex h-12 w-12 items-center justify-center rounded-lg border p-0"
|
||||
class="flex h-12 w-12 items-center justify-center rounded-lg border bg-card p-0"
|
||||
:class="[
|
||||
selectSize === imageSize.key ? 'border-blue-500' : 'border-white',
|
||||
]"
|
||||
|
||||
@@ -61,12 +61,12 @@ onMounted(async () => {
|
||||
</template>
|
||||
</ElInput>
|
||||
<div
|
||||
class="bg-card grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2.5 shadow-sm"
|
||||
class="grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2.5 bg-card shadow-sm"
|
||||
>
|
||||
<div
|
||||
v-for="item in list"
|
||||
:key="item.id"
|
||||
class="bg-card relative cursor-pointer overflow-hidden transition-transform duration-300 hover:scale-105"
|
||||
class="relative cursor-pointer overflow-hidden bg-card transition-transform duration-300 hover:scale-105"
|
||||
>
|
||||
<ElImage
|
||||
:src="item.picUrl"
|
||||
|
||||
@@ -132,7 +132,7 @@ onMounted(async () => {
|
||||
<div class="mx-auto">
|
||||
<!-- 头部导航栏 -->
|
||||
<div
|
||||
class="bg-card absolute left-0 right-0 top-0 z-10 flex h-12 items-center border-b px-4"
|
||||
class="absolute left-0 right-0 top-0 z-10 flex h-12 items-center border-b bg-card px-4"
|
||||
>
|
||||
<!-- 左侧标题 -->
|
||||
<div class="flex w-48 items-center overflow-hidden">
|
||||
|
||||
@@ -263,7 +263,7 @@ onMounted(async () => {
|
||||
分片-{{ index + 1 }} · {{ segment.contentLength || 0 }} 字符数 ·
|
||||
{{ segment.tokens || 0 }} Token
|
||||
</div>
|
||||
<div class="bg-card rounded-md p-2">
|
||||
<div class="rounded-md bg-card p-2">
|
||||
{{ segment.content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,8 +25,8 @@ defineExpose({
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="bg-card flex w-80 flex-col rounded-lg p-5">
|
||||
<h3 class="text-primary h-7 w-full text-center text-xl leading-7">
|
||||
<div class="flex w-80 flex-col rounded-lg bg-card p-5">
|
||||
<h3 class="h-7 w-full text-center text-xl leading-7 text-primary">
|
||||
思维导图创作中心
|
||||
</h3>
|
||||
<div class="mt-4 flex-grow overflow-y-auto">
|
||||
|
||||
@@ -39,7 +39,7 @@ function audioTimeUpdate(args: any) {
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="b-1 b-l-none h-18 bg-card flex items-center justify-between border border-solid border-rose-100 px-2"
|
||||
class="b-1 b-l-none h-18 flex items-center justify-between border border-solid border-rose-100 bg-card px-2"
|
||||
>
|
||||
<!-- 歌曲信息 -->
|
||||
<div class="flex gap-2.5">
|
||||
|
||||
@@ -204,7 +204,7 @@ onBeforeUnmount(() => {
|
||||
<div class="mx-auto">
|
||||
<!-- 头部导航栏 -->
|
||||
<div
|
||||
class="bg-card absolute inset-x-0 top-0 z-10 flex h-12 items-center border-b px-5"
|
||||
class="absolute inset-x-0 top-0 z-10 flex h-12 items-center border-b bg-card px-5"
|
||||
>
|
||||
<!-- 左侧标题 -->
|
||||
<div class="flex w-48 items-center overflow-hidden">
|
||||
|
||||
@@ -256,7 +256,7 @@ defineExpose({ validate });
|
||||
</fieldset>
|
||||
|
||||
<fieldset
|
||||
class="bg-card m-0 mt-10 rounded-lg border border-gray-200 px-3 py-4"
|
||||
class="m-0 mt-10 rounded-lg border border-gray-200 bg-card px-3 py-4"
|
||||
>
|
||||
<legend class="ml-2 px-2.5 text-base font-semibold text-gray-600">
|
||||
<h3>运行结果</h3>
|
||||
|
||||
@@ -136,7 +136,7 @@ function handleSubmit() {
|
||||
<span>{{ label }}</span>
|
||||
<span
|
||||
v-if="hint"
|
||||
class="text-primary-500 flex cursor-pointer select-none items-center text-xs"
|
||||
class="flex cursor-pointer select-none items-center text-xs text-primary-500"
|
||||
@click="hintClick"
|
||||
>
|
||||
<IconifyIcon icon="lucide:circle-help" />
|
||||
@@ -145,14 +145,14 @@ function handleSubmit() {
|
||||
</h3>
|
||||
</DefineLabel>
|
||||
<div class="flex flex-col" v-bind="$attrs">
|
||||
<div class="bg-card flex w-full justify-center pt-2">
|
||||
<div class="bg-card z-10 w-72 rounded-full p-1">
|
||||
<div class="flex w-full justify-center bg-card pt-2">
|
||||
<div class="z-10 w-72 rounded-full bg-card p-1">
|
||||
<div
|
||||
:class="
|
||||
selectedTab === AiWriteTypeEnum.REPLY &&
|
||||
'after:translate-x-[100%] after:transform'
|
||||
"
|
||||
class="after:bg-card relative flex items-center after:absolute after:left-0 after:top-0 after:block after:h-7 after:w-1/2 after:rounded-full after:transition-transform after:content-['']"
|
||||
class="relative flex items-center after:absolute after:left-0 after:top-0 after:block after:h-7 after:w-1/2 after:rounded-full after:bg-card after:transition-transform after:content-['']"
|
||||
>
|
||||
<ReuseTab
|
||||
v-for="tab in tabs"
|
||||
@@ -166,7 +166,7 @@ function handleSubmit() {
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="bg-card box-border h-full w-96 flex-grow overflow-y-auto px-7 pb-2 lg:block"
|
||||
class="box-border h-full w-96 flex-grow overflow-y-auto bg-card px-7 pb-2 lg:block"
|
||||
>
|
||||
<div>
|
||||
<template v-if="selectedTab === AiWriteTypeEnum.WRITING">
|
||||
|
||||
@@ -72,7 +72,7 @@ watch(copied, (val) => {
|
||||
class="hide-scroll-bar box-border h-full overflow-y-auto"
|
||||
>
|
||||
<div
|
||||
class="bg-card relative box-border min-h-full w-full flex-grow p-2 sm:p-5"
|
||||
class="relative box-border min-h-full w-full flex-grow bg-card p-2 sm:p-5"
|
||||
>
|
||||
<ElButton
|
||||
v-show="isWriting"
|
||||
|
||||
@@ -21,7 +21,7 @@ const emits = defineEmits<{
|
||||
<span
|
||||
v-for="tag in props.tags"
|
||||
:key="tag.value"
|
||||
class="bg-card border-card-100 mb-2 cursor-pointer rounded border-2 border-solid px-1 text-xs leading-6"
|
||||
class="border-card-100 mb-2 cursor-pointer rounded border-2 border-solid bg-card px-1 text-xs leading-6"
|
||||
:class="
|
||||
modelValue === tag.value && '!border-primary-500 !text-primary-500'
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user