import React, { useEffect, useState } from 'react'; import { Avatar, Badge, Breadcrumb, Button, Layout, Nav, Pagination, Popover, Rating, Row, Steps, Space, Tag, Timeline, Tooltip, Col, Typography, Anchor, BackTop, Tabs, TabPane, Calendar, Card, Collapse, Descriptions, Dropdown, Empty, List, ButtonGroup, Modal, OverflowList, Slider, SideSheet, Table, Banner, Popconfirm, Notification, Progress, Toast, Spin, Form, Select, Collapsible, Skeleton, Tree, Transfer } from '@douyinfe/semi-ui'; import { IconSemiLogo, IconBell, IconHelpCircle, IconBytedanceLogo, IconHome, IconHistogram, IconLive, IconSetting, IconEdit, IconCamera, IconAlarm, IconBookmark, IconDuration, IconFolder, IconDelete, IconUpload, IconSun, IconMoon, IconSearch } from '@douyinfe/semi-icons'; import { IllustrationConstruction, IllustrationConstructionDark, IllustrationNoResult, IllustrationNoResultDark, IllustrationSuccess, IllustrationSuccessDark, IllustrationFailure, IllustrationFailureDark, IllustrationNoAccess, IllustrationNoAccessDark, IllustrationNoContent, IllustrationNoContentDark, IllustrationNotFound, IllustrationNotFoundDark, IllustrationIdle, IllustrationIdleDark } from '@douyinfe/semi-illustrations'; import './a11y.scss'; SemiA11y.storyName = 'Semi A11y'; const raw = [ { key: '1', name: 'Semi Design 设计稿标题可能有点长这时候应该显示 Tooltip.fig', nameIconSrc: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/figma-icon.png', size: '2M', owner: '姜鹏志', updateTime: '2020-02-02 05:13', avatarBg: 'grey', }, { key: '2', name: 'Semi Design 分享演示文稿', nameIconSrc: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/docs-icon.png', size: '2M', owner: '郝宣', updateTime: '2020-01-17 05:31', avatarBg: 'red', }, { key: '3', name: '设计文档', nameIconSrc: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/docs-icon.png', size: '34KB', owner: 'Zoey Edwards', updateTime: '2020-01-26 11:01', avatarBg: 'light-blue', }, { key: '4', name: 'Semi Pro 设计文档可能也有点长所以也会显示Tooltip', nameIconSrc: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/docs-icon.png', size: '34KB', owner: '姜琪', updateTime: '2020-01-26 11:01', avatarBg: 'green', }, ]; const treeData = [ { label: '亚洲', value: 'Asia', key: '0', children: [ { label: '中国', value: 'China', key: '0-0', children: [ { label: '北京', value: 'Beijing', key: '0-0-0', }, { label: '上海', value: 'Shanghai', key: '0-0-1', }, ], }, ], }, { label: '北美洲', value: 'North America', key: '1', } ]; const listData = [ { title: '审核管理平台', rating: 4.5, feedbacks: 124, }, { title: '扁鹊', rating: 4, feedbacks: 108, }, { title: '直播审核平台', rating: 3.5, feedbacks: 244, }, { title: '抖音安全测试', feedbacks: 189, }, { title: '内容平台', rating: 3, feedbacks: 128, }, { title: '策略平台', rating: 4, feedbacks: 156, }, ]; const style = { width: '90%' }; const initValues = { name: 'semi', business: ['ulikeCam'], role: 'ued', switch: true, files: [ { uid: '1', name: 'vigo.png', status: 'success', size: '130KB', preview: true, url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/vigo.png', }, { uid: '2', name: 'jiafang1.jpeg', status: 'validateFail', size: '222KB', percent: 50, preview: true, fileInstance: new File([new ArrayBuffer(2048)], 'jiafang1.jpeg', { type: 'image/jpeg' }), url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg', }, { uid: '3', name: 'jiafang2.jpeg', status: 'uploading', size: '222KB', percent: 50, preview: true, fileInstance: new File([new ArrayBuffer(2048)], 'jiafang2.jpeg', { type: 'image/jpeg' }), url: 'https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/root-web-sites/bag.jpeg', }, ], }; const listItemStyle = { border: '1px solid var(--semi-color-border)', backgroundColor: 'var(--semi-color-bg-2)', borderRadius: '3px', paddingLeft: '20px', margin: '8px 2px', }; const descriptionData = [ { key: '实际用户数量', value: '1,480,000' }, { key: '7天留存', value: '98%' }, { key: '安全等级', value: '3级' }, { key: '垂类标签', value: 电商 }, { key: '认证状态', value: '未认证' }, ]; const descriptionStyle = { boxShadow: 'var(--semi-shadow-elevated)', backgroundColor: 'var(--semi-color-bg-2)', borderRadius: '4px', padding: '10px', margin: '10px', width: '200px', }; const emptyStyle = { padding: 30, }; const transferData = Array.from({ length: 100 }, (v, i) => { return { label: `选项名称 ${i}`, value: i, disabled: false, key: i, }; }); const items = [ { icon: , key: 'alarm' }, { icon: , key: 'bookmark' }, { icon: , key: 'camera' }, { icon: , key: 'duration' }, { icon: , key: 'edit' }, { icon: , key: 'folder' }, ]; const empty = ( } darkModeImage={} description={'搜索无结果'} /> ); const placeholder = (
); export default function SemiA11y() { const { Header, Footer, Sider, Content } = Layout; const { Title, Text, Paragraph } = Typography; const [modalVisible, setModalVisible] = useState(false); const [sideSheetVisible, setSideSheetVisible] = useState(false); const [overflowWidth, setOverflowWidth] = useState(100); const [isOpen, setCollapsibleOpen] = useState(false); const [dataSource, setData] = useState(raw); const [mode, setMode] = useState('light'); const [stringData, setStringData] = useState([]); const removeRecord = key => { let newDataSource = [...dataSource]; if (key != null) { let idx = newDataSource.findIndex(data => data.key === key); if (idx > -1) { newDataSource.splice(idx, 1); setData(newDataSource); } } }; const columns = [ { title: '标题', dataIndex: 'name', width: 400, render: (text, record, index) => { return ( {/* 宽度计算方式为单元格设置宽度 - 非文本内容宽度 */} {text} ); }, }, { title: '大小', dataIndex: 'size', width: 150, }, { title: '所有者', dataIndex: 'owner', render: (text, record, index) => { return (
{typeof text === 'string' && text.slice(0, 1)} {text}
); }, }, { title: '更新日期', dataIndex: 'updateTime', }, { title: '', width: 100, dataIndex: 'operate', render: (text, record) => ( setModalVisible(false)} onCancel={() => setModalVisible(false)} > This is the content of a basic modal. More content... setSideSheetVisible(false)} >

This is the content of a basic side sheet.

Here is more content...

不知道 AppKey?
} description={
你可先联系对应的研发同学,确认是否已在 应用云平台 申请了应用,并填写对应的信息。
} /> 不知道 AppKey? } description={
你可先联系对应的研发同学,确认是否已在 应用云平台 申请了应用,并填写对应的信息。
} /> 不知道 AppKey? } description={
你可先联系对应的研发同学,确认是否已在 应用云平台 申请了应用,并填写对应的信息。
} /> 不知道 AppKey? } description={
你可先联系对应的研发同学,确认是否已在 应用云平台 申请了应用,并填写对应的信息。
} /> h1. Semi Design h2. Semi Design h3. Semi Design h4. Semi Design h5. Semi Design h6. Semi Design
} darkModeImage={} description={'创建成功'} style={emptyStyle} /> } darkModeImage={} description={'加载失败'} style={emptyStyle} /> } darkModeImage={} description={'没有权限'} style={emptyStyle} /> } darkModeImage={} description={'暂无内容,请添加'} style={emptyStyle} /> } darkModeImage={} description={'页面404'} style={emptyStyle} /> } darkModeImage={} description={'搜索无结果'} style={emptyStyle} /> } darkModeImage={} description={'建设中'} style={emptyStyle} /> } darkModeImage={} description={'神游四方'} style={emptyStyle} />
审核中 发布成功 审核失败
UI

Semi UI

Hi, Bytedance dance dance.

Hi, Bytedance dance dance.

Hi, Bytedance dance dance.

setOverflowWidth(value)} />
console.log(v)} >
运营 开发 产品 设计 没有找到合适的业务线? } > Semi 轻颜相机 今日头条 } placeholder="搜索... " onSearch={handleStringSearch} style={style} /> admin user guest root 我已阅读并清楚相关规定(Checkbox) console.log(values, items)} /> (

{item.title}

), }, { key: '反馈数', value: item.feedbacks }, ]} />
)} />
Card Content Card Content Card Content Card Content Card Content

Hi, bytedance dance dance. This is the docsite of Semi UI.

Hi, bytedance dance dance. This is the docsite of Semi UI.

Hi, bytedance dance dance. This is the docsite of Semi UI.

文档 快速起步 帮助
  • Semi Design 以内容优先进行设计。

  • 更容易地自定义主题。

  • 适用国际化场景。

  • 效率场景加入人性化关怀。

document && document.querySelector('.semi-layout-content' || window)} visibilityHeight={-1} />
{`Copyright © ${(new Date()).getFullYear()} Semi Design. All Rights Reserved. `} 平台客服 反馈建议
); }