npm install yonui-ys -S
import { Button } from 'yonui-ys';
import 'yonui/lib/theme/index.less';
...
ReactDOM.render(
<div>
<Button type="primary">Primary</Button>
<Button>Default</Button>
<Button type="dashed">Dashed</Button>
<Button type="danger">Danger</Button>
</div>
, mountNode);
使用CDN的方式使用,页面加载yonui-ys/dist/index.css
和 yonui-ys/dist/index.js
后,设置
// 构建排除指定包
externals: {
"yonui-ys": "YonuiYs"
}
-
SvgIcon
目前需要单独引入,参考这里 - 样式引入改为
import 'yonui/lib/theme/tinper.less
- 新增以下配置文件,即可兼容
export {
Affix,
Anchor,
AutoComplete,
Badge,
CarouselFigure,
Col,
Con,
Checkbox,
Card,
Collapse,
Cascader,
Calendar,
Dropdown,
DatePicker,
Grid,
Form,
Locale,
Input,
InputNumber,
Menu,
Notification,
Popconfirm,
Popover,
Pagination,
Progress,
Radio,
Row,
Switch,
Select,
Slider,
Steps,
Tag,
Tabs,
TimePicker,
Tree,
TreeSelect,
Transfer,
Upload,
Tooltip,
ProgressBar,
Timeline,
Panel,
Loading,
Message,
ButtonGroup,
Label,
SearchPanel,
Tile,
FormControl,
PageLayout,
Clipboard,
ColorPicker,
LoadingState,
Viewer,
Breadcrumb,
Navbar,
Backtop,
Alert,
Drawer,
InputGroup,
FormGroup,
Rate,
Table,
BeeModal as Modal,
BeeIcon as Icon,
BeeCheckbox as Checkbox,
BeeRadio as Radio,
BeeCollapse as Collapse,
BeeLoading as Loading,
BeeButton as Button,
BeePopconfirm as Popconfirm,
BeeTabs as Tabs
} from 'yonui-ys';