|
|
|
@ -3,40 +3,50 @@ |
|
|
|
<el-scrollbar ref="scrollDiv" @scroll="handleScrollTop"> |
|
|
|
<div ref="dialogScrollbar" class="ai-chat__content p-24 chat-width" style="padding: 24px;"> |
|
|
|
<div class="item-content mb-16" style="margin-bottom: 16px"> |
|
|
|
<div class="avatar"> |
|
|
|
<img src="@/assets/logo/logo2.png" height="30px" /> |
|
|
|
</div> |
|
|
|
<!-- <div class="avatar">--> |
|
|
|
<!-- <img src="@/assets/logo/logo2.png" height="30px" />--> |
|
|
|
<!-- </div>--> |
|
|
|
<div class="content"> |
|
|
|
<el-card shadow="always" class="dialog-card"> |
|
|
|
<span style="font-size: 14px">您好,我是 果知小助手,您可以向我提出关于 果知的相关问题。</span> |
|
|
|
</el-card> |
|
|
|
<span style="font-size: 14px">您好,我是 果知小助手,您可以向我提出关于 果知的相关问题。</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<template v-for="(item, index) in chatList" :key="index"> |
|
|
|
<!-- 问题 --> |
|
|
|
<div v-if="item.type === 'question'" class="item-content mb-16 lighter" style="margin-bottom: 16px;font-weight: 400;display: flex;align-items: flex-start;max-width: 100%;flex-direction: row-reverse;"> |
|
|
|
<div class="avatar" style="margin-left: 10px"> |
|
|
|
<el-avatar style="width:30px;height: 30px;background: #3370FF"> |
|
|
|
<img src="@/assets/aichat/user-icon.svg" style="width: 30px" alt="" /> |
|
|
|
</el-avatar> |
|
|
|
</div> |
|
|
|
<div v-if="item.type === 'question'" class="item-content mb-16 lighter" style="font-weight: 400;display: flex;align-items: flex-start;max-width: 100%;flex-direction: row-reverse;"> |
|
|
|
<!-- <div class="avatar" style="margin-left: 10px">--> |
|
|
|
<!-- <el-avatar style="width:30px;height: 30px;background: #3370FF">--> |
|
|
|
<!-- <img src="@/assets/aichat/user-icon.svg" style="width: 30px" alt="" />--> |
|
|
|
<!-- </el-avatar>--> |
|
|
|
<!-- </div>--> |
|
|
|
<div class="content" style="max-width: 100%;word-break: break-all;white-space: pre-wrap;"> |
|
|
|
<div class="text break-all pre-wrap" style="word-break: break-all;white-space: pre-wrap;"> |
|
|
|
{{ item.content }} |
|
|
|
</div> |
|
|
|
<el-card class="chat_question_card" shadow="never" style="border-radius: 26px;background-color: #f5f5f5"> |
|
|
|
<div class="text break-all pre-wrap" style="word-break: break-all;white-space: pre-wrap;font-size: 14px"> |
|
|
|
{{ item.content }} |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
<el-tag type="success" style="margin-bottom: 5px;cursor: pointer;display: inline-block" v-for="(fileName,index) in item.file" :disable-transitions="false" @click="downloadFile(fileName.file,fileName.bucket,item.sessionId)">{{fileName.file}}</el-tag> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 回答 --> |
|
|
|
<div v-if="item.type === 'answer'" class="item-content mb-16 lighter" style="margin-bottom: 16px;font-weight: 400"> |
|
|
|
<div class="avatar"> |
|
|
|
<img src="@/assets/logo/logo2.png" height="30px" /> |
|
|
|
</div> |
|
|
|
<div v-if="item.type === 'answer'" class="item-content mb-16 lighter" style="font-weight: 400"> |
|
|
|
<el-popconfirm popper-style="z-index:99999" title="确定要回到这一步吗?" @confirm="confirmReturn(item,index)"> |
|
|
|
<template #reference> |
|
|
|
<div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px"> |
|
|
|
<i class="ri-bookmark-2-fill returnToHereIcon"></i> |
|
|
|
<el-divider class="returnToHereDivider"> |
|
|
|
<span class="divider-text">回到这里</span> |
|
|
|
</el-divider> |
|
|
|
<i class="ri-arrow-go-back-line returnToHereIcon"></i> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
<!-- <div class="avatar">--> |
|
|
|
<!-- <img src="@/assets/logo/logo2.png" height="30px" />--> |
|
|
|
<!-- </div>--> |
|
|
|
<div class="content"> |
|
|
|
<el-card shadow="always" class="dialog-card"> |
|
|
|
<MdRenderer :is_large="is_large" :chatIndex="index" :source="item.content" @fullscreenG6="fullscreen"></MdRenderer> |
|
|
|
</el-card> |
|
|
|
<MdRenderer :is_large="is_large" :chatIndex="index" :source="item.content" @fullscreenG6="fullscreen"></MdRenderer> |
|
|
|
<Interrupt :isLastChat="index === (chatList.length - 1)" :chatId="item.chatId" :source="item.interrupt" :checkpointer="item.checkpointer" @processAuth="processAuth"></Interrupt> |
|
|
|
<div class="flex-between mt-8" style="display: flex; justify-content: space-between; align-items: center; margin-top: 8px"> |
|
|
|
<div> |
|
|
|
<el-button |
|
|
|
@ -132,6 +142,10 @@ |
|
|
|
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> |
|
|
|
<span style="font-size: 16px;margin-left: 10px">数据治理管理专家</span> |
|
|
|
</div> |
|
|
|
<div class="machineDiv" @click="chooseMachine('智能导航专家','@/assets/aichat/智能体logo.jpg')" style="align-items: center;width:100%;display: flex"> |
|
|
|
<el-avatar style="width: 30px;height: 30px"><img src="@/assets/aichat/智能体logo.jpg"></el-avatar> |
|
|
|
<span style="font-size: 16px;margin-left: 10px">智能导航专家</span> |
|
|
|
</div> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -146,6 +160,41 @@ |
|
|
|
<img v-show="isDisabledChart || loading" src="@/assets/aichat/icon_send.svg" alt="" /> |
|
|
|
<img v-show="!isDisabledChart && !loading" src="@/assets/aichat/icon_send_colorful.svg" alt="" /> |
|
|
|
</el-button> |
|
|
|
<el-popover |
|
|
|
popper-style="z-index:99999;width:300px" |
|
|
|
title="自动审批配置" |
|
|
|
placement="left-end" |
|
|
|
trigger="click" |
|
|
|
> |
|
|
|
<template #reference> |
|
|
|
<el-button |
|
|
|
text |
|
|
|
style="padding: 0;margin: 0" |
|
|
|
> |
|
|
|
<el-icon><Setting /></el-icon> |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #default> |
|
|
|
<div class="autoProcessClass" @click.prevent="handleCheckAllRobot" style="cursor: pointer"> |
|
|
|
<el-checkbox |
|
|
|
v-model="autoProcess.checkAll" |
|
|
|
:indeterminate="autoProcess.isIndeterminate" |
|
|
|
> |
|
|
|
全部自动审批 |
|
|
|
</el-checkbox> |
|
|
|
</div> |
|
|
|
<el-divider style="margin-top: 5px;margin-bottom: 5px" /> |
|
|
|
<el-checkbox-group |
|
|
|
v-model="autoProcess.autoArray" |
|
|
|
style="display: flex; flex-direction: column" |
|
|
|
> |
|
|
|
<div v-for="robot in autoProcess.robots" @click.prevent="toggleRobot(robot)" class="autoProcessClass" style="cursor: pointer"> |
|
|
|
<el-checkbox :key="robot" :label="robot" :value="robot"></el-checkbox> |
|
|
|
</div> |
|
|
|
</el-checkbox-group> |
|
|
|
</template> |
|
|
|
</el-popover> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -184,10 +233,11 @@ import OperationButton from './OperationButton.vue' |
|
|
|
import MdRenderer from '@/views/aichat/MdRenderer.vue' |
|
|
|
import fullscreenG6 from '@/views/aichat/fullscreenG6.vue' |
|
|
|
import {getToken} from "@/utils/auth.js"; |
|
|
|
import {postChatMessage} from "@/api/aichat/aichat.js" |
|
|
|
import {addChat, DeleteChatList, postChatMessage, updateChatProcessData} from "@/api/aichat/aichat.js" |
|
|
|
import cache from "@/plugins/cache.js"; |
|
|
|
import Cookies from "js-cookie"; |
|
|
|
import {addChat} from "@/api/aichat/aichat"; |
|
|
|
import Interrupt from "@/views/aichat/Interrupt.vue"; |
|
|
|
import { v4 as uuidv4 } from 'uuid'; |
|
|
|
|
|
|
|
defineOptions({ name: 'AiChat' }) |
|
|
|
const route = useRoute() |
|
|
|
@ -226,11 +276,17 @@ const scrollDiv = ref() |
|
|
|
const dialogScrollbar = ref() |
|
|
|
const loading = ref(false) |
|
|
|
const inputValue = ref('') |
|
|
|
const currentQuestion = ref({}) |
|
|
|
const chartOpenId = ref('') |
|
|
|
const chatList = ref([]) |
|
|
|
const answerList = ref([]) |
|
|
|
const controller = ref(null) |
|
|
|
|
|
|
|
const autoProcess = ref({ |
|
|
|
checkAll: false, |
|
|
|
isIndeterminate: false, |
|
|
|
autoArray:[], |
|
|
|
robots:['数据治理管理专家自动批准','元数据专家自动批准','数据标准专家自动批准','数据安全专家自动批准','数据分析专家自动批准','数据模型专家自动批准','数据质量专家自动批准','智能导航专家自动审批'], |
|
|
|
}) |
|
|
|
const popoverVisible = ref(false) |
|
|
|
const currentMachine = ref([]) |
|
|
|
const currentFiles = ref([]) |
|
|
|
@ -258,6 +314,39 @@ function setScrollBottom() { |
|
|
|
scrollDiv.value.setScrollTop(getMaxHeight()) |
|
|
|
} |
|
|
|
|
|
|
|
function confirmReturn(item,index){ |
|
|
|
DeleteChatList(item.chatId).then(res=>{ |
|
|
|
chatList.value.splice(index, chatList.value.length - index); |
|
|
|
let reqData = { |
|
|
|
"user_id": cache.local.get("username"), |
|
|
|
"session_id": Cookies.get("chatSessionId"), |
|
|
|
"checkpointer": item.checkpointer |
|
|
|
} |
|
|
|
sendChatMessage(reqData) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function handleCheckAllRobot(){ |
|
|
|
autoProcess.value.checkAll = !autoProcess.value.checkAll |
|
|
|
autoProcess.value.autoArray = autoProcess.value.checkAll ? autoProcess.value.robots : [] |
|
|
|
autoProcess.value.isIndeterminate = false |
|
|
|
} |
|
|
|
|
|
|
|
function toggleRobot(robot){ |
|
|
|
const index = autoProcess.value.autoArray.indexOf(robot) |
|
|
|
if (index !== -1) { |
|
|
|
// 已选中则取消 |
|
|
|
autoProcess.value.autoArray = autoProcess.value.autoArray.filter(item => item !== robot) |
|
|
|
} else { |
|
|
|
// 未选中则添加 |
|
|
|
autoProcess.value.autoArray = [...autoProcess.value.autoArray, robot] |
|
|
|
} |
|
|
|
const checkedCount = autoProcess.value.autoArray.length |
|
|
|
autoProcess.value.checkAll = checkedCount === autoProcess.value.robots.length |
|
|
|
autoProcess.value.isIndeterminate = checkedCount > 0 && checkedCount < autoProcess.value.robots.length |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 滚动条距离最上面的高度 |
|
|
|
*/ |
|
|
|
@ -329,6 +418,7 @@ watch(() => props.cookieSessionId, value => upload.data = {sessionId:value}) |
|
|
|
function regenerationChart(index){ |
|
|
|
let question = chatList.value[index - 1] |
|
|
|
let chat = { |
|
|
|
"chatId":uuidv4(), |
|
|
|
"type":"question", |
|
|
|
"content":question.content, |
|
|
|
"time": formatDate(new Date()), |
|
|
|
@ -340,7 +430,6 @@ function regenerationChart(index){ |
|
|
|
"robot": currentMachine.value.length>0?currentMachine.value[0]:"", |
|
|
|
"session_id": Cookies.get("chatSessionId"), |
|
|
|
"doc": chat.file, |
|
|
|
"history": [] |
|
|
|
} |
|
|
|
sendChatMessage(data) |
|
|
|
} |
|
|
|
@ -413,6 +502,25 @@ function downloadFile(file,bucket,sessionId){ |
|
|
|
}, file); |
|
|
|
} |
|
|
|
|
|
|
|
function processAuth(data){ |
|
|
|
let updateData = { |
|
|
|
chatId: data.chatId, |
|
|
|
action: data.action, |
|
|
|
interrupt: JSON.stringify(data.interrupt) |
|
|
|
} |
|
|
|
updateChatProcessData(updateData).then(res=>{ |
|
|
|
let reqData = { |
|
|
|
"user_id": cache.local.get("username"), |
|
|
|
"session_id": Cookies.get("chatSessionId"), |
|
|
|
"checkpointer": data.checkpointer, |
|
|
|
"action": data.action, |
|
|
|
"resume": true, |
|
|
|
"block": data.interrupt.block |
|
|
|
} |
|
|
|
sendChatMessage(reqData) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
async function sendChatHandle(event) { |
|
|
|
if (!event.ctrlKey) { |
|
|
|
// 如果没有按下组合键ctrl,则会阻止默认事件 |
|
|
|
@ -421,6 +529,7 @@ async function sendChatHandle(event) { |
|
|
|
(chatList.value[chatList.value.length - 1].isStop || |
|
|
|
chatList.value[chatList.value.length - 1].isEnd))) { |
|
|
|
chatList.value.push({ |
|
|
|
"chatId": uuidv4(), |
|
|
|
"type": "question", |
|
|
|
"content": inputValue.value.trim(), |
|
|
|
"time": formatDate(new Date()), |
|
|
|
@ -440,9 +549,14 @@ async function sendChatHandle(event) { |
|
|
|
"user_id": cache.local.get("username"), |
|
|
|
"robot": currentMachine.value.length > 0 ? currentMachine.value[0] : "", |
|
|
|
"session_id": Cookies.get("chatSessionId"), |
|
|
|
"doc": currentFiles.value, |
|
|
|
"history": [] |
|
|
|
"doc": currentFiles.value |
|
|
|
} |
|
|
|
if (chatList.value.length > 1){ |
|
|
|
// 判断为1 因为上方已将问题加入 chatList了 , >1 则视为已存在提问交互 |
|
|
|
//取最新的checkpointer值 |
|
|
|
data.checkpointer = chatList.value[chatList.value.length - 2].content.checkpointer |
|
|
|
} |
|
|
|
currentQuestion.value = data |
|
|
|
inputValue.value = '' |
|
|
|
sendChatMessage(data) |
|
|
|
} |
|
|
|
@ -456,23 +570,73 @@ function sendChatMessage(data){ |
|
|
|
controller.value = new AbortController() |
|
|
|
postChatMessage(data,{signal:controller.value.signal}).then(res=>{ |
|
|
|
if (res.status !== 200){ |
|
|
|
chatList.value.push({"type":"answer","content":[{"type":"text","content":"服务异常,错误码:"+res.status}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":'',"thumbDownReason":''}) |
|
|
|
chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[{"type":"text","content":"服务异常,错误码:"+res.status}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":'',"thumbDownReason":''}) |
|
|
|
}else { |
|
|
|
currentFiles.value = [] |
|
|
|
chatList.value.push({"type":"answer","content":[],"isEnd":false,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName, "operate":'',"thumbDownReason":''}) |
|
|
|
chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[],"isEnd":false,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName, "operate":'',"thumbDownReason":''}) |
|
|
|
const reader = res.body.getReader() |
|
|
|
const write = getWrite(reader) |
|
|
|
reader.read().then(write).then(()=> { |
|
|
|
let answer = JSON.parse(JSON.stringify(chatList.value[chatList.value.length - 1])) |
|
|
|
answer.content = JSON.stringify(answer.content) |
|
|
|
answer.interrupt = JSON.stringify(answer.interrupt)? answer.interrupt: null |
|
|
|
answer.checkpointer = JSON.stringify(answer.checkpointer) |
|
|
|
addChat(answer) |
|
|
|
}).then(()=>{ |
|
|
|
let answer = JSON.parse(JSON.stringify(chatList.value[chatList.value.length - 1])) |
|
|
|
if(answer.interrupt){ |
|
|
|
let robot = answer.interrupt.robot |
|
|
|
let block = answer.interrupt.block |
|
|
|
let action = answer.interrupt.action |
|
|
|
let autoRequest = false |
|
|
|
if (autoProcess.value.autoArray.length > 0 && autoProcess.value.autoArray.indexOf(robot) !== -1){ |
|
|
|
//自动审批信号有效,需判断 block内容的必填项,有无默认值,有的话,可以自动发送,没有需填写 |
|
|
|
autoRequest = true |
|
|
|
if (block && block.length>0){ |
|
|
|
for (let i = 0; i < block.length; i++) { |
|
|
|
if (block[i].required){ |
|
|
|
if (block[i].ct_type === 'dateRangePicker' || block[i].ct_type === 'checkboxGroup' || block[i].ct_type === 'multiselect'){ |
|
|
|
//default_value 是数组 |
|
|
|
if (!block[i].default_value || block[i].default_value === []){ |
|
|
|
autoRequest = false |
|
|
|
} |
|
|
|
} |
|
|
|
if (block[i].ct_type === 'datePicker' || block[i].ct_type === 'input' || block[i].ct_type === 'radioGroup' ||block[i].ct_type === 'select'){ |
|
|
|
//default_value 是文字 |
|
|
|
if (!block[i].default_value || block[i].default_value.trim() === ''){ |
|
|
|
autoRequest = false |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (autoRequest){ |
|
|
|
let reqData = { |
|
|
|
"user_id": cache.local.get("username"), |
|
|
|
"session_id": Cookies.get("chatSessionId"), |
|
|
|
"checkpointer": answer.checkpointer, |
|
|
|
"action":"", |
|
|
|
"resume": true, |
|
|
|
"block": block |
|
|
|
} |
|
|
|
for (let i = 0; i < action.length; i++) { |
|
|
|
if (action[i].style === 'primary'){ |
|
|
|
reqData.action = action[i].action |
|
|
|
} |
|
|
|
} |
|
|
|
sendChatMessage(reqData) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((e) => { |
|
|
|
chatList.value.push({"type":"answer","content":[{"type":"text","content":"服务异常"}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":"","thumbDownReason":""}) |
|
|
|
chatList.value.push({"chatId":uuidv4(),"type":"answer","content":[{"type":"text","content":"服务异常"}],"isEnd":true,"isStop":false,"sessionId":chatList.value[0].sessionId,"sessionName":chatList.value[0].sessionName,"operate":"","thumbDownReason":""}) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
chatList, |
|
|
|
() => { |
|
|
|
@ -504,7 +668,6 @@ const getWrite = (reader) => { |
|
|
|
for (let i = 0; i < split.length; i++) { |
|
|
|
const chunkStr = split[i]; |
|
|
|
tempResult = tempResult.replace(chunkStr, '', 1); // 修复点4:单次替换避免残留 |
|
|
|
|
|
|
|
try { |
|
|
|
const chunk = JSON.parse(chunkStr.replace('data:', '').trim()); |
|
|
|
processChunk(chunk); |
|
|
|
@ -512,7 +675,6 @@ const getWrite = (reader) => { |
|
|
|
console.error('解析错误:', e, chunkStr); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 递归处理剩余数据 |
|
|
|
return reader.read().then(write_stream); |
|
|
|
} else { |
|
|
|
@ -523,7 +685,6 @@ const getWrite = (reader) => { |
|
|
|
|
|
|
|
const processChunk = (chunk) => { |
|
|
|
const lastMsg = chatList.value[chatList.value.length - 1]; |
|
|
|
console.log(chunk) |
|
|
|
// 修复点5:统一处理所有类型的数据块 |
|
|
|
if (chunk.docs?.length) { |
|
|
|
lastMsg.content.push({ content: chunk.docs, type: "docs" }); |
|
|
|
@ -552,13 +713,15 @@ const getWrite = (reader) => { |
|
|
|
lastMsg.content.push({ content: text, type: "text" }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (chunk.interrupt){ |
|
|
|
lastMsg.interrupt = chunk.interrupt |
|
|
|
} |
|
|
|
// 修复点7:统一处理结束标志 |
|
|
|
if (chunk.isEnd || chunk.is_end) { |
|
|
|
if (chunk.checkpointer) { |
|
|
|
lastMsg.checkpointer = chunk.checkpointer |
|
|
|
lastMsg.isEnd = true; |
|
|
|
lastMsg.time = formatDate(new Date()); |
|
|
|
} |
|
|
|
|
|
|
|
nextTick(() => scrollDiv.value.setScrollTop(getMaxHeight())); |
|
|
|
}; |
|
|
|
|
|
|
|
@ -586,7 +749,7 @@ defineExpose({ |
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.ai-chat { |
|
|
|
--padding-left: 40px; |
|
|
|
--padding-left: 0; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
@ -733,4 +896,54 @@ defineExpose({ |
|
|
|
margin: 0 auto; |
|
|
|
} |
|
|
|
} |
|
|
|
.autoProcessClass:hover { |
|
|
|
background-color: var(--el-color-primary-light-9); |
|
|
|
} |
|
|
|
|
|
|
|
:deep(.chat_question_card .el-card__body) { |
|
|
|
padding: 10px 20px !important; |
|
|
|
} |
|
|
|
|
|
|
|
.returnToHere { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
cursor: pointer; |
|
|
|
/* 文字默认隐藏 */ |
|
|
|
--text-color: transparent; |
|
|
|
--divider-border: rgba(0,0,0,0); |
|
|
|
} |
|
|
|
|
|
|
|
.returnToHereIcon { |
|
|
|
color: var(--icon-color, #000); |
|
|
|
transition: color 0.3s; |
|
|
|
} |
|
|
|
|
|
|
|
.returnToHereDivider { |
|
|
|
flex: 1; |
|
|
|
margin: 0 10px; |
|
|
|
--divider-border-color: var(--divider-border); |
|
|
|
} |
|
|
|
|
|
|
|
/* 文字默认透明 */ |
|
|
|
.divider-text { |
|
|
|
color: var(--text-color); |
|
|
|
transition: color 0.3s; |
|
|
|
} |
|
|
|
|
|
|
|
/* 鼠标移入时整体变化 */ |
|
|
|
.returnToHere:hover { |
|
|
|
--icon-color: #409EFF; /* 蓝色 */ |
|
|
|
--text-color: #409EFF; /* 文字变蓝 */ |
|
|
|
--divider-border: #409EFF; /* 分隔线变蓝 */ |
|
|
|
} |
|
|
|
|
|
|
|
/* 处理Element Plus分隔线边框颜色 */ |
|
|
|
:deep(.el-divider__text) { |
|
|
|
background: transparent !important; |
|
|
|
padding: 0 !important; |
|
|
|
} |
|
|
|
:deep(.el-divider__line) { |
|
|
|
border-top-color: var(--divider-border-color) !important; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |
|
|
|
|