-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix root v-else not rendering in prod and switched examples to minifi…
…ed vue for better prod coverage (#3943) * fix root v-else not rendering in production and switched examples to minified vue for better prod coverage * add dev build comment to examples * convert tabs to spaces in todomvc example for consistency
- Loading branch information
1 parent
95bf0c0
commit 4f5a47d
Showing
14 changed files
with
99 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,69 @@ | ||
<!doctype html> | ||
<html data-framework="vue"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Vue.js • TodoMVC</title> | ||
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css/index.css"> | ||
<script src="https:unpkg.com/director/build/director.js"></script> | ||
<style>[v-cloak] { display: none; }</style> | ||
</head> | ||
<body> | ||
<section class="todoapp"> | ||
<header class="header"> | ||
<h1>todos</h1> | ||
<input class="new-todo" | ||
autofocus autocomplete="off" | ||
placeholder="What needs to be done?" | ||
v-model="newTodo" | ||
@keyup.enter="addTodo"> | ||
</header> | ||
<section class="main" v-show="todos.length" v-cloak> | ||
<input class="toggle-all" type="checkbox" v-model="allDone"> | ||
<ul class="todo-list"> | ||
<li v-for="todo in filteredTodos" | ||
class="todo" | ||
:key="todo.id" | ||
:class="{ completed: todo.completed, editing: todo == editedTodo }"> | ||
<div class="view"> | ||
<input class="toggle" type="checkbox" v-model="todo.completed"> | ||
<label @dblclick="editTodo(todo)">{{ todo.title }}</label> | ||
<button class="destroy" @click="removeTodo(todo)"></button> | ||
</div> | ||
<input class="edit" type="text" | ||
v-model="todo.title" | ||
v-todo-focus="todo == editedTodo" | ||
@blur="doneEdit(todo)" | ||
@keyup.enter="doneEdit(todo)" | ||
@keyup.esc="cancelEdit(todo)"> | ||
</li> | ||
</ul> | ||
</section> | ||
<footer class="footer" v-show="todos.length" v-cloak> | ||
<span class="todo-count"> | ||
<strong>{{ remaining }}</strong> {{ remaining | pluralize }} left | ||
</span> | ||
<ul class="filters"> | ||
<li><a href="#/all" :class="{ selected: visibility == 'all' }">All</a></li> | ||
<li><a href="#/active" :class="{ selected: visibility == 'active' }">Active</a></li> | ||
<li><a href="#/completed" :class="{ selected: visibility == 'completed' }">Completed</a></li> | ||
</ul> | ||
<button class="clear-completed" @click="removeCompleted" v-show="todos.length > remaining"> | ||
Clear completed | ||
</button> | ||
</footer> | ||
</section> | ||
<footer class="info"> | ||
<p>Double-click to edit a todo</p> | ||
<p>Written by <a href="http://evanyou.me">Evan You</a></p> | ||
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p> | ||
</footer> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Vue.js • TodoMVC</title> | ||
<link rel="stylesheet" href="https://unpkg.com/todomvc-app-css/index.css"> | ||
<script src="https:unpkg.com/director/build/director.js"></script> | ||
<style>[v-cloak] { display: none; }</style> | ||
</head> | ||
<body> | ||
<section class="todoapp"> | ||
<header class="header"> | ||
<h1>todos</h1> | ||
<input class="new-todo" | ||
autofocus autocomplete="off" | ||
placeholder="What needs to be done?" | ||
v-model="newTodo" | ||
@keyup.enter="addTodo"> | ||
</header> | ||
<section class="main" v-show="todos.length" v-cloak> | ||
<input class="toggle-all" type="checkbox" v-model="allDone"> | ||
<ul class="todo-list"> | ||
<li v-for="todo in filteredTodos" | ||
class="todo" | ||
:key="todo.id" | ||
:class="{ completed: todo.completed, editing: todo == editedTodo }"> | ||
<div class="view"> | ||
<input class="toggle" type="checkbox" v-model="todo.completed"> | ||
<label @dblclick="editTodo(todo)">{{ todo.title }}</label> | ||
<button class="destroy" @click="removeTodo(todo)"></button> | ||
</div> | ||
<input class="edit" type="text" | ||
v-model="todo.title" | ||
v-todo-focus="todo == editedTodo" | ||
@blur="doneEdit(todo)" | ||
@keyup.enter="doneEdit(todo)" | ||
@keyup.esc="cancelEdit(todo)"> | ||
</li> | ||
</ul> | ||
</section> | ||
<footer class="footer" v-show="todos.length" v-cloak> | ||
<span class="todo-count"> | ||
<strong>{{ remaining }}</strong> {{ remaining | pluralize }} left | ||
</span> | ||
<ul class="filters"> | ||
<li><a href="#/all" :class="{ selected: visibility == 'all' }">All</a></li> | ||
<li><a href="#/active" :class="{ selected: visibility == 'active' }">Active</a></li> | ||
<li><a href="#/completed" :class="{ selected: visibility == 'completed' }">Completed</a></li> | ||
</ul> | ||
<button class="clear-completed" @click="removeCompleted" v-show="todos.length > remaining"> | ||
Clear completed | ||
</button> | ||
</footer> | ||
</section> | ||
<footer class="info"> | ||
<p>Double-click to edit a todo</p> | ||
<p>Written by <a href="http://evanyou.me">Evan You</a></p> | ||
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p> | ||
</footer> | ||
|
||
<script> | ||
// for testing | ||
if (navigator.userAgent.indexOf('PhantomJS') > -1) localStorage.clear() | ||
</script> | ||
<script src="../../dist/vue.js"></script> | ||
<script src="app.js"></script> | ||
</body> | ||
<script> | ||
// for testing | ||
if (navigator.userAgent.indexOf('PhantomJS') > -1) localStorage.clear() | ||
</script> | ||
<!-- Delete ".min" for console warnings in development --> | ||
<script src="../../dist/vue.min.js"></script> | ||
<script src="app.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters