vue3实现移动端电子钱包app的ui代码
代码语言:html
所属分类:布局界面
代码描述:vue3实现移动端电子钱包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, maximum-scale=1.0, user-scalable=no"> <title>我的钱包</title> <!-- Vue 3 CDN --> <script src="https://unpkg.com/vue@3.2.36/dist/vue.global.prod.js"></script> <!-- ECharts CDN (备用) --> <script src="https://cdn.jsdelivr.net/npm/echarts@5.3.3/dist/echarts.min.js"></script> <style> :root { --primary-color: #1677ff; --bg-color: #f5f5f5; --card-bg-color: #ffffff; --text-color: #333333; --text-light-color: #888888; --text-secondary-color: #555555; --border-color: #eeeeee; --income-color: #52c41a; --expense-color: #333333; } html, body { margin: 0; padding: 0; height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: var(--bg-color); color: var(--text-color); } #app { height: 100vh; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; background-color: var(--bg-color); box-shadow: 0 4px 12px rgba(0,0,0,0.05); } /* 动画 */ .fade-enter-active, .fade-leave-active { transition: opacity 0.2s ease; } .fade-enter-from, .fade-leave-to { opacity: 0; } /* 主内容区 */ main { flex-grow: 1; overflow-y: auto; padding-bottom: 70px; /* 为导航栏留出空间 */ } .page-container { padding: 15px; } /* 底部导航 */ .bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 600px; margin: 0 auto; height: 65px; background-color: var(--card-bg-color); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 1000; } .nav-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; color: var(--text-secondary-color); transition: color 0.2s; border: none; background: none; font-size: 0.8em; } .nav-item svg { width: 26px; height: 26px; margin-bottom: 4px; } .nav-item.active { color: var(--primary-color); } /* 通用组件 */ .btn { display: block; width: 100%; padding: 12px; font-size: 1.1em; font-weight: bold; color: white; background-color: var(--primary-color); border: none; border-radius: 8px; cursor: pointer; text-align: center; transition: all 0.2s; margin-top: 20px; } .btn:active { opacity: 0.8; } .card { background-color: var(--card-bg-color); border-radius: 12px; padding: 20px; margin-bottom: 15px; } /* 首页 */ .home-header { background: var(--primary-color); color: white; padding: 20px; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; } .home-header .asset-label { font-size: 0.9em; opacity: 0.8; } .home-header .asset-value { font-size: 2.5em; font-weight: bold; margin-top: 5px; } .grid-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; padding: 20px 0; } .grid-item { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 10px 0; } .grid-item .icon-wrapper { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; } .grid-item svg { width: 28px; height: 28px; color: white; } .grid-item span { font-size: 0.9em; } .recent-transactions .card-header { display: flex; justify-content: space-between; align-items: center; font-weight: bold; margin-bottom: 10px; } .recent-transactions .view-all { font-size: 0.9em; color: var(--text-light-color); cursor: pointer; } /* 交易列表 */ .transaction-list { list-style: none; padding: 0; } .transaction-item { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border-color); } .transaction-item:last-child { border-bottom: none; } .transaction-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; background-color: var(--primary-color); } .transaction-icon svg { width: 22px; height: 22px; color: white; } .transaction-details { flex-grow: 1; } .transaction-description { f.........完整代码请登录后点击上方下载按钮下载查看
网友评论0