index.vue 992 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <div class="skeleton_coffee">
  3. <router-view class="main_coffee" />
  4. <van-tabbar active-color="#ee0a24" v-model="active">
  5. <van-tabbar-item name="Drinks" icon="home-o" url="#/coffee">点餐</van-tabbar-item>
  6. <van-tabbar-item name="Orders" icon="orders-o" url="#/coffee/orders">
  7. 订单
  8. </van-tabbar-item>
  9. </van-tabbar>
  10. </div>
  11. </template>
  12. <script>
  13. import { Tabbar as vanTabbar, TabbarItem as vanTabbarItem } from "vant";
  14. import "vant/lib/tabbar/style/index";
  15. import "vant/lib/tabbar-item/style/index";
  16. export default {
  17. name: "Apply",
  18. data() {
  19. return {
  20. active: 'Drinks',
  21. };
  22. },
  23. mounted() {
  24. this.active = this.$route.name;
  25. },
  26. computed: {},
  27. methods: {},
  28. beforeUnmount: function () {},
  29. components: {
  30. vanTabbar,
  31. vanTabbarItem,
  32. },
  33. };
  34. </script>
  35. <style>
  36. .skeleton_coffee {
  37. width: 100vw;
  38. height: 100vh;
  39. background-color: #fff;
  40. }
  41. .main_coffee {
  42. width: 100vw;
  43. height: calc(100% - 50px);
  44. }
  45. </style>