You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

878 lines
19 KiB

  1. <template>
  2. <div
  3. v-if="!isMobile"
  4. class="history-record-container"
  5. :class="{
  6. collapsed: !isCollapsed,
  7. }"
  8. >
  9. <!-- 收起状态的展开按钮和图标 -->
  10. <div v-if="isCollapsed" class="collapsed-container">
  11. <img
  12. class="collapsed-icon"
  13. src="https://d31zlh4on95l9h.cloudfront.net/images/74430a4ebbb67aefc713bf694147fb2a.png"
  14. alt="icon"
  15. />
  16. <img
  17. class="collapsed-toggle-btn"
  18. @click="openHistory"
  19. src=" https://d31zlh4on95l9h.cloudfront.net/images/b2d784f8607ab65081f5289459581bfe.png"
  20. alt="icon"
  21. />
  22. </div>
  23. <div v-if="isCollapsed" class="collapsed-bottom-container">
  24. <div class="collapsed-bottom-btn" @click="handleFeedbackClick">
  25. <img
  26. class="collapsed-bottom-feedback"
  27. src="https://d31zlh4on95l9h.cloudfront.net/images/41d6e25c19466718d462bcee2f050140.png"
  28. alt="icon"
  29. />
  30. </div>
  31. <div class="collapsed-bottom-btn" @click="handleAnnouncementClick">
  32. <img
  33. class="collapsed-bottom-announcement"
  34. @click="openHistory"
  35. src="https://d31zlh4on95l9h.cloudfront.net/images/c51c7fbb68671729801fb10d65bd7789.png"
  36. alt="icon"
  37. />
  38. </div>
  39. </div>
  40. <!-- 历史记录内容 -->
  41. <div class="history-content" v-show="!isCollapsed">
  42. <div class="head-container">
  43. <!-- 标题 -->
  44. <div class="history-actions">
  45. <img
  46. src="/src/assets/img/homePage/logo.png"
  47. alt="Logo"
  48. class="logo-img"
  49. />
  50. </div>
  51. <!-- 折叠/展开按钮 -->
  52. <img
  53. class="toggle-btn"
  54. @click="closeHistory"
  55. src=" https://d31zlh4on95l9h.cloudfront.net/images/b2d784f8607ab65081f5289459581bfe.png"
  56. alt="icon"
  57. />
  58. </div>
  59. <!-- 历史记录列表 -->
  60. <div class="history-list">
  61. <div
  62. v-for="record in filteredHistory"
  63. :key="record.id"
  64. class="history-item"
  65. @click="selectRecord(record)"
  66. :class="{ active: selectedRecordId === record.id }"
  67. >
  68. <div class="record-content">
  69. <div class="record-type">
  70. <span class="type-badge" :class="record.type">
  71. {{ record.type === "AIchat" ? "夺宝奇兵" : "AI情绪" }}
  72. </span>
  73. </div>
  74. <div class="record-text">{{ record.question }}</div>
  75. <div class="record-time">{{ formatTime(record.timestamp) }}</div>
  76. </div>
  77. <div class="record-actions">
  78. <button
  79. class="delete-btn"
  80. @click.stop="deleteRecord(record.id)"
  81. title="删除"
  82. >
  83. <svg
  84. width="12"
  85. height="12"
  86. viewBox="0 0 24 24"
  87. fill="none"
  88. xmlns="http://www.w3.org/2000/svg"
  89. >
  90. <path
  91. d="M18 6L6 18M6 6L18 18"
  92. stroke="currentColor"
  93. stroke-width="2"
  94. stroke-linecap="round"
  95. stroke-linejoin="round"
  96. />
  97. </svg>
  98. </button>
  99. </div>
  100. </div>
  101. <!-- 空状态 -->
  102. <div v-if="filteredHistory.length === 0" class="empty-state">
  103. <div class="empty-icon">
  104. <el-icon class="documentDelete"><DocumentDelete /></el-icon>
  105. <!-- <svg
  106. width="48"
  107. height="48"
  108. viewBox="0 0 24 24"
  109. fill="none"
  110. xmlns="http://www.w3.org/2000/svg"
  111. >
  112. <path
  113. 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"
  114. stroke="currentColor"
  115. stroke-width="1.5"
  116. stroke-linecap="round"
  117. stroke-linejoin="round"
  118. />
  119. </svg> -->
  120. </div>
  121. <p class="empty-text">暂无历史记录</p>
  122. </div>
  123. </div>
  124. <div class="bottom-container">
  125. <div class="bottom-btn" @click="handleFeedbackClick">
  126. <img
  127. class="bottom-feedback"
  128. src="https://d31zlh4on95l9h.cloudfront.net/images/41d6e25c19466718d462bcee2f050140.png"
  129. alt="icon"
  130. />
  131. </div>
  132. <div class="bottom-btn" @click="handleAnnouncementClick">
  133. <img
  134. class="bottom-announcement"
  135. @click="openHistory"
  136. src="https://d31zlh4on95l9h.cloudfront.net/images/c51c7fbb68671729801fb10d65bd7789.png"
  137. alt="icon"
  138. />
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <div
  144. v-else
  145. class="mobile-history-record-container"
  146. :class="{
  147. mobileCollapsed: !isCollapsed,
  148. }"
  149. >
  150. <!-- 历史记录内容 -->
  151. <div class="history-content" v-show="!isCollapsed">
  152. <div class="mobile-head-container">
  153. <!-- 折叠/展开按钮 -->
  154. <img
  155. class="mobile-toggle-btn"
  156. @click="closeHistory"
  157. src="https://d31zlh4on95l9h.cloudfront.net/images/37fe3d79a8a700f6c674c9f0e7af066b.png"
  158. alt="icon"
  159. />
  160. <!-- 标题 -->
  161. <div class="mobile-history-actions">
  162. <img
  163. src="/src/assets/img/homePage/logo.png"
  164. alt="Logo"
  165. class="logo-img"
  166. />
  167. </div>
  168. </div>
  169. <!-- 历史记录列表 -->
  170. <div class="history-list">
  171. <div
  172. v-for="record in filteredHistory"
  173. :key="record.id"
  174. class="history-item"
  175. @click="selectRecord(record)"
  176. :class="{ active: selectedRecordId === record.id }"
  177. >
  178. <div class="record-content">
  179. <div class="record-type">
  180. <span class="type-badge" :class="record.type">
  181. {{ record.type === "AIchat" ? "夺宝奇兵" : "AI情绪" }}
  182. </span>
  183. </div>
  184. <div class="record-text">{{ record.question }}</div>
  185. <div class="record-time">{{ formatTime(record.timestamp) }}</div>
  186. </div>
  187. <div class="record-actions">
  188. <button
  189. class="delete-btn"
  190. @click.stop="deleteRecord(record.id)"
  191. title="删除"
  192. >
  193. <svg
  194. width="12"
  195. height="12"
  196. viewBox="0 0 24 24"
  197. fill="none"
  198. xmlns="http://www.w3.org/2000/svg"
  199. >
  200. <path
  201. d="M18 6L6 18M6 6L18 18"
  202. stroke="currentColor"
  203. stroke-width="2"
  204. stroke-linecap="round"
  205. stroke-linejoin="round"
  206. />
  207. </svg>
  208. </button>
  209. </div>
  210. </div>
  211. <!-- 空状态 -->
  212. <div v-if="filteredHistory.length === 0" class="empty-state">
  213. <div class="empty-icon">
  214. <el-icon class="documentDelete"><DocumentDelete /></el-icon>
  215. <!-- <svg
  216. width="48"
  217. height="48"
  218. viewBox="0 0 24 24"
  219. fill="none"
  220. xmlns="http://www.w3.org/2000/svg"
  221. >
  222. <path
  223. 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"
  224. stroke="currentColor"
  225. stroke-width="1.5"
  226. stroke-linecap="round"
  227. stroke-linejoin="round"
  228. />
  229. </svg> -->
  230. </div>
  231. <p class="empty-text">暂无历史记录</p>
  232. </div>
  233. </div>
  234. <div class="mobile-bottom-container">
  235. <div class="mobile-bottom-btn" @click="handleFeedbackClick">
  236. <img
  237. class="mobile-bottom-feedback"
  238. src="https://d31zlh4on95l9h.cloudfront.net/images/41d6e25c19466718d462bcee2f050140.png"
  239. alt="icon"
  240. />
  241. <div class="mobile-bottom-text">用户反馈</div>
  242. </div>
  243. <div class="mobile-bottom-btn" @click="handleAnnouncementClick">
  244. <img
  245. class="mobile-bottom-announcement"
  246. @click="openHistory"
  247. src="https://d31zlh4on95l9h.cloudfront.net/images/c51c7fbb68671729801fb10d65bd7789.png"
  248. alt="icon"
  249. />
  250. <div class="mobile-bottom-text">公告</div>
  251. </div>
  252. </div>
  253. </div>
  254. </div>
  255. </template>
  256. <script setup>
  257. import { ref, computed, onMounted, watch } from "vue";
  258. // Props
  259. const props = defineProps({
  260. currentType: {
  261. type: String,
  262. default: "AIchat", // 'AIchat' 或 'AiEmotion'
  263. },
  264. isMobile: {
  265. type: Boolean,
  266. default: false,
  267. },
  268. });
  269. // Emits
  270. const emit = defineEmits([
  271. "selectRecord",
  272. "recordAdded",
  273. "startNewChat",
  274. "showAnnouncement",
  275. "showFeedback",
  276. ]);
  277. // 响应式数据
  278. const isCollapsed = ref(false);
  279. const selectedRecordId = ref(null);
  280. const historyRecords = ref([]);
  281. // 计算属性
  282. const filteredHistory = computed(() => {
  283. return historyRecords.value;
  284. });
  285. // 方法
  286. const toggleCollapse = () => {
  287. isCollapsed.value = !isCollapsed.value;
  288. // 保存折叠状态到本地存储
  289. localStorage.setItem("historyRecordCollapsed", isCollapsed.value);
  290. };
  291. const openHistory = () => {
  292. isCollapsed.value = false;
  293. };
  294. const closeHistory = () => {
  295. isCollapsed.value = true;
  296. };
  297. const selectRecord = (record) => {
  298. selectedRecordId.value = record.id;
  299. emit("selectRecord", record);
  300. };
  301. const deleteRecord = (recordId) => {
  302. const index = historyRecords.value.findIndex(
  303. (record) => record.id === recordId
  304. );
  305. if (index > -1) {
  306. historyRecords.value.splice(index, 1);
  307. saveToLocalStorage();
  308. // 如果删除的是当前选中的记录,清除选中状态
  309. if (selectedRecordId.value === recordId) {
  310. selectedRecordId.value = null;
  311. }
  312. }
  313. };
  314. const clearHistory = () => {
  315. if (confirm("确定要清空所有历史记录吗?")) {
  316. historyRecords.value = [];
  317. selectedRecordId.value = null;
  318. saveToLocalStorage();
  319. }
  320. };
  321. const formatTime = (timestamp) => {
  322. const date = new Date(timestamp);
  323. const now = new Date();
  324. const diff = now - date;
  325. // 小于1分钟
  326. if (diff < 60000) {
  327. return "刚刚";
  328. }
  329. // 小于1小时
  330. if (diff < 3600000) {
  331. return `${Math.floor(diff / 60000)}分钟前`;
  332. }
  333. // 小于1天
  334. if (diff < 86400000) {
  335. return `${Math.floor(diff / 3600000)}小时前`;
  336. }
  337. // 大于1天
  338. if (diff < 604800000) {
  339. return `${Math.floor(diff / 86400000)}天前`;
  340. }
  341. // 超过一周,显示具体日期
  342. return date.toLocaleDateString("zh-CN", {
  343. month: "short",
  344. day: "numeric",
  345. hour: "2-digit",
  346. minute: "2-digit",
  347. });
  348. };
  349. const saveToLocalStorage = () => {
  350. localStorage.setItem(
  351. "aiChatHistoryRecords",
  352. JSON.stringify(historyRecords.value)
  353. );
  354. };
  355. const loadFromLocalStorage = () => {
  356. try {
  357. const saved = localStorage.getItem("aiChatHistoryRecords");
  358. if (saved) {
  359. historyRecords.value = JSON.parse(saved);
  360. }
  361. // 加载折叠状态
  362. const collapsedState = localStorage.getItem("historyRecordCollapsed");
  363. if (collapsedState !== null) {
  364. isCollapsed.value = collapsedState === "true";
  365. }
  366. } catch (error) {
  367. console.error("加载历史记录失败:", error);
  368. historyRecords.value = [];
  369. }
  370. };
  371. // 处理公告按钮点击
  372. const handleAnnouncementClick = () => {
  373. emit("showAnnouncement");
  374. };
  375. // 处理用户反馈按钮点击
  376. const handleFeedbackClick = () => {
  377. emit("showFeedback");
  378. };
  379. // 暴露方法和状态给父组件
  380. defineExpose({
  381. clearHistory,
  382. isCollapsed,
  383. toggleCollapse,
  384. });
  385. // 生命周期
  386. onMounted(() => {
  387. loadFromLocalStorage();
  388. });
  389. // 监听历史记录变化,自动保存
  390. watch(
  391. historyRecords,
  392. () => {
  393. saveToLocalStorage();
  394. },
  395. { deep: true }
  396. );
  397. </script>
  398. <style scoped>
  399. .history-record-container {
  400. min-width: 40px;
  401. width: 3%;
  402. position: fixed;
  403. left: 0;
  404. top: 0;
  405. bottom: 0;
  406. background: rgba(0, 0, 0, 0.5);
  407. border-right: 1px solid rgba(255, 255, 255, 0.1);
  408. backdrop-filter: blur(10px);
  409. z-index: 1000;
  410. transition: width 0.3s ease;
  411. display: flex;
  412. flex-direction: column;
  413. align-items: center;
  414. /* justify-content: center; */
  415. }
  416. .mobile-history-record-container {
  417. width: 0px;
  418. position: fixed;
  419. left: 0;
  420. top: 0;
  421. bottom: 0;
  422. background: rgba(0, 0, 0, 0.5);
  423. border-right: 1px solid rgba(255, 255, 255, 0.1);
  424. backdrop-filter: blur(10px);
  425. z-index: 1000;
  426. transition: width 0.3s ease;
  427. display: flex;
  428. flex-direction: column;
  429. align-items: center;
  430. }
  431. .collapsed {
  432. width: 300px;
  433. }
  434. .mobileCollapsed {
  435. width: 80vw;
  436. }
  437. .toggle-btn {
  438. width: 32px;
  439. height: 32px;
  440. transform: rotate(180deg);
  441. border-radius: 6px;
  442. color: white;
  443. cursor: pointer;
  444. display: flex;
  445. align-items: center;
  446. justify-content: center;
  447. transition: all 0.3s ease;
  448. z-index: 10;
  449. }
  450. .mobile-toggle-btn {
  451. width: 10%;
  452. height: auto;
  453. border-radius: 6px;
  454. color: white;
  455. cursor: pointer;
  456. display: flex;
  457. align-items: center;
  458. justify-content: center;
  459. transition: all 0.3s ease;
  460. z-index: 10;
  461. }
  462. .toggle-btn:hover {
  463. background: rgba(255, 255, 255, 0.2);
  464. border-color: rgba(255, 255, 255, 0.3);
  465. }
  466. .collapsed-container {
  467. width: 100%;
  468. margin-top: 60px;
  469. display: flex;
  470. flex-direction: column;
  471. align-items: center;
  472. gap: 20px;
  473. z-index: 1000;
  474. }
  475. .collapsed-icon {
  476. width: 80%;
  477. height: auto;
  478. object-fit: contain;
  479. }
  480. .collapsed-toggle-btn {
  481. width: 80%;
  482. height: auto;
  483. border-radius: 6px;
  484. display: flex;
  485. align-items: center;
  486. justify-content: center;
  487. cursor: pointer;
  488. transition: all 0.3s ease;
  489. color: white;
  490. }
  491. .collapsed-toggle-btn:hover {
  492. background: rgba(255, 255, 255, 0.2);
  493. border-color: rgba(255, 255, 255, 0.3);
  494. }
  495. .collapsed-bottom-container {
  496. width: 100%;
  497. height: 16%;
  498. margin-top: auto;
  499. background-color: rgba(106, 0, 255, 0.2);
  500. display: flex;
  501. flex-direction: column;
  502. align-items: center;
  503. justify-content: center;
  504. gap: 30px;
  505. z-index: 1000;
  506. }
  507. .collapsed-bottom-btn {
  508. width: 100%;
  509. /* height: 50%; */
  510. display: flex;
  511. justify-content: center;
  512. /* align-items: center; */
  513. }
  514. .collapsed-bottom-feedback {
  515. width: 60%;
  516. height: auto;
  517. }
  518. .collapsed-bottom-feedback:hover {
  519. transform: scale(1.1);
  520. }
  521. .collapsed-bottom-announcement {
  522. width: 60%;
  523. height: auto;
  524. }
  525. .collapsed-bottom-announcement:hover {
  526. transform: scale(1.1);
  527. }
  528. .history-content {
  529. flex: 1;
  530. display: flex;
  531. flex-direction: column;
  532. width: 100%;
  533. /* padding: 20px; */
  534. overflow: hidden;
  535. }
  536. .head-container {
  537. margin-top: 20%;
  538. width: 100%;
  539. display: flex;
  540. align-items: center;
  541. justify-content: center;
  542. }
  543. .mobile-head-container {
  544. padding: 5px 0px 5px 20px;
  545. /* margin-left: 20px; */
  546. /* width: 100%; */
  547. display: flex;
  548. align-items: center;
  549. border-bottom: 2px solid #414141;
  550. /* justify-content: center; */
  551. }
  552. .history-header {
  553. display: flex;
  554. justify-content: space-between;
  555. align-items: center;
  556. margin-bottom: 20px;
  557. padding-bottom: 15px;
  558. border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  559. }
  560. .history-actions {
  561. display: flex;
  562. justify-content: center;
  563. align-items: center;
  564. }
  565. .mobile-history-actions {
  566. margin-left: auto;
  567. display: flex;
  568. justify-content: center;
  569. align-items: center;
  570. }
  571. .logo-img {
  572. height: auto;
  573. width: 70%;
  574. object-fit: contain;
  575. }
  576. .new-chat-btn {
  577. width: 100%;
  578. padding: 12px 16px;
  579. border: none;
  580. border-radius: 8px;
  581. background: rgba(255, 255, 255, 0.1);
  582. color: white;
  583. font-size: 14px;
  584. cursor: pointer;
  585. transition: all 0.3s ease;
  586. display: flex;
  587. align-items: center;
  588. justify-content: center;
  589. gap: 8px;
  590. }
  591. .new-chat-btn:hover {
  592. background: rgba(255, 255, 255, 0.2);
  593. transform: translateY(-1px);
  594. }
  595. .new-chat-btn:active {
  596. transform: translateY(0);
  597. }
  598. .history-list {
  599. flex: 1;
  600. overflow-y: auto;
  601. scrollbar-width: thin;
  602. scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  603. }
  604. .history-list::-webkit-scrollbar {
  605. width: 6px;
  606. }
  607. .history-list::-webkit-scrollbar-track {
  608. background: transparent;
  609. }
  610. .history-list::-webkit-scrollbar-thumb {
  611. background: rgba(255, 255, 255, 0.3);
  612. border-radius: 3px;
  613. }
  614. .history-list::-webkit-scrollbar-thumb:hover {
  615. background: rgba(255, 255, 255, 0.5);
  616. }
  617. .history-item {
  618. background: rgba(255, 255, 255, 0.05);
  619. border-radius: 8px;
  620. margin-bottom: 8px;
  621. padding: 12px;
  622. cursor: pointer;
  623. transition: all 0.2s ease;
  624. border: 1px solid transparent;
  625. display: flex;
  626. justify-content: space-between;
  627. align-items: flex-start;
  628. }
  629. .history-item:hover {
  630. background: rgba(255, 255, 255, 0.1);
  631. transform: translateX(4px);
  632. }
  633. .history-item.active {
  634. background: rgba(255, 255, 255, 0.15);
  635. border-color: rgba(255, 255, 255, 0.3);
  636. }
  637. .record-content {
  638. flex: 1;
  639. min-width: 0;
  640. }
  641. .record-type {
  642. margin-bottom: 6px;
  643. }
  644. .type-badge {
  645. display: inline-block;
  646. padding: 2px 8px;
  647. border-radius: 12px;
  648. font-size: 10px;
  649. font-weight: 500;
  650. text-transform: uppercase;
  651. }
  652. .type-badge.AIchat {
  653. background: rgba(52, 152, 219, 0.2);
  654. color: #3498db;
  655. border: 1px solid rgba(52, 152, 219, 0.3);
  656. }
  657. .type-badge.AiEmotion {
  658. background: rgba(155, 89, 182, 0.2);
  659. color: #9b59b6;
  660. border: 1px solid rgba(155, 89, 182, 0.3);
  661. }
  662. .record-text {
  663. color: white;
  664. font-size: 13px;
  665. line-height: 1.4;
  666. margin-bottom: 6px;
  667. overflow: hidden;
  668. text-overflow: ellipsis;
  669. display: -webkit-box;
  670. -webkit-line-clamp: 2;
  671. -webkit-box-orient: vertical;
  672. }
  673. .record-time {
  674. color: rgba(255, 255, 255, 0.6);
  675. font-size: 11px;
  676. }
  677. .record-actions {
  678. margin-left: 8px;
  679. opacity: 0;
  680. transition: opacity 0.2s ease;
  681. }
  682. .history-item:hover .record-actions {
  683. opacity: 1;
  684. }
  685. .delete-btn {
  686. background: rgba(231, 76, 60, 0.2);
  687. border: none;
  688. border-radius: 4px;
  689. color: #e74c3c;
  690. padding: 4px;
  691. cursor: pointer;
  692. transition: all 0.2s ease;
  693. display: flex;
  694. align-items: center;
  695. justify-content: center;
  696. }
  697. .delete-btn:hover {
  698. background: rgba(231, 76, 60, 0.3);
  699. transform: scale(1.1);
  700. }
  701. .empty-state {
  702. display: flex;
  703. flex-direction: column;
  704. align-items: center;
  705. justify-content: center;
  706. padding: 40px 20px;
  707. text-align: center;
  708. }
  709. .empty-icon {
  710. margin-bottom: 16px;
  711. opacity: 0.5;
  712. }
  713. .documentDelete {
  714. color: white;
  715. font-size: 5rem;
  716. }
  717. .empty-text {
  718. color: rgba(255, 255, 255, 0.6);
  719. font-size: 14px;
  720. margin: 0;
  721. }
  722. .bottom-container {
  723. width: 100%;
  724. height: 16%;
  725. margin-top: auto;
  726. background-color: rgba(106, 0, 255, 0.2);
  727. display: flex;
  728. justify-content: space-between;
  729. align-items: center;
  730. }
  731. .mobile-bottom-container {
  732. border-top: 2px solid #414141;
  733. width: 100%;
  734. height: 16%;
  735. margin-top: auto;
  736. background-color: rgba(106, 0, 255, 0.2);
  737. display: flex;
  738. flex-direction: column;
  739. justify-content: space-between;
  740. align-items: center;
  741. }
  742. .bottom-btn {
  743. width: 50%;
  744. display: flex;
  745. justify-content: center;
  746. align-items: center;
  747. }
  748. .mobile-bottom-btn {
  749. width: 100%;
  750. height: 50%;
  751. display: flex;
  752. align-items: center;
  753. }
  754. .bottom-feedback {
  755. width: 30%;
  756. height: auto;
  757. }
  758. .mobile-bottom-feedback {
  759. margin-left: 20px;
  760. height: 60%;
  761. width: auto;
  762. }
  763. .bottom-feedback:hover {
  764. transform: scale(1.2);
  765. }
  766. .bottom-announcement {
  767. width: 30%;
  768. height: auto;
  769. }
  770. .mobile-bottom-announcement {
  771. margin-left: 20px;
  772. height: 60%;
  773. width: auto;
  774. }
  775. .mobile-bottom-text {
  776. color: white;
  777. margin-left: 10px;
  778. font-size: 1.1rem;
  779. }
  780. .bottom-announcement:hover {
  781. transform: scale(1.2);
  782. }
  783. /* 移动端适配 */
  784. @media (max-width: 768px) {
  785. .history-content {
  786. /* padding: 15px; */
  787. }
  788. }
  789. </style>