<template>
  <div class="material">
    <app-header></app-header>
    <router-view class="body" v-if="$route.name=='works'"/>
    <div class="body" v-else>
      <app-aside></app-aside>
      <app-main></app-main>
    </div>
  </div>
</template>

<script>
import AppAside from "./aside.vue";
import AppHeader from "./header.vue";
import AppMain from "./Main.vue";

export default {
  components:{
    AppAside,
    AppHeader,
    AppMain
  },
  mounted() {
    this.$nextTick(()=>{
      this.$bus.on('refreshTips',(data)=>{
      setTimeout(() => {
        let lastinstances = $.tooltipster.instancesLatest();
        $.each(lastinstances, function(i, instance){
          instance.destroy()
        });
        
        $('.tttttt').tooltipster({
          delay: 300,
          ...data
        }); 
      });
    })
    })
  },
}
</script>

<style lang="less" scoped>
.material{
  overflow: hidden;
  position: relative;
  background: #EFF2F4;
  height: 100vh;
  .body{
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 30px;
    display: flex;
    padding-top: 100px;
    height: 100%;
  }
}

</style>