index.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <div class="material">
  3. <app-header></app-header>
  4. <router-view class="body" v-if="isFilterAside" />
  5. <div class="body" v-else>
  6. <app-aside></app-aside>
  7. <app-main></app-main>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. import AppAside from "./aside.vue";
  13. import AppHeader from "./header.vue";
  14. import AppMain from "./Main.vue";
  15. export default {
  16. components: {
  17. AppAside,
  18. AppHeader,
  19. AppMain,
  20. },
  21. computed: {
  22. isFilterAside: function () {
  23. return ["works", "camList"].includes(this.$route.name);
  24. },
  25. },
  26. mounted() {
  27. this.$nextTick(() => {
  28. this.$bus.on("refreshTips", (data) => {
  29. setTimeout(() => {
  30. let lastinstances = $.tooltipster.instancesLatest();
  31. $.each(lastinstances, function (i, instance) {
  32. instance.destroy();
  33. });
  34. $(".tttttt").tooltipster({
  35. delay: 300,
  36. ...data,
  37. });
  38. });
  39. });
  40. });
  41. },
  42. };
  43. </script>
  44. <style lang="less" scoped>
  45. .material {
  46. overflow: hidden;
  47. position: relative;
  48. background: #eff2f4;
  49. height: 100vh;
  50. .body {
  51. max-width: 1280px;
  52. margin: 0 auto;
  53. padding-bottom: 30px;
  54. display: flex;
  55. padding-top: 100px;
  56. height: 100%;
  57. }
  58. }
  59. </style>