vue3实现一个手机端ai聊天app的ui原型图代码
代码语言:html
所属分类:其他
代码描述:vue3实现一个手机端ai聊天app的ui原型图代码
代码标签: vue3 手机端 ai 聊天 app 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>AI Chat App</title> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue3.2.22.js"></script> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; height: 100vh; overflow: hidden; } .app-container { height: 100vh; max-width: 400px; margin: 0 auto; background: white; position: relative; overflow: hidden; } .page { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: transform 0.3s ease; overflow-y: auto; } .page.slide-left { transform: translateX(-100%); } .page.slide-right { transform: translateX(100%); } .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } .header h1 { font-size: 18px; font-weight: 600; } .nav-icon { width: 24px; height: 24px; cursor: pointer; transition: transform 0.2s; } .nav-icon:hover { transform: scale(1.1); } .content { padding: 20px; height: calc(100vh - 70px); overflow-y: auto; } .chat-container { height: calc(100vh - 130px); display: flex; flex-direction: column; } .messages { flex: 1; padding: 20px; overflow-y: auto; } .message { margin-bottom: 15px; display: flex; align-items: flex-start; } .message.user { justify-content: flex-end; } .message-content { max-width: 80%; padding: 12px 16px; border-radius: 18px; word-wrap: break-word; } .message.user .message-content { background: #007AFF; color: white; border-bottom-right-radius: 6px; } .message.ai .message-content { background: #E9E9EB; color: #333; border-bottom-left-radius: 6px; } .input-area { padding: 20px; background: white; border-top: 1px solid #e1e1e1; display: flex; align-items: center; gap: 10px; } .input-field { flex: 1; padding: 12px 16px; border: 1px solid #ddd; border-radius: 20px; outline: none; font-size: 16px; } .send-btn { width: 40px; height: 40px; background: #007AFF; border: none; border-radius: 50%; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; } .send-btn:disabled { background: #ccc; cursor: not-allowed; } .conversation-list { list-style: none; } .conversation-item { padding: 15px 20px; border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background 0.2s; } .conversation-item:hover { background: #f8f8f8; } .conversation-title { font-weight: 600; margin-bottom: 5px; } .conversation-preview { color: #666; font-size: 14px; } .conversation-time { color: #999; font-size: 12px; float: right; } .btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: background 0.2s; width: 100%; margin-bottom: 10px; } .btn-primary { background: #007AFF; color: white; } .btn-primary:hover { background: #0051D5; } .form-group { margin-bottom: 20px; } .form-label { display: block; margin-bottom: 8px; font-weight: 600; color: #333; } .form-input { width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; outline: none; } .form-input:focus { border-color: #007AFF; } .setting-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f0f0f0; } .setting-label { font-weight: 500; } .switch { position: relative; width: 50px; height: 30px; background: #ddd; border-radius: 15px; cursor: pointer; transition: background 0.3s; } .switch.active { background: #007AFF; } .switch-handle { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: white; border-radius: 50%; transition: transform 0.3s; } .switch.active .switch-handle { transform: translateX(20px); } .profile-header { text-align: center; padding: 30px 0; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; margin: -20px -20px 30px -20px; } .profile-avatar { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 15px; } .splash-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } .logo { width: 100px; height: 100px; margin-bottom: 30px; animation: pulse 2s infinite; } @keyframes pu.........完整代码请登录后点击上方下载按钮下载查看
网友评论0