PluginManage.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <div id="pluginManage">
  3. <br/>
  4. <div class="left">
  5. <el-scrollbar :max-height="menuHeight">
  6. <el-menu default-active="0" class="pluginManage-menu" @select="handlePluginSelect">
  7. <el-menu-item v-for="(item,index) of pluginList" :key="index" :index="index+''">
  8. <el-icon>
  9. <ElIconMagicStick/>
  10. </el-icon>
  11. <span>{{ item.pluginName }}</span>
  12. </el-menu-item>
  13. </el-menu>
  14. </el-scrollbar>
  15. </div>
  16. <div class="content">
  17. <PluginDetail :data="currPlugin"/>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import PluginDetail from '@/components/pluginManage/PluginDetail'
  23. import PluginData from '@/static/datas/PluginData'
  24. export default {
  25. data() {
  26. return {
  27. menuHeight: '',
  28. pluginList: [],
  29. currPlugin: {}
  30. }
  31. },
  32. props: {
  33. height: Object
  34. },
  35. components: {
  36. PluginDetail
  37. },
  38. created() {
  39. this.menuHeight = this.height * 0.7;
  40. this.pluginList = JSON.parse(JSON.stringify(PluginData))
  41. if (this.pluginList.length > 0) {
  42. this.currPlugin = this.pluginList[0]
  43. }
  44. },
  45. mounted() {
  46. },
  47. methods: {
  48. handlePluginSelect(val) {
  49. this.currPlugin = this.pluginList[Number(val)]
  50. }
  51. }
  52. }
  53. </script>
  54. <style scoped>
  55. #pluginManage .left {
  56. display: inline-block;
  57. width: 20%;
  58. height: 100%;
  59. }
  60. #pluginManage .content {
  61. display: inline-block;
  62. width: 79%;
  63. vertical-align: top;
  64. height: 100%;
  65. }
  66. </style>
  67. <style>
  68. #pluginManage .el-menu-item,.el-sub-menu__title {
  69. font-size: 17px !important;
  70. font-weight: 600;
  71. color: #373737;
  72. }
  73. #pluginManage .pluginManage-menu .is-active {
  74. color: #6566f4;
  75. }
  76. </style>