mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
todomvc example: pre-initialize state before mounting app
This commit is contained in:
parent
c1d8ccbe21
commit
b8c3b5ae74
@ -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>
|
||||
|
@ -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…
Reference in New Issue
Block a user