效果图
    image.png

    代码实现:
    image.png

    1. .el-table tr{
    2. background-color: rgba(0,0,0,0) !important;
    3. }
    4. .el-table tr th{
    5. background-color: rgba(0,0,0,0) !important;
    6. }
    7. /* 去掉鼠标悬浮效果 */
    8. .el-table tbody tr:hover > td {
    9. background-color: rgba(255,255,255,0.75) !important;
    10. }
    11. .el-table{
    12. background-color: rgba(0,0,0,0) !important;
    13. }
    14. .el-tabs--border-card{
    15. background-color: rgba(0,0,0,0) !important;
    16. }
    17. .el-card{
    18. background-color: rgba(0,0,0,0) !important;
    19. }

    image.png

    1. <template>
    2. <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
    3. <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
    4. <sidebar class="sidebar-container"/>
    5. <div :class="{hasTagsView:needTagsView}" class="main-container" >
    6. <div style="background-color: white;position: absolute;width: 100%;height: 100%;display: flex;flex-wrap: wrap;overflow: hidden">
    7. <span style="flex: none; padding: 40px 50px;transform:rotate(-35deg);color: #eeeeee;" v-for="(item,i) in 1000">{{username}}</span>
    8. </div>
    9. <div :class="{'fixed-header':fixedHeader}">
    10. <navbar />
    11. <tags-view v-if="needTagsView" />
    12. </div>
    13. <app-main />
    14. <right-panel>
    15. <settings />
    16. </right-panel>
    17. </div>
    18. </div>
    19. </template>
    20. <script>
    21. import RightPanel from '@/components/RightPanel'
    22. import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
    23. import ResizeMixin from './mixin/ResizeHandler'
    24. import { mapState } from 'vuex'
    25. import variables from '@/assets/styles/variables.scss'
    26. export default {
    27. name: 'Layout',
    28. components: {
    29. AppMain,
    30. Navbar,
    31. RightPanel,
    32. Settings,
    33. Sidebar,
    34. TagsView
    35. },
    36. mixins: [ResizeMixin],
    37. computed: {
    38. ...mapState({
    39. theme: state => state.settings.theme,
    40. sideTheme: state => state.settings.sideTheme,
    41. sidebar: state => state.app.sidebar,
    42. device: state => state.app.device,
    43. needTagsView: state => state.settings.tagsView,
    44. fixedHeader: state => state.settings.fixedHeader,
    45. username:state => state.user.name,
    46. }),
    47. classObj() {
    48. return {
    49. hideSidebar: !this.sidebar.opened,
    50. openSidebar: this.sidebar.opened,
    51. withoutAnimation: this.sidebar.withoutAnimation,
    52. mobile: this.device === 'mobile'
    53. }
    54. },
    55. variables() {
    56. return variables;
    57. }
    58. },
    59. methods: {
    60. handleClickOutside() {
    61. this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
    62. }
    63. }
    64. }
    65. </script>
    66. <style lang="scss" scoped>
    67. @import "~@/assets/styles/mixin.scss";
    68. @import "~@/assets/styles/variables.scss";
    69. .app-wrapper {
    70. @include clearfix;
    71. position: relative;
    72. height: 100%;
    73. width: 100%;
    74. &.mobile.openSidebar {
    75. position: fixed;
    76. top: 0;
    77. }
    78. }
    79. .drawer-bg {
    80. background: #000;
    81. opacity: 0.3;
    82. width: 100%;
    83. top: 0;
    84. height: 100%;
    85. position: absolute;
    86. z-index: 999;
    87. }
    88. .fixed-header {
    89. position: fixed;
    90. top: 0;
    91. right: 0;
    92. z-index: 9;
    93. width: calc(100% - #{$base-sidebar-width});
    94. transition: width 0.28s;
    95. }
    96. .hideSidebar .fixed-header {
    97. width: calc(100% - 54px);
    98. }
    99. .mobile .fixed-header {
    100. width: 100%;
    101. }
    102. </style>

    image.png

    image.png