修改初始化逻辑

This commit is contained in:
whyour
2023-06-16 02:12:25 +08:00
parent e5bc4b3b04
commit 9f4435b237
5 changed files with 65 additions and 56 deletions
+12 -5
View File
@@ -33,6 +33,7 @@ import { SharedContext } from '@/layouts';
import './index.less';
const { Text } = Typography;
const isDemoEnv = window.__ENV__DeployEnv === 'demo';
const Setting = () => {
const {
@@ -275,11 +276,17 @@ const Setting = () => {
tabPosition="top"
onChange={tabChange}
items={[
{
key: 'security',
label: '安全设置',
children: <SecuritySettings user={user} userChange={reloadUser} />,
},
...(!isDemoEnv
? [
{
key: 'security',
label: '安全设置',
children: (
<SecuritySettings user={user} userChange={reloadUser} />
),
},
]
: []),
{
key: 'app',
label: '应用设置',