<template>
  <div class="classify">
    <div style="background-color: #FFFFFF;height: 30px;width: 100%;"></div>
    <!-- <van-nav-bar class="bar" left-arrow :title="$route.meta.title" @click-left="onClickLeft" @click-right="onClickRight" /> -->
    <van-nav-bar @click-left="onClickLeft" :title="title">
      <van-icon class="arrow-left" name="arrow-left" slot="left" />
    </van-nav-bar>
    
    <transition name="fade" appear>
      <router-view></router-view>
    </transition>
    <!-- <floatButton></floatButton> -->
  </div>
</template>

<script>
  import floatButton from '@/components/button/button';
  import {
    Icon
  } from 'vant';
  export default {
    name: 'default',
    components: {
      'floatButton':floatButton,
      [Icon.name]: Icon
    },
    data() {
      return {
        title: ''
      }
    },
    watch: {},
    computed: {},
    beforeCreate() {
      if(!localStorage.getItem('loginNum')){
        localStorage.setItem('loginNum', 1);
        window.location.reload();
      }
    },
    created() {
      this.title = this.$route.query.title;
    },
    methods: {
      onClickLeft() {
        this.$router.go(-1);
        // if(!localStorage.getItem('loginNum')){
        //   localStorage.setItem('loginNum', 1);
        //   this.$router.go(-1);
        //   window.location.reload();
        // }else{
        //   this.$router.go(-1);
        // }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .fade-enter-active,
  .fade-leave-active {
    transition: opacity .5s;
  }

  .fade-enter,
  .fade-leave-to

  /* .fade-leave-active below version 2.1.8 */
    {
    opacity: 0;
  }

  .arrow-left {
    color: #898989;
    font-size: 20px;
  }

  .classify {
    position: absolute;
    width: 100%;
    min-height: 100%;
    background-color: #0189FF;
  }
</style>

GitHub 加速计划 / vu / vue
207.54 K
33.66 K
下载
vuejs/vue: 是一个用于构建用户界面的 JavaScript 框架,具有简洁的语法和丰富的组件库,可以用于开发单页面应用程序和多页面应用程序。
最近提交(Master分支:2 个月前 )
73486cb5 * chore: fix link broken Signed-off-by: snoppy <michaleli@foxmail.com> * Update packages/template-compiler/README.md [skip ci] --------- Signed-off-by: snoppy <michaleli@foxmail.com> Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> 4 个月前
e428d891 Updated Browser Compatibility reference. The previous currently returns HTTP 404. 5 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐