From bd13944c4eea26af62e064822cbcc9d35bf5afbb Mon Sep 17 00:00:00 2001 From: Wuxh Date: Tue, 28 Feb 2023 16:32:49 +0800 Subject: [PATCH] docs: locale demo update (#40930) * docs: update local demo * docs: update --- components/config-provider/demo/locale.tsx | 99 +++++++++++++++++++++- 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/components/config-provider/demo/locale.tsx b/components/config-provider/demo/locale.tsx index 3c0243580f..21f73e27d2 100644 --- a/components/config-provider/demo/locale.tsx +++ b/components/config-provider/demo/locale.tsx @@ -1,5 +1,11 @@ -import type { RadioChangeEvent } from 'antd'; +import { EllipsisOutlined } from '@ant-design/icons'; +import type { RadioChangeEvent, TourProps, UploadFile } from 'antd'; import { + Upload, + Tour, + Input, + Form, + QRCode, Button, Calendar, ConfigProvider, @@ -14,6 +20,9 @@ import { theme, TimePicker, Transfer, + Image, + InputNumber, + Divider, } from 'antd'; import type { Locale } from 'antd/es/locale'; import enUS from 'antd/locale/en_US'; @@ -43,6 +52,8 @@ const Page: React.FC = () => { const { token } = theme.useToken(); const [open, setOpen] = useState(false); + const [tourOpen, setTourOpen] = useState(false); + const tourRefs = React.useRef([]); const showModal = () => { setOpen(true); @@ -66,11 +77,50 @@ const Page: React.FC = () => { }); }; + const steps: TourProps['steps'] = [ + { + title: 'Upload File', + description: 'Put your files here.', + target: () => tourRefs.current[0], + }, + { + title: 'Save', + description: 'Save your changes.', + target: () => tourRefs.current[1], + }, + { + title: 'Other Actions', + description: 'Click to see other actions.', + target: () => tourRefs.current[2], + }, + ]; + + const fileList: UploadFile[] = [ + { + uid: '-1', + name: 'image.png', + status: 'done', + url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', + }, + { + uid: '-2', + percent: 50, + name: 'image.png', + status: 'uploading', + url: 'https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png', + }, + { + uid: '-3', + name: 'image.png', + status: 'error', + }, + ]; + return ( @@ -96,10 +146,55 @@ const Page: React.FC = () => {
+
+ + + + + + + + + +

Locale Modal

+ + console.log('refresh')} + /> + + + + Tour + + + + +