native.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <div id="native">
  3. <el-col class="swfl" :span="24">
  4. <el-image style="width:22px;height:22px;margin:0 5px -5px 0;" :src="src"></el-image>
  5. <span>个人中心</span>
  6. </el-col>
  7. <el-col :span="24">
  8. <el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" text-color="#215299" active-text-color="#215299">
  9. <el-menu-item index="1" v-for="(item, index) in nativeList" :key="index"
  10. ><span slot="title" @click="clickUrl(item.name)">{{ item.name }}</span></el-menu-item
  11. >
  12. </el-menu>
  13. </el-col>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'native',
  19. props: {
  20. nativeList: null,
  21. },
  22. components: {},
  23. data: () => ({
  24. src: require('@/assets/swfl.png'),
  25. }),
  26. created() {},
  27. computed: {},
  28. methods: {
  29. clickUrl(name) {
  30. this.$emit('onsave', { name });
  31. },
  32. handleOpen(key, keyPath) {
  33. console.log(key, keyPath);
  34. },
  35. handleClose(key, keyPath) {
  36. console.log(key, keyPath);
  37. },
  38. },
  39. };
  40. </script>
  41. <style lang="less" scoped>
  42. .swfl {
  43. height: 60px;
  44. line-height: 60px;
  45. background-color: #22529a;
  46. text-align: center;
  47. }
  48. .swfl span {
  49. font-size: 22px;
  50. color: #ffffff;
  51. }
  52. /deep/.el-menu-item {
  53. height: 60px;
  54. text-align: center;
  55. line-height: 60px;
  56. border-bottom: 1px dashed;
  57. font-size: 22px;
  58. }
  59. /deep/.el-menu-item:last-child {
  60. border-bottom: none;
  61. }
  62. </style>