vue3实现支持一次性周期性规律任务的待办事项todolists 代码

代码语言:html

所属分类:其他

代码描述:vue3实现支持一次性周期性规律任务的待办事项todolists 代码:主要功能: 添加任务 任务内容输入 三种分类:工作、学习、生活 一次性任务:选择具体日期 周期性任务:设置开始日期和重复周期 任务展示 今日任务视图(自动筛选当天的任务) 全部任务视图 按分类筛选 任务管理 完成人任务 删除任务 数据持久化(localStorage)

代码标签: vue3 支持 一次性 周期性 规律 任务 待办 事项 todolists 代码

下面为部分代码预览,完整代码请点击下载或在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>待办事项 TodoList</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue@2.6.1-dev.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        #app {
            max-width: 800px;
            margin: 0 auto;
        }
        
        /* 头部样式 */
        .header {
            text-align: center;
            color: white;
            margin-bottom: 30px;
            animation: fadeInDown 0.6s ease;
        }
        
        .header h1 {
            font-size: 3em;
            margin-bottom: 10px;
            font-weight: 300;
            letter-spacing: 2px;
        }
        
        .current-date {
            font-size: 1.1em;
            opacity: 0.95;
            font-weight: 300;
        }
        
        /* 统计卡片 */
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
            animation: fadeInUp 0.6s ease;
        }
        
        .stat-card {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s, box-shadow 0.3s;
            cursor: pointer;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
        }
        
        .stat-icon {
            font-size: 2.5em;
            margin-bottom: 10px;
        }
        
        .stat-number {
            font-size: 2.5em;
            font-weight: bold;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 5px;
        }
        
        .stat-label {
            font-size: 0.9em;
            color: #666;
            font-weight: 500;
        }
        
        /* 今日任务容器 */
        .today-container {
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            animation: fadeInUp 0.8s ease;
            min-height: 400px;
        }
        
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 2px solid #f0f0f0;
        }
        
        .section-title {
            font-size: 1.5em;
            color: #333;
            font-weight: 600;
        }
        
        .btn-manage {
            padding: 10px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            font-size: 14px;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }
        
        .btn-manage:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }
        
        /* 任务列表 */
        .todo-list {
            list-style: none;
        }
        
        .todo-item {
            background: #fff;
            border: 2px solid #f0f0f0;
            border-radius: 15px;
            padding: 20px;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            transition: all 0.3s;
            animation: slideIn 0.4s ease;
        }
        
        .todo-item:hover {
            border-color: #667eea;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.15);
            transform: translateX(5px);
        }
        
        .todo-item.completed {
            opacity: 0.6;
            background: #fafafa;
        }
        
        .todo-item.completed .todo-title {
            text-decoration: line-through;
        }
        
        .checkbox-wrapper {
            margin-right: 15px;
        }
        
        .checkbox {
            width: 24px;
            height: 24px;
            cursor: pointer;
            accent-color: #667eea;
        }
        
        .todo-content {
            flex: 1;
        }
        
        .todo-title {
            font-size: 1.1em;
            font-weight: 500;
            color: #333;
            margin-bottom: 8px;
        }
        
        .todo-meta {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        
        .category-badge {
            padding: 4px 12px;
            border-radius: 15px;
            font-size: 0.75em;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .category-work {
            background: #ffeaa7;
            color: #d63031;
        }
        
        .category-study {
            background: #81ecec;
            color: #00b894;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0