1 Star 0 Fork 0

youyuan123/Vue.todolist练习

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
todolist.html 2.30 KB
一键复制 编辑 原始数据 按行查看 历史
youyuan123 提交于 2021-03-08 20:27 . 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<!-- HTML -->
<section id="todoapp" class="todoapp">
<header class="header">
<h1>todos</h1>
<input placeholder="What needs to be done?" v-focus class="new-todo" @keyup.enter="addTodo($event)" v-model="todo.title">
</header>
<section class="main">
<input id="toggle-all" type="checkbox" class="toggle-all" v-model="allChecked">
<label for="toggle-all">Mark all as complete</label>
<ul class="todo-list">
<li :class="{completed:item.completed,editing:currentEdit===item}" v-for="(item,index) in completeState" :key="index" @dblclick="currentEdit=item">
<div class="view">
<input type="checkbox" v-model="item.completed" class="toggle">
<label>{{item.title}}</label>
<button class="destroy"></button>
</div>
<input class="edit" @blur="editTodoTitle(index,$event)" @keyup.enter=" editTodoTitle(index,$event) " :value="item.title " @keyup.esc="currentEdit=null " v-focus>
</li>
</ul>
</section>
<footer class="footer ">
<span class="todo-count ">
<strong>{{todoCount}}</strong> item left</span>
<ul class="filters ">
<li><a @click="stateSelet($event,0) " href="#/ " :class="{selected: currentcss[0]} ">All</a></li>
<li><a @click="stateSelet($event,1) " href="#/active " :class="{selected:currentcss[1] } ">Active</a></li>
<li><a @click="stateSelet($event,2) " href="#/completed " :class="{selected: currentcss[2]} ">Completed</a></li>
</ul>
<button class="clear-completed " @click="claerCompleted ">Clear completed</button>
</footer>
</section>
<!--- 2CSS -->
<link rel="stylesheet " href="css/base.css ">
<link rel="stylesheet " href="css/index.css ">
<!--- 3、 提供的数据 -->
<script src="lib/vue.js "></script>
<script src="js/app.js "></script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/youyuan321/vuetodolist-practice.git
git@gitee.com:youyuan321/vuetodolist-practice.git
youyuan321
vuetodolist-practice
Vue.todolist练习
master

搜索帮助