| | |
| | | /** 回到底部 */ |
| | | const handleGoBottom = async () => { |
| | | const scrollContainer = messageContainer.value |
| | | console.log(scrollContainer.scrollHeight) |
| | | scrollContainer.scrollTop = scrollContainer.scrollHeight |
| | | } |
| | | |
| | | /** 回到顶部 */ |
| | | const handlerGoTop = async () => { |
| | | const scrollContainer = messageContainer.value |
| | | console.log(scrollContainer.scrollHeight) |
| | | scrollContainer.scrollTop = 0 |
| | | } |
| | | |
| | |
| | | overflow-wrap: break-word; |
| | | background: rgba(115,196,255,0); |
| | | border-radius: 4px 4px 4px 4px; |
| | | padding: 20px 10px 5px 0; |
| | | padding: 0 10px 0 0; |
| | | .left-text { |
| | | color: rgba(219,238,255,0.8); |
| | | font-size: 1rem; |
| | |
| | | } |
| | | } |
| | | |
| | | // 回到底部 |
| | | .to-bottom { |
| | | position: absolute; |
| | | z-index: 1000; |
| | | bottom: 0; |
| | | right: 50%; |
| | | |
| | | .el-button { |
| | | background: rgba(255, 255, 255, 0.1); |
| | | border: solid 1px rgba(255, 215, 0, 0.6); |
| | | color: rgba(255, 215, 0, 0.5); |
| | | } |
| | | |
| | | .el-button:hover { |
| | | cursor: pointer; |
| | | background-color: rgba(255, 255, 255, 0.4); |
| | | border: solid 2px rgba(255, 215, 0); |
| | | color: rgba(255, 215, 0); |
| | | } |
| | | } |
| | | </style> |