App.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <div id="app">
  3. <router-view v-if="isRouterAlive" />
  4. <el-backtop :bottom="16" :right="20" :visibility-height="1100" class="backtop">
  5. <div><i class="el-icon-caret-top" style="color:#ee7000;"></i></div>
  6. </el-backtop>
  7. </div>
  8. </template>
  9. <script>
  10. export default {
  11. name: "App",
  12. provide() {
  13. return {
  14. reload: this.reload,
  15. };
  16. },
  17. data() {
  18. return {
  19. isRouterAlive: true,
  20. };
  21. },
  22. methods: {
  23. reload() {
  24. this.isRouterAlive = false;
  25. this.$nextTick(function () {
  26. this.isRouterAlive = true;
  27. });
  28. },
  29. },
  30. };
  31. </script>
  32. <style lang="scss">
  33. .icon {
  34. width: 34px;
  35. height: 34px;
  36. vertical-align: -0.15em;
  37. fill: currentColor;
  38. overflow: hidden;
  39. }
  40. .backtop {
  41. position: fixed;
  42. background-color: #FFF;
  43. width: 40px;
  44. height: 40px;
  45. border-radius: 50%;
  46. display: -webkit-box;
  47. display: -ms-flexbox;
  48. display: flex;
  49. -webkit-box-align: center;
  50. -ms-flex-align: center;
  51. align-items: center;
  52. -webkit-box-pack: center;
  53. -ms-flex-pack: center;
  54. justify-content: center;
  55. font-size: 20px;
  56. -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, .12);
  57. box-shadow: 0 0 6px rgba(0, 0, 0, .12);
  58. cursor: pointer;
  59. z-index: 999;
  60. }
  61. .people-style {
  62. .el-dialog {
  63. background: #F2F2F2;
  64. .el-dialog__header {
  65. background: #FFF;
  66. border-bottom: 1px solid #F2F2F2;
  67. }
  68. .el-dialog__body {
  69. padding: 0;
  70. padding-bottom: 1px;
  71. .el-form {
  72. padding: 24px;
  73. margin: 0 24px;
  74. background: #FFF;
  75. }
  76. }
  77. .tab-style {
  78. > .el-tabs__header {
  79. padding: 0 24px;
  80. background: #FFF;
  81. margin-bottom: 18px;
  82. .el-tabs__nav-wrap::after {
  83. height: 0;
  84. }
  85. }
  86. > .el-tabs__content > .el-tab-pane > :last-child {
  87. background: #FFF;
  88. margin-top: 18px;
  89. padding: 8px 20px;
  90. }
  91. }
  92. }
  93. }
  94. </style>