fix: antd lint

This commit is contained in:
xingyu4j
2025-11-24 14:34:38 +08:00
parent 709afe9a83
commit 50ba0c137a
76 changed files with 220 additions and 205 deletions

View File

@@ -403,8 +403,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;
}
@@ -552,9 +552,9 @@ onMounted(async () => {
/>
<!-- 右侧详情部分 -->
<Layout class="bg-card mx-4">
<Layout class="mx-4 bg-card">
<Layout.Header
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 : '对话' }}
@@ -613,9 +613,9 @@ onMounted(async () => {
</div>
</Layout.Content>
<Layout.Footer class="!bg-card flex flex-col !p-0">
<Layout.Footer 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"

View File

@@ -414,7 +414,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"

View File

@@ -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"
>

View File

@@ -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">

View File

@@ -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"
>
<Button shape="circle">

View File

@@ -110,7 +110,7 @@ async function handleTabsScroll() {
<Menu.Item @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>
</Menu.Item>
</Menu>

View File

@@ -176,12 +176,12 @@ onMounted(async () => {
<template>
<Drawer>
<Layout
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" />
<Layout.Content class="relative m-0 flex-1 overflow-hidden p-0">
<div class="z-100 absolute right-0 top--1 mr-5 mt-5">
<div class="absolute right-0 top--1 z-100 mr-5 mt-5">
<!-- 搜索输入框 -->
<Input.Search
:loading="loading"

View File

@@ -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">
<Segmented
v-model:value="selectPlatform"
@@ -123,7 +123,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>

View File

@@ -228,7 +228,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',
]"

View File

@@ -203,7 +203,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"
>
<Pagination
:total="pageTotal"

View File

@@ -177,7 +177,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',
]"

View File

@@ -56,12 +56,12 @@ onMounted(async () => {
@keyup.enter="handleQuery"
/>
<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"
>
<Image
:src="item.picUrl"

View File

@@ -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">

View File

@@ -259,7 +259,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>

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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">

View File

@@ -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"
>
<Button
v-show="isWriting"

View File

@@ -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'
"