Browse Source

todomvc example: pre-initialize state before mounting app

dev
Evan You 8 years ago
parent
commit
b8c3b5ae74
  1. 5
      examples/todomvc/index.html
  2. 4
      examples/todomvc/js/app.js

5
examples/todomvc/index.html

@ -16,7 +16,7 @@
height: 60px;
}
.todo-move, .todo-enter-active, .todo-leave-active {
transition: all .25s cubic-bezier(.55,0,.1,1);
transition: all .25s cubic-bezier(.5,0,.1,1);
}
.todo-enter, .todo-leave-active {
opacity: 0;
@ -94,6 +94,9 @@
<script>metrics.beforeRender = now()</script>
<script src="js/app.js"></script>
<script src="js/routes.js"></script>
<script>
app.$mount('.todoapp')
</script>
<script>metrics.afterRender = now()</script>
<script src="perf.js"></script>
</body>

4
examples/todomvc/js/app.js

@ -21,10 +21,6 @@
};
exports.app = new Vue({
// the root element that will be compiled
el: '.todoapp',
// app initial state
data: {
todos: todoStorage.fetch(),

Loading…
Cancel
Save