App.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <template>
  2. <div id="app">
  3. <router-view />
  4. <theme-picker />
  5. </div>
  6. </template>
  7. <script>
  8. import ThemePicker from "@/components/ThemePicker";
  9. export default {
  10. name: "App",
  11. components: { ThemePicker },
  12. metaInfo() {
  13. return {
  14. title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
  15. titleTemplate: title => {
  16. return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
  17. }
  18. }
  19. }
  20. };
  21. </script>
  22. <style scoped lang="scss">
  23. #app .theme-picker {
  24. display: none;
  25. }
  26. // 滚动条样式
  27. ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
  28. width: 15px !important;
  29. height: 15px !important;
  30. }
  31. // ::v-deep .el-table__body-wrapper::-webkit-scrollbar-track {
  32. // background-color: #063570;
  33. // }
  34. ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
  35. width: 15px;
  36. height: 15px;
  37. opacity: 0.5;
  38. }
  39. ::v-deep .el-table__body-wrapper::-webkit-scrollbar-thumb {
  40. border-radius: 15px;
  41. //background-color: #0257aa;
  42. }
  43. // 表格高度不一致,将高度撑开
  44. // ::v-deep .el-table__fixed,.el-table__fixed-left, .el-table__fixed-right {
  45. // pointer-events: none;
  46. // td {
  47. // pointer-events: auto;
  48. // }
  49. // }
  50. </style>
  51. <style lang="scss">
  52. .app-container {
  53. padding: 20px 20px 10px !important;
  54. .app-container_flex_auto {
  55. display: flex;
  56. flex-direction: column;
  57. width: 100%;
  58. height: calc( 100vh - 150px );
  59. // 查询条件
  60. .app-container_form {
  61. flex-shrink: 0;
  62. }
  63. .app-container_table {
  64. flex: auto !important;
  65. display: flex;
  66. flex-direction: column;
  67. .app-container_table_main {
  68. //height: calc( 100% - 40px ) !important;
  69. flex: auto;
  70. }
  71. }
  72. .app-container_table_page {
  73. width: 100%;
  74. flex-shrink: 0;
  75. padding: 10px 20px 0 0;
  76. text-align: end;
  77. ::v-deep .pagination-container {
  78. padding: 10px 16px !important;
  79. margin-bottom: 0px !important;
  80. margin-top: 0px !important;
  81. }
  82. }
  83. // 让固定列的高自适应,且设置!important覆盖ele-ui的默认样式
  84. // 15px 为滚动条的高度
  85. .el-table__fixed{
  86. height: calc(100% - 15px) !important;
  87. }
  88. //fixed-right 的话,需要设置
  89. .el-table__fixed-right{
  90. height: calc(100% - 15px) !important;
  91. }
  92. .el-table__fixed-body-wrapper .el-table__body {
  93. padding-bottom: 15px !important; // 滚动条高度
  94. }
  95. }
  96. }
  97. </style>