index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <div class="module-container">
  3. <el-container>
  4. <el-header height="60px">
  5. <el-menu
  6. :default-active="activeMenu"
  7. mode="horizontal"
  8. @select="handleMenuSelect"
  9. >
  10. <el-menu-item index="pointsLog">
  11. <span>积分明细</span>
  12. </el-menu-item>
  13. </el-menu>
  14. </el-header>
  15. <el-main>
  16. <PointsLogComponent
  17. :axios-instance="axiosInstance"
  18. />
  19. </el-main>
  20. </el-container>
  21. </div>
  22. </template>
  23. <script>
  24. import PointsLogComponent from './PointsLog.vue'
  25. export default {
  26. name: 'PointsAdmin',
  27. components: {
  28. PointsLogComponent
  29. },
  30. props: {
  31. axiosInstance: {
  32. type: Object,
  33. default: null
  34. }
  35. },
  36. data() {
  37. return {
  38. activeMenu: 'pointsLog'
  39. }
  40. },
  41. methods: {
  42. handleMenuSelect(key) {
  43. this.activeMenu = key
  44. }
  45. }
  46. }
  47. </script>
  48. <style scoped>
  49. .module-container {
  50. padding: 0;
  51. height: calc(100vh - 120px);
  52. }
  53. .el-menu {
  54. height: 60px;
  55. font-size: 16px;
  56. }
  57. .el-header {
  58. padding: 0;
  59. background-color: #fff;
  60. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  61. }
  62. .el-main {
  63. padding: 30px;
  64. background: #fff;
  65. margin: 20px;
  66. border-radius: 8px;
  67. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  68. flex: 1;
  69. }
  70. </style>