OSDN Git Service

be0030c00a721554c2f2e3fa9c31396438085973
[bytom/Byone.git] / src / popup / App.vue
1 <template>
2   <section id="app">
3     <transition-group name="panels" tag="div" class="app-wrapper">
4       <Login class="view" key="login" v-show="view.login" @succ="currView='home'"></Login>
5       <Home class="view" key="home" v-show="view.home"></Home>
6     </transition-group>
7   </section>
8 </template>
9
10 <script>
11 import Home from "./framework/home";
12 import Login from "./framework/login";
13
14 import Bytom from "bytom-js-sdk";
15
16 export default {
17   components: {
18     Login,
19     Home
20   },
21   data() {
22     return {
23       currView: "home"
24     };
25   },
26   computed: {
27     view() {
28       const { currView } = this;
29       return {
30         login: currView === "login",
31         home: currView === "home"
32       };
33     }
34   },
35   methods: {},
36   mounted() {
37   }
38 };
39 </script>