开放平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

control.vue 2.2 KiB

3 vuotta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="control">
  3. <div class="navigation-box">
  4. <el-menu
  5. class="el-menu-vertical-demo"
  6. :default-active="defaultActive"
  7. @open="handleOpen"
  8. @close="handleClose"
  9. @select="handleSelect"
  10. >
  11. <el-menu-item index="/domain/control/myApp">
  12. <span class="svg-box">
  13. <i class="iconfont MinIconmy" style="color: #1890ff"></i>
  14. </span>
  15. <span slot="title">我的应用</span>
  16. </el-menu-item>
  17. <el-submenu index="/domain/control/information">
  18. <template slot="title">
  19. <span class="svg-box">
  20. <i class="iconfont MinIconapp" style="color: #1890ff"></i>
  21. </span>
  22. <span>用户中心</span>
  23. </template>
  24. <el-menu-item-group>
  25. <el-menu-item index="/domain/control/information">账号信息</el-menu-item>
  26. </el-menu-item-group>
  27. <el-menu-item-group>
  28. <el-menu-item index="/domain/control/registration">实名认证</el-menu-item>
  29. </el-menu-item-group>
  30. <el-menu-item-group>
  31. <el-menu-item index="/domain/control/password">修改密码</el-menu-item>
  32. </el-menu-item-group>
  33. </el-submenu>
  34. </el-menu>
  35. </div>
  36. <div class="content-box">
  37. <nuxt-child keep-alive />
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. export default {
  43. asyncData({ route }) {
  44. return {
  45. defaultActive: route.path,
  46. };
  47. },
  48. data(){
  49. return {
  50. defaultActive : '/domain/control/myApp'
  51. }
  52. },
  53. methods: {
  54. handleSelect(key, keyPath) {
  55. this.$router.push({
  56. path: key,
  57. params: { data: "query" },
  58. });
  59. },
  60. handleOpen: function () {},
  61. handleClose: function () {},
  62. },
  63. };
  64. </script>
  65. <style lang="scss" scoped>
  66. .control {
  67. width: 100%;
  68. display: flex;
  69. padding-bottom: 40px;
  70. flex-wrap: wrap;
  71. .navigation-box {
  72. width: 250px;
  73. height: 837px;
  74. background: #fff;
  75. margin-right: 20px;
  76. border-radius: 14px;
  77. overflow: hidden;
  78. }
  79. .content-box {
  80. width: 100%;
  81. flex: 1;
  82. display: flex;
  83. flex-flow: column;
  84. overflow: hidden;
  85. }
  86. }
  87. .svg-box {
  88. width: 20px;
  89. height: 20px;
  90. display: inline-block;
  91. vertical-align: 0px;
  92. }
  93. </style>