Browse Source

demo: demo update (#40924)

pull/40938/head
lijianan 2 years ago
committed by GitHub
parent
commit
895f2591b4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      components/config-provider/demo/locale.tsx

8
components/config-provider/demo/locale.tsx

@ -11,9 +11,11 @@ import {
Select, Select,
Space, Space,
Table, Table,
theme,
TimePicker, TimePicker,
Transfer, Transfer,
} from 'antd'; } from 'antd';
import type { Locale } from 'antd/es/locale';
import enUS from 'antd/locale/en_US'; import enUS from 'antd/locale/en_US';
import zhCN from 'antd/locale/zh_CN'; import zhCN from 'antd/locale/zh_CN';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
@ -38,6 +40,8 @@ const columns = [
]; ];
const Page: React.FC = () => { const Page: React.FC = () => {
const { token } = theme.useToken();
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const showModal = () => { const showModal = () => {
@ -89,7 +93,7 @@ const Page: React.FC = () => {
</Popconfirm> </Popconfirm>
</Space> </Space>
<Transfer dataSource={[]} showSearch targetKeys={[]} /> <Transfer dataSource={[]} showSearch targetKeys={[]} />
<div style={{ width: 320, border: `1px solid #d9d9d9`, borderRadius: 8 }}> <div style={{ width: 320, border: `1px solid ${token.colorBorder}`, borderRadius: 8 }}>
<Calendar fullscreen={false} value={dayjs()} /> <Calendar fullscreen={false} value={dayjs()} />
</div> </div>
<Table dataSource={[]} columns={columns} /> <Table dataSource={[]} columns={columns} />
@ -101,7 +105,7 @@ const Page: React.FC = () => {
}; };
const App: React.FC = () => { const App: React.FC = () => {
const [locale, setLocal] = useState(enUS); const [locale, setLocal] = useState<Locale>(enUS);
const changeLocale = (e: RadioChangeEvent) => { const changeLocale = (e: RadioChangeEvent) => {
const localeValue = e.target.value; const localeValue = e.target.value;

Loading…
Cancel
Save