App.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div id="admin-app" v-resize="onResize">
  3. <router-view v-if="isRouterAlive"/>
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'App',
  9. provide() {
  10. return {
  11. reload: this.reload,
  12. }
  13. },
  14. data() {
  15. return {
  16. isRouterAlive: true,
  17. }
  18. },
  19. computed: {
  20. miniWidth() {
  21. return this.$store.state.miniWidth
  22. },
  23. },
  24. methods: {
  25. onResize() {
  26. const mini = window.innerWidth <= 768
  27. if (mini !== this.miniWidth) {
  28. mini && this.$store.commit('SET_OPENED', false)
  29. this.$store.commit('SET_MINI_WIDTH', mini)
  30. }
  31. },
  32. reload() {
  33. this.isRouterAlive = false
  34. this.$nextTick(function () {
  35. this.isRouterAlive = true
  36. })
  37. },
  38. },
  39. }
  40. </script>
  41. <style lang="scss">
  42. .amap-info-content {
  43. line-height: 1.15;
  44. }
  45. .el-table--enable-row-hover .el-table__body tr:hover > td {
  46. background-color: #aaa !important;
  47. color: #fff !important;
  48. }
  49. .el-dialog__body {
  50. padding: 5px 20px !important;
  51. }
  52. .tabs-fx {
  53. .el-dialog__body {
  54. padding: 30px 20px!important;
  55. }
  56. }
  57. .order-trajectory .el-card__body {
  58. padding: 10px 15px !important;
  59. }
  60. .mead-bike-map .el-card__body {
  61. height: calc(100% - 80px) !important;
  62. padding: 10px 15px !important;
  63. }
  64. .mead-tabs-class .el-tabs__content{
  65. padding: 15px 0!important;
  66. }
  67. </style>