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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

47 lines
1.3 KiB

<script setup lang="ts">
import { TabPane, Tabs } from 'ant-design-vue'
2 years ago
import { ref } from 'vue'
import { settingList } from './data'
import BaseSetting from './BaseSetting.vue'
import SecureSetting from './SecureSetting.vue'
import AccountBind from './AccountBind.vue'
import MsgNotify from './MsgNotify.vue'
import { ScrollContainer } from '@/components/Container/index'
2 years ago
const wrapperRef = ref(null)
const tabBarStyle = { width: '220px' }
</script>
<template>
<ScrollContainer>
<div ref="wrapperRef" class="account-setting">
<Tabs tab-position="left" :tab-bar-style="tabBarStyle">
<template v-for="item in settingList" :key="item.key">
<TabPane :tab="item.name">
2 years ago
<BaseSetting v-if="item.component === 'BaseSetting'" />
<SecureSetting v-if="item.component === 'SecureSetting'" />
<AccountBind v-if="item.component === 'AccountBind'" />
<MsgNotify v-if="item.component === 'MsgNotify'" />
</TabPane>
</template>
</Tabs>
</div>
</ScrollContainer>
</template>
<style lang="less">
.account-setting {
margin: 12px;
2 years ago
background-color: var(--component-background);
.base-title {
padding-left: 0;
}
.ant-tabs-tab-active {
background-color: @item-active-bg;
}
}
</style>