feat: 新增svg组件,批量替换
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
<script lang="tsx">
|
||||
import { Button } from 'ant-design-vue';
|
||||
import { Bubble } from '@/components/xt-chat/xt-bubble';
|
||||
import SvgIcon from '@/components/svg-icon/index.vue';
|
||||
|
||||
import Http from '@/api';
|
||||
import { downloadByUrl } from '@/utils/tools';
|
||||
@ -82,7 +83,7 @@ export default {
|
||||
type="primary"
|
||||
ghost
|
||||
class="mr-16px"
|
||||
v-slots={{ icon: () => <icon-plus size="14" /> }}
|
||||
v-slots={{ icon: () => <SvgIcon name="xt-plus" size="14" /> }}
|
||||
onClick={onAddMediaCenter}
|
||||
>
|
||||
素材中心
|
||||
@ -93,7 +94,7 @@ export default {
|
||||
type="primary"
|
||||
ghost
|
||||
class="mr-16px"
|
||||
v-slots={{ icon: () => <icon-plus size="14" /> }}
|
||||
v-slots={{ icon: () => <SvgIcon name="xt-plus" size="14" /> }}
|
||||
onClick={onAddTaskManage}
|
||||
>
|
||||
任务管理
|
||||
@ -102,13 +103,13 @@ export default {
|
||||
type="outline"
|
||||
size="medium"
|
||||
class="mr-16px"
|
||||
v-slots={{ icon: () => <icon-download size="14" /> }}
|
||||
v-slots={{ icon: () => <SvgIcon name="xt-download" size="14" /> }}
|
||||
onClick={onDownload}
|
||||
>
|
||||
下载
|
||||
</Button>*/}
|
||||
<div class="line mr-24px w-1px h-16px bg-#B1B2B5"></div>
|
||||
<icon-close size={20} class="color-#737478 cursor-pointer" onClick={() => emit('close')} />
|
||||
<SvgIcon name="xt-close" size={20} class="color-#737478 cursor-pointer" onClick={() => emit('close')} />
|
||||
</header>
|
||||
);
|
||||
};
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { Sender } from 'ant-design-x-vue';
|
||||
import { Tooltip } from 'ant-design-vue';
|
||||
import SvgIcon from '@/components/svg-icon/index.vue';
|
||||
|
||||
interface SenderInputProps {
|
||||
modelValue?: string;
|
||||
@ -73,7 +74,7 @@ export default {
|
||||
isEmptyValue.value ? 'opacity-50' : ''
|
||||
}`}
|
||||
>
|
||||
<icon-arrow-right size={20} class="color-#FFFFFF" />
|
||||
<SvgIcon name="xt-arrow-right" size={20} class="color-#FFFFFF" />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@ -3,14 +3,7 @@ import { ref } from 'vue';
|
||||
import type { BubbleListProps } from '@/components/xt-chat/xt-bubble/types';
|
||||
import markdownit from 'markdown-it';
|
||||
import { message as antdMessage } from 'ant-design-vue';
|
||||
import {
|
||||
IconFile,
|
||||
IconCaretUp,
|
||||
IconDownload,
|
||||
IconCaretDown,
|
||||
IconRefresh,
|
||||
IconCopy,
|
||||
} from '@arco-design/web-vue/es/icon';
|
||||
import SvgIcon from '@/components/svg-icon/index.vue';
|
||||
|
||||
import { Tooltip } from 'ant-design-vue';
|
||||
import TextOverTips from '@/components/text-over-tips/index.vue';
|
||||
@ -111,14 +104,14 @@ export default function useChatHandler(options: UseChatHandlerOptions): UseChatH
|
||||
return (
|
||||
<div class="flex items-center">
|
||||
<Tooltip title="复制" onClick={() => onCopy(content)} align={{ offset: [0, 4] }}>
|
||||
<div class="action-box">
|
||||
<IconCopy size={16} class="color-#737478" />
|
||||
<div class="action-box flex items-center">
|
||||
<SvgIcon name="xt-copy" size="16" class="color-#737478"/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
{isLastRunTask && (
|
||||
<Tooltip title="重新生成" onClick={() => handleRemoteRefresh(item)} align={{ offset: [0, 4] }}>
|
||||
<div class="action-box ml-12px">
|
||||
<IconRefresh size={16} class="color-#737478 " />
|
||||
<div class="action-box ml-12px flex items-center">
|
||||
<SvgIcon name="xt-refresh" size="16" class="color-#737478"/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
@ -317,7 +310,7 @@ export default function useChatHandler(options: UseChatHandlerOptions): UseChatH
|
||||
<>
|
||||
{_targetData && (
|
||||
<div class="file-card mt-10px">
|
||||
<IconFile class="w-24px h-24px mr-16px color-#6D4CFE" />
|
||||
<SvgIcon name="xt-file" size="14" class="color-#6D4CFE w-24px h-24px mr-16px"/>
|
||||
<div>
|
||||
<TextOverTips
|
||||
context={FILE_TYPE_MAP?.[_targetData.file_type] ?? '-'}
|
||||
@ -348,14 +341,14 @@ export default function useChatHandler(options: UseChatHandlerOptions): UseChatH
|
||||
// ) :
|
||||
<Tooltip title="复制" onClick={() => onCopy(existingItem.content.output)} align={{ offset: [0, 4] }}>
|
||||
<div class="action-box">
|
||||
<IconCopy size={16} class="color-#737478" />
|
||||
<SvgIcon name="xt-copy" size="16" class="color-#737478"/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
{isLastRunTask && (
|
||||
<Tooltip title="重新生成" onClick={() => onRefresh(teamRunTaskId)} align={{ offset: [0, 4] }}>
|
||||
<div class="action-box ml-12px">
|
||||
<IconRefresh size={16} class="color-#737478 " />
|
||||
<div class="action-box ml-12px flex items-center">
|
||||
<SvgIcon name="xt-refresh" size="16" class="color-#737478"/>
|
||||
</div>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user