|
@ -1,52 +1,81 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="history-record-container" :class="{ 'collapsed': isCollapsed }"> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="history-record-container" |
|
|
|
|
|
:class="{ |
|
|
|
|
|
containerNoMobile: !isMobile && isCollapsed, |
|
|
|
|
|
|
|
|
|
|
|
containerIsMobile: isMobile && isCollapsed, |
|
|
|
|
|
|
|
|
|
|
|
collapsed: !isCollapsed, |
|
|
|
|
|
}" |
|
|
|
|
|
> |
|
|
<!-- 收起状态的展开按钮和图标 --> |
|
|
<!-- 收起状态的展开按钮和图标 --> |
|
|
<div v-if="isCollapsed" class="collapsed-container"> |
|
|
<div v-if="isCollapsed" class="collapsed-container"> |
|
|
<img class="collapsed-icon" src="src/assets/img/Selectmodel/机器人手机.png" alt="icon" /> |
|
|
|
|
|
<div class="collapsed-toggle-btn" @click="toggleCollapse"> |
|
|
|
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
|
|
<path d="M9 18L15 12L9 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> |
|
|
|
|
|
</svg> |
|
|
|
|
|
|
|
|
<img |
|
|
|
|
|
class="collapsed-icon" |
|
|
|
|
|
src="src/assets/img/Selectmodel/机器人手机.png" |
|
|
|
|
|
alt="icon" |
|
|
|
|
|
/> |
|
|
|
|
|
<div class="collapsed-toggle-btn" @click="openHistory"> |
|
|
|
|
|
<el-icon><ArrowRight /></el-icon> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 历史记录内容 --> |
|
|
<!-- 历史记录内容 --> |
|
|
<div class="history-content" v-show="!isCollapsed"> |
|
|
<div class="history-content" v-show="!isCollapsed"> |
|
|
<!-- 折叠/展开按钮 --> |
|
|
<!-- 折叠/展开按钮 --> |
|
|
<div class="toggle-btn" @click="toggleCollapse"> |
|
|
|
|
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
|
|
<path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> |
|
|
|
|
|
</svg> |
|
|
|
|
|
|
|
|
<div class="toggle-btn" @click="closeHistory"> |
|
|
|
|
|
<el-icon><ArrowLeft /></el-icon> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 标题 --> |
|
|
<!-- 标题 --> |
|
|
<div class="history-header"> |
|
|
<div class="history-header"> |
|
|
<div class="history-actions"> |
|
|
<div class="history-actions"> |
|
|
<img src="/src/assets/img/homePage/logo.png" alt="Logo" class="logo-img" /> |
|
|
|
|
|
|
|
|
<img |
|
|
|
|
|
src="/src/assets/img/homePage/logo.png" |
|
|
|
|
|
alt="Logo" |
|
|
|
|
|
class="logo-img" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 历史记录列表 --> |
|
|
<!-- 历史记录列表 --> |
|
|
<div class="history-list"> |
|
|
<div class="history-list"> |
|
|
<div |
|
|
<div |
|
|
v-for="(record, index) in filteredHistory" |
|
|
|
|
|
|
|
|
v-for="record in filteredHistory" |
|
|
:key="record.id" |
|
|
:key="record.id" |
|
|
class="history-item" |
|
|
class="history-item" |
|
|
@click="selectRecord(record)" |
|
|
@click="selectRecord(record)" |
|
|
:class="{ 'active': selectedRecordId === record.id }" |
|
|
|
|
|
|
|
|
:class="{ active: selectedRecordId === record.id }" |
|
|
> |
|
|
> |
|
|
<div class="record-content"> |
|
|
<div class="record-content"> |
|
|
<div class="record-type"> |
|
|
<div class="record-type"> |
|
|
<span class="type-badge" :class="record.type"> |
|
|
<span class="type-badge" :class="record.type"> |
|
|
{{ record.type === 'AIchat' ? '夺宝奇兵' : 'AI情绪' }} |
|
|
|
|
|
|
|
|
{{ record.type === "AIchat" ? "夺宝奇兵" : "AI情绪" }} |
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div class="record-text">{{ record.question }}</div> |
|
|
<div class="record-text">{{ record.question }}</div> |
|
|
<div class="record-time">{{ formatTime(record.timestamp) }}</div> |
|
|
<div class="record-time">{{ formatTime(record.timestamp) }}</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="record-actions"> |
|
|
<div class="record-actions"> |
|
|
<button class="delete-btn" @click.stop="deleteRecord(record.id)" title="删除"> |
|
|
|
|
|
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
|
|
<path d="M18 6L6 18M6 6L18 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> |
|
|
|
|
|
|
|
|
<button |
|
|
|
|
|
class="delete-btn" |
|
|
|
|
|
@click.stop="deleteRecord(record.id)" |
|
|
|
|
|
title="删除" |
|
|
|
|
|
> |
|
|
|
|
|
<svg |
|
|
|
|
|
width="12" |
|
|
|
|
|
height="12" |
|
|
|
|
|
viewBox="0 0 24 24" |
|
|
|
|
|
fill="none" |
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
|
> |
|
|
|
|
|
<path |
|
|
|
|
|
d="M18 6L6 18M6 6L18 18" |
|
|
|
|
|
stroke="currentColor" |
|
|
|
|
|
stroke-width="2" |
|
|
|
|
|
stroke-linecap="round" |
|
|
|
|
|
stroke-linejoin="round" |
|
|
|
|
|
/> |
|
|
</svg> |
|
|
</svg> |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
@ -55,9 +84,22 @@ |
|
|
<!-- 空状态 --> |
|
|
<!-- 空状态 --> |
|
|
<div v-if="filteredHistory.length === 0" class="empty-state"> |
|
|
<div v-if="filteredHistory.length === 0" class="empty-state"> |
|
|
<div class="empty-icon"> |
|
|
<div class="empty-icon"> |
|
|
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
|
|
|
|
|
<path d="M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 1H5C3.89 1 3 1.89 3 3V21C3 22.1 3.89 23 5 23H19C20.1 23 21 22.1 21 21V9M19 9H14V4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> |
|
|
|
|
|
</svg> |
|
|
|
|
|
|
|
|
<el-icon class="documentDelete"><DocumentDelete /></el-icon> |
|
|
|
|
|
<!-- <svg |
|
|
|
|
|
width="48" |
|
|
|
|
|
height="48" |
|
|
|
|
|
viewBox="0 0 24 24" |
|
|
|
|
|
fill="none" |
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg" |
|
|
|
|
|
> |
|
|
|
|
|
<path |
|
|
|
|
|
d="M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 1H5C3.89 1 3 1.89 3 3V21C3 22.1 3.89 23 5 23H19C20.1 23 21 22.1 21 21V9M19 9H14V4" |
|
|
|
|
|
stroke="currentColor" |
|
|
|
|
|
stroke-width="1.5" |
|
|
|
|
|
stroke-linecap="round" |
|
|
|
|
|
stroke-linejoin="round" |
|
|
|
|
|
/> |
|
|
|
|
|
</svg> --> |
|
|
</div> |
|
|
</div> |
|
|
<p class="empty-text">暂无历史记录</p> |
|
|
<p class="empty-text">暂无历史记录</p> |
|
|
</div> |
|
|
</div> |
|
@ -67,157 +109,171 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { ref, computed, onMounted, watch } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, computed, onMounted, watch } from "vue"; |
|
|
|
|
|
|
|
|
// Props |
|
|
// Props |
|
|
const props = defineProps({ |
|
|
const props = defineProps({ |
|
|
currentType: { |
|
|
currentType: { |
|
|
type: String, |
|
|
type: String, |
|
|
default: 'AIchat' // 'AIchat' 或 'AiEmotion' |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
default: "AIchat", // 'AIchat' 或 'AiEmotion' |
|
|
|
|
|
}, |
|
|
|
|
|
isMobile: { |
|
|
|
|
|
type: Boolean, |
|
|
|
|
|
default: false, |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// Emits |
|
|
// Emits |
|
|
const emit = defineEmits(['selectRecord', 'recordAdded', 'startNewChat']) |
|
|
|
|
|
|
|
|
const emit = defineEmits(["selectRecord", "recordAdded", "startNewChat"]); |
|
|
|
|
|
|
|
|
// 响应式数据 |
|
|
// 响应式数据 |
|
|
const isCollapsed = ref(false) |
|
|
|
|
|
const selectedRecordId = ref(null) |
|
|
|
|
|
const historyRecords = ref([]) |
|
|
|
|
|
|
|
|
const isCollapsed = ref(false); |
|
|
|
|
|
const selectedRecordId = ref(null); |
|
|
|
|
|
const historyRecords = ref([]); |
|
|
|
|
|
|
|
|
// 计算属性 |
|
|
// 计算属性 |
|
|
const filteredHistory = computed(() => { |
|
|
const filteredHistory = computed(() => { |
|
|
return historyRecords.value |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
return historyRecords.value; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 方法 |
|
|
// 方法 |
|
|
const toggleCollapse = () => { |
|
|
const toggleCollapse = () => { |
|
|
isCollapsed.value = !isCollapsed.value |
|
|
|
|
|
|
|
|
isCollapsed.value = !isCollapsed.value; |
|
|
// 保存折叠状态到本地存储 |
|
|
// 保存折叠状态到本地存储 |
|
|
localStorage.setItem('historyRecordCollapsed', isCollapsed.value) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
localStorage.setItem("historyRecordCollapsed", isCollapsed.value); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const addRecord = (question, type = props.currentType) => { |
|
|
|
|
|
const newRecord = { |
|
|
|
|
|
id: Date.now() + Math.random(), |
|
|
|
|
|
question: question.trim(), |
|
|
|
|
|
type: type, |
|
|
|
|
|
timestamp: new Date().toISOString(), |
|
|
|
|
|
answer: '' // 可以后续添加回答内容 |
|
|
|
|
|
|
|
|
const openHistory = () => { |
|
|
|
|
|
isCollapsed.value = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 添加到列表开头 |
|
|
|
|
|
historyRecords.value.unshift(newRecord) |
|
|
|
|
|
|
|
|
|
|
|
// 限制历史记录数量(最多保存100条) |
|
|
|
|
|
if (historyRecords.value.length > 100) { |
|
|
|
|
|
historyRecords.value = historyRecords.value.slice(0, 100) |
|
|
|
|
|
|
|
|
const closeHistory = () => { |
|
|
|
|
|
isCollapsed.value = true; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 保存到本地存储 |
|
|
|
|
|
saveToLocalStorage() |
|
|
|
|
|
|
|
|
|
|
|
emit('recordAdded', newRecord) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const selectRecord = (record) => { |
|
|
const selectRecord = (record) => { |
|
|
selectedRecordId.value = record.id |
|
|
|
|
|
emit('selectRecord', record) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
selectedRecordId.value = record.id; |
|
|
|
|
|
emit("selectRecord", record); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const deleteRecord = (recordId) => { |
|
|
const deleteRecord = (recordId) => { |
|
|
const index = historyRecords.value.findIndex(record => record.id === recordId) |
|
|
|
|
|
|
|
|
const index = historyRecords.value.findIndex( |
|
|
|
|
|
(record) => record.id === recordId |
|
|
|
|
|
); |
|
|
if (index > -1) { |
|
|
if (index > -1) { |
|
|
historyRecords.value.splice(index, 1) |
|
|
|
|
|
saveToLocalStorage() |
|
|
|
|
|
|
|
|
historyRecords.value.splice(index, 1); |
|
|
|
|
|
saveToLocalStorage(); |
|
|
|
|
|
|
|
|
// 如果删除的是当前选中的记录,清除选中状态 |
|
|
// 如果删除的是当前选中的记录,清除选中状态 |
|
|
if (selectedRecordId.value === recordId) { |
|
|
if (selectedRecordId.value === recordId) { |
|
|
selectedRecordId.value = null |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
selectedRecordId.value = null; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const addRecord = (question, type) => { |
|
|
|
|
|
const newRecord = { |
|
|
|
|
|
id: Date.now() + Math.random(), // 生成唯一ID |
|
|
|
|
|
question: question, |
|
|
|
|
|
type: type, |
|
|
|
|
|
timestamp: Date.now() |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
historyRecords.value.unshift(newRecord); // 添加到数组开头 |
|
|
|
|
|
saveToLocalStorage(); |
|
|
|
|
|
emit("recordAdded", newRecord); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const clearHistory = () => { |
|
|
const clearHistory = () => { |
|
|
if (confirm('确定要清空所有历史记录吗?')) { |
|
|
|
|
|
historyRecords.value = [] |
|
|
|
|
|
selectedRecordId.value = null |
|
|
|
|
|
saveToLocalStorage() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (confirm("确定要清空所有历史记录吗?")) { |
|
|
|
|
|
historyRecords.value = []; |
|
|
|
|
|
selectedRecordId.value = null; |
|
|
|
|
|
saveToLocalStorage(); |
|
|
} |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const formatTime = (timestamp) => { |
|
|
const formatTime = (timestamp) => { |
|
|
const date = new Date(timestamp) |
|
|
|
|
|
const now = new Date() |
|
|
|
|
|
const diff = now - date |
|
|
|
|
|
|
|
|
const date = new Date(timestamp); |
|
|
|
|
|
const now = new Date(); |
|
|
|
|
|
const diff = now - date; |
|
|
|
|
|
|
|
|
// 小于1分钟 |
|
|
// 小于1分钟 |
|
|
if (diff < 60000) { |
|
|
if (diff < 60000) { |
|
|
return '刚刚' |
|
|
|
|
|
|
|
|
return "刚刚"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 小于1小时 |
|
|
// 小于1小时 |
|
|
if (diff < 3600000) { |
|
|
if (diff < 3600000) { |
|
|
return `${Math.floor(diff / 60000)}分钟前` |
|
|
|
|
|
|
|
|
return `${Math.floor(diff / 60000)}分钟前`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 小于1天 |
|
|
// 小于1天 |
|
|
if (diff < 86400000) { |
|
|
if (diff < 86400000) { |
|
|
return `${Math.floor(diff / 3600000)}小时前` |
|
|
|
|
|
|
|
|
return `${Math.floor(diff / 3600000)}小时前`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 大于1天 |
|
|
// 大于1天 |
|
|
if (diff < 604800000) { |
|
|
if (diff < 604800000) { |
|
|
return `${Math.floor(diff / 86400000)}天前` |
|
|
|
|
|
|
|
|
return `${Math.floor(diff / 86400000)}天前`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 超过一周,显示具体日期 |
|
|
// 超过一周,显示具体日期 |
|
|
return date.toLocaleDateString('zh-CN', { |
|
|
|
|
|
month: 'short', |
|
|
|
|
|
day: 'numeric', |
|
|
|
|
|
hour: '2-digit', |
|
|
|
|
|
minute: '2-digit' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return date.toLocaleDateString("zh-CN", { |
|
|
|
|
|
month: "short", |
|
|
|
|
|
day: "numeric", |
|
|
|
|
|
hour: "2-digit", |
|
|
|
|
|
minute: "2-digit", |
|
|
|
|
|
}); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const saveToLocalStorage = () => { |
|
|
const saveToLocalStorage = () => { |
|
|
localStorage.setItem('aiChatHistoryRecords', JSON.stringify(historyRecords.value)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
localStorage.setItem( |
|
|
|
|
|
"aiChatHistoryRecords", |
|
|
|
|
|
JSON.stringify(historyRecords.value) |
|
|
|
|
|
); |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
const loadFromLocalStorage = () => { |
|
|
const loadFromLocalStorage = () => { |
|
|
try { |
|
|
try { |
|
|
const saved = localStorage.getItem('aiChatHistoryRecords') |
|
|
|
|
|
|
|
|
const saved = localStorage.getItem("aiChatHistoryRecords"); |
|
|
if (saved) { |
|
|
if (saved) { |
|
|
historyRecords.value = JSON.parse(saved) |
|
|
|
|
|
|
|
|
historyRecords.value = JSON.parse(saved); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 加载折叠状态 |
|
|
// 加载折叠状态 |
|
|
const collapsedState = localStorage.getItem('historyRecordCollapsed') |
|
|
|
|
|
|
|
|
const collapsedState = localStorage.getItem("historyRecordCollapsed"); |
|
|
if (collapsedState !== null) { |
|
|
if (collapsedState !== null) { |
|
|
isCollapsed.value = collapsedState === 'true' |
|
|
|
|
|
|
|
|
isCollapsed.value = collapsedState === "true"; |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.error('加载历史记录失败:', error) |
|
|
|
|
|
historyRecords.value = [] |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
console.error("加载历史记录失败:", error); |
|
|
|
|
|
historyRecords.value = []; |
|
|
} |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
// 暴露方法和状态给父组件 |
|
|
// 暴露方法和状态给父组件 |
|
|
defineExpose({ |
|
|
defineExpose({ |
|
|
addRecord, |
|
|
addRecord, |
|
|
clearHistory, |
|
|
clearHistory, |
|
|
isCollapsed |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
isCollapsed, |
|
|
|
|
|
toggleCollapse, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 生命周期 |
|
|
// 生命周期 |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
loadFromLocalStorage() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
loadFromLocalStorage(); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 监听历史记录变化,自动保存 |
|
|
// 监听历史记录变化,自动保存 |
|
|
watch(historyRecords, () => { |
|
|
|
|
|
saveToLocalStorage() |
|
|
|
|
|
}, { deep: true }) |
|
|
|
|
|
|
|
|
watch( |
|
|
|
|
|
historyRecords, |
|
|
|
|
|
() => { |
|
|
|
|
|
saveToLocalStorage(); |
|
|
|
|
|
}, |
|
|
|
|
|
{ deep: true } |
|
|
|
|
|
); |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
@ -226,18 +282,26 @@ watch(historyRecords, () => { |
|
|
left: 0; |
|
|
left: 0; |
|
|
top: 0; |
|
|
top: 0; |
|
|
bottom: 0; |
|
|
bottom: 0; |
|
|
width: 300px; |
|
|
|
|
|
|
|
|
|
|
|
background: rgb(4, 47, 144); |
|
|
background: rgb(4, 47, 144); |
|
|
border-right: 1px solid rgba(255, 255, 255, 0.1); |
|
|
border-right: 1px solid rgba(255, 255, 255, 0.1); |
|
|
backdrop-filter: blur(10px); |
|
|
backdrop-filter: blur(10px); |
|
|
z-index: 1000; |
|
|
z-index: 1000; |
|
|
transition: transform 0.3s ease; |
|
|
|
|
|
|
|
|
transition: width 0.3s ease; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.containerNoMobile { |
|
|
|
|
|
width: 40px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.containerIsMobile { |
|
|
|
|
|
width: 0px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.history-record-container.collapsed { |
|
|
.history-record-container.collapsed { |
|
|
transform: translateX(-260px); |
|
|
|
|
|
|
|
|
width: 300px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.toggle-btn { |
|
|
.toggle-btn { |
|
@ -328,7 +392,6 @@ watch(historyRecords, () => { |
|
|
object-fit: contain; |
|
|
object-fit: contain; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.new-chat-btn { |
|
|
.new-chat-btn { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
padding: 12px 16px; |
|
|
padding: 12px 16px; |
|
@ -490,8 +553,9 @@ watch(historyRecords, () => { |
|
|
opacity: 0.5; |
|
|
opacity: 0.5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-icon svg { |
|
|
|
|
|
|
|
|
.documentDelete { |
|
|
color: white; |
|
|
color: white; |
|
|
|
|
|
font-size: 5rem; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-text { |
|
|
.empty-text { |
|
@ -502,13 +566,6 @@ watch(historyRecords, () => { |
|
|
|
|
|
|
|
|
/* 移动端适配 */ |
|
|
/* 移动端适配 */ |
|
|
@media (max-width: 768px) { |
|
|
@media (max-width: 768px) { |
|
|
.history-record-container { |
|
|
|
|
|
width: 280px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.history-record-container.collapsed { |
|
|
|
|
|
transform: translateX(-240px); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.history-content { |
|
|
.history-content { |
|
|
padding: 15px; |
|
|
padding: 15px; |
|
|