vue3布局实现一个pc端即时通讯聊天软件ui原型图代码

代码语言:html

所属分类:布局界面

代码描述:vue3布局实现一个pc端即时通讯聊天软件ui原型图代码

代码标签: vue pc端 即时 通讯 聊天 软件 ui 原型图 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>微信PC端原型</title>
  <!-- Vue 3 CDN -->
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue.global.3.2.37.js"></script>
    <!-- ECharts CDN -->
 <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/echarts.5.5.0.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
            background: #f5f5f5;
            overflow: hidden;
        }

        .app-container {
            display: flex;
            height: 100vh;
            background: #fff;
        }

        /* 侧边栏样式 */
        .sidebar {
            width: 60px;
            background: #2c3e50;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px 0;
        }

        .sidebar-item {
            width: 40px;
            height: 40px;
            margin-bottom: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
            transition: background 0.3s;
        }

        .sidebar-item:hover,
        .sidebar-item.active {
            background: #3498db;
        }

        .sidebar-item svg {
            width: 24px;
            height: 24px;
            fill: #ecf0f1;
        }

        /* 联系人列表样式 */
        .contacts-panel {
            width: 280px;
            background: #fff;
            border-right: 1px solid #e1e8ed;
            display: flex;
            flex-direction: column;
        }

        .panel-header {
            height: 60px;
            padding: 0 20px;
            border-bottom: 1px solid #e1e8ed;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #3498db;
            color: white;
        }

        .search-box {
            padding: 15px 20px;
            border-bottom: 1px solid #e1e8ed;
        }

        .search-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 20px;
            outline: none;
            font-size: 14px;
        }

        .contacts-list {
            flex: 1;
            overflow-y: auto;
        }

        .contact-item {
            padding: 12px 20px;
            border-bottom: 1px solid #f0f0f0;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: background 0.3s;
        }

        .contact-item:hover,
        .contact-item.active {
            background: #e8f4fd;
        }

        .contact-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 12px;
            object-fit: cover;
        }

        .contact-info {
            flex: 1;
        }

        .contact-name {
            font-size: 14px;
            color: #333;
            margin-bottom: 4px;
        }

        .contact-message {
            font-size: 12px;
            color: #999;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contact-time {
            font-size: 12px;
            color: #999;
        }

        /* 聊天区域样式 */
        .chat-area {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .chat-header {
            height: 60px;
            padding: 0 20px;
            border-bottom: 1px solid #e1e8ed;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #3498db;
            color: white;
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            background: #f8f9fa;
        }

        .message {
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0