index.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <ScrollContainer>
  3. <div ref="wrapperRef" :class="prefixCls">
  4. <Tabs tab-position="left" :tabBarStyle="tabBarStyle">
  5. <template v-for="item in settingList" :key="item.key">
  6. <TabPane :tab="item.name">
  7. <component :is="item.component" />
  8. </TabPane>
  9. </template>
  10. </Tabs>
  11. </div>
  12. </ScrollContainer>
  13. </template>
  14. <script lang="ts">
  15. import { defineComponent } from 'vue';
  16. import { Tabs } from 'ant-design-vue';
  17. import { ScrollContainer } from '/@/components/Container/index';
  18. import { settingList } from './data';
  19. import BaseSetting from './BaseSetting.vue';
  20. import SecureSetting from './SecureSetting.vue';
  21. import AccountBind from './AccountBind.vue';
  22. import MsgNotify from './MsgNotify.vue';
  23. export default defineComponent({
  24. components: {
  25. ScrollContainer,
  26. Tabs,
  27. TabPane: Tabs.TabPane,
  28. BaseSetting,
  29. SecureSetting,
  30. AccountBind,
  31. MsgNotify,
  32. },
  33. setup() {
  34. return {
  35. prefixCls: 'account-setting',
  36. settingList,
  37. tabBarStyle: {
  38. width: '220px',
  39. },
  40. };
  41. },
  42. });
  43. </script>
  44. <style lang="less">
  45. .account-setting {
  46. margin: 12px;
  47. background-color: @component-background;
  48. .base-title {
  49. padding-left: 0;
  50. }
  51. .ant-tabs-tab-active {
  52. background-color: @item-active-bg;
  53. }
  54. }
  55. </style>