index.vue 1.4 KB
Newer Older
C
chen-xt 已提交
1 2
<template>
  <ScrollContainer>
陈小婷 已提交
3
    <div ref="wrapperRef" :class="prefixCls">
C
chen-xt 已提交
4
      <Tabs tab-position="left" :tabBarStyle="tabBarStyle">
C
chen-xt 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
        <template v-for="item in settingList" :key="item.key">
          <TabPane :tab="item.name">
            <component :is="item.component" />
          </TabPane>
        </template>
      </Tabs>
    </div>
  </ScrollContainer>
</template>

<script lang="ts">
  import { defineComponent } from 'vue';
  import { Tabs } from 'ant-design-vue';

  import { ScrollContainer } from '/@/components/Container/index';
  import { settingList } from './data';

  import BaseSetting from './BaseSetting.vue';
  import SecureSetting from './SecureSetting.vue';
  import AccountBind from './AccountBind.vue';
  import MsgNotify from './MsgNotify.vue';

  export default defineComponent({
    components: {
      ScrollContainer,
      Tabs,
      TabPane: Tabs.TabPane,
      BaseSetting,
      SecureSetting,
      AccountBind,
      MsgNotify,
    },
    setup() {
C
chen-xt 已提交
38
      return {
陈小婷 已提交
39
        prefixCls: 'account-setting',
C
chen-xt 已提交
40 41 42 43 44
        settingList,
        tabBarStyle: {
          width: '220px',
        },
      };
C
chen-xt 已提交
45 46 47
    },
  });
</script>
陈小婷 已提交
48 49 50
<style lang="less">
  .account-setting {
    margin: 12px;
V
Vben 已提交
51
    background-color: @component-background;
C
chen-xt 已提交
52

陈小婷 已提交
53
    .base-title {
C
chen-xt 已提交
54 55 56
      padding-left: 0;
    }

陈小婷 已提交
57
    .ant-tabs-tab-active {
V
Vben 已提交
58
      background-color: @item-active-bg;
C
chen-xt 已提交
59 60 61
    }
  }
</style>