Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- App -->
- <div id="app">
- <component :is="state.view">
- <h1>{{ state.view }}</h1>
- </component>
- <controls></controls>
- </div>
- <!-- Controls -->
- <template id="controls">
- <ul class="controls">
- <li v-for="(animation, index) in state.animations" @click.prevent="setView(animation)" v-bind:class="{ 'active': animation === state.view }">
- {{ animation }}
- </li>
- </ul>
- </template>
- <!-- Transitions -->
- <template id="page">
- <transition
- v-on:enter="enter"
- v-on:leave="leave"
- v-bind:css="false"
- appear
- >
- <div class="page" v-bind:class="state.view">
- <div class="center">
- <slot></slot>
- </div>
- </div>
- </transition>
- </template>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement