feat: add baseSelect

This commit is contained in:
jialin
2025-09-17 19:53:40 +08:00
parent f36613227e
commit 1ac63e36df
12 changed files with 90 additions and 37 deletions
+5 -5
View File
@@ -1,8 +1,8 @@
import BaseSelect from '@/components/seal-form/base/select';
import useUserSettings from '@/hooks/use-user-settings';
import langConfigMap from '@/locales/lang-config-map';
import { MoonOutlined, SunOutlined } from '@ant-design/icons';
import { getAllLocales, setLocale, useIntl } from '@umijs/max';
import { Select } from 'antd';
import _ from 'lodash';
import React from 'react';
import styled from 'styled-components';
@@ -70,25 +70,25 @@ const Appearance: React.FC = () => {
<span className="label">
<span>{intl.formatMessage({ id: 'common.appearance.theme' })}</span>
</span>
<Select
<BaseSelect
value={userSettings.mode}
options={ThemeOptions}
onChange={handleOnChange}
style={{ width: 200 }}
></Select>
></BaseSelect>
</SettingsItem>
<SettingsItem>
<span className="label">
<span>{intl.formatMessage({ id: 'common.settings.language' })}</span>
</span>
<Select
<BaseSelect
value={intl.locale}
options={languageOptions}
onChange={(value) => {
setLocale(value, false);
}}
style={{ width: 200 }}
></Select>
></BaseSelect>
</SettingsItem>
</Wrapper>
);