fix: 格式化 UserSetting 文件
parent
6a97711ec9
commit
2a960133ac
|
@ -1,7 +1,13 @@
|
|||
<template>
|
||||
<ScrollContainer>
|
||||
<div ref="wrapperRef" class="user-account-setting" :class="[prefixCls, activeKey == 5 ? 'vip-background' : '']">
|
||||
<Tabs tab-position="left" :tabBarStyle="tabBarStyle" @tabClick="componentClick" v-model:activeKey="activeKey" :class="showVip?'vip-height':''">
|
||||
<Tabs
|
||||
tab-position="left"
|
||||
:tabBarStyle="tabBarStyle"
|
||||
@tabClick="componentClick"
|
||||
v-model:activeKey="activeKey"
|
||||
:class="showVip ? 'vip-height' : ''"
|
||||
>
|
||||
<template v-for="item in componentList" :key="item.key">
|
||||
<TabPane>
|
||||
<template #tab>
|
||||
|
@ -23,18 +29,18 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, defineComponent, onMounted, provide, computed } from "vue";
|
||||
import { Tabs } from "ant-design-vue";
|
||||
import { ScrollContainer } from "/@/components/Container";
|
||||
import { settingList } from "./UserSetting.data";
|
||||
import BaseSetting from "./BaseSetting.vue";
|
||||
import AccountSetting from "./AccountSetting.vue";
|
||||
import TenantSetting from "./TenantSetting.vue";
|
||||
import { ref, defineComponent, onMounted, computed } from 'vue';
|
||||
import { Tabs } from 'ant-design-vue';
|
||||
import { ScrollContainer } from '/@/components/Container';
|
||||
import { settingList } from './UserSetting.data';
|
||||
import BaseSetting from './BaseSetting.vue';
|
||||
import AccountSetting from './AccountSetting.vue';
|
||||
import TenantSetting from './TenantSetting.vue';
|
||||
import WeChatDingSetting from './WeChatDingSetting.vue';
|
||||
import { useRouter } from "vue-router";
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useDesign } from '/@/hooks/web/useDesign';
|
||||
import {useRootSetting} from "/@/hooks/setting/useRootSetting";
|
||||
import {ThemeEnum} from "/@/enums/appEnum";
|
||||
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
||||
import { ThemeEnum } from '/@/enums/appEnum';
|
||||
export default defineComponent({
|
||||
components: {
|
||||
ScrollContainer,
|
||||
|
@ -52,15 +58,13 @@ export default defineComponent({
|
|||
const activeKey = ref<string>('1');
|
||||
//是否为vip
|
||||
const showVip = ref<boolean>(false);
|
||||
//vip编码
|
||||
const vipCode = ref<string>('');
|
||||
const router = useRouter();
|
||||
const componentList = computed(() => {
|
||||
if (showVip.value) {
|
||||
return settingList;
|
||||
}
|
||||
return settingList.filter((item) => item.component != 'MyVipSetting');
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* 组件标题点击事件,解决第二次不加载数据
|
||||
|
@ -75,7 +79,7 @@ export default defineComponent({
|
|||
//如果请求参数包含我的租户,直接跳转过去
|
||||
let query = router.currentRoute.value.query;
|
||||
if (query && query.page === 'tenantSetting') {
|
||||
activeKey.value = "2";
|
||||
activeKey.value = '2';
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20230721 for:【QQYUN-5726】邀请加入租户加个按钮直接跳转过去------------
|
||||
}
|
||||
|
@ -86,21 +90,21 @@ export default defineComponent({
|
|||
return;
|
||||
}
|
||||
showVip.value = true;
|
||||
})
|
||||
});
|
||||
return {
|
||||
prefixCls,
|
||||
settingList,
|
||||
tabBarStyle: {
|
||||
width: "220px",
|
||||
marginBottom: "200px"
|
||||
width: '220px',
|
||||
marginBottom: '200px',
|
||||
},
|
||||
componentClick,
|
||||
activeKey,
|
||||
showVip,
|
||||
componentList,
|
||||
isDark
|
||||
isDark,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
|
|
Loading…
Reference in New Issue