Mega Design UI for Vue
npm install @mega-design/ui-vue- [x] 依托Ant Design的交互语言和视觉风格。
- [x] 开箱即用的高质量 Vue 组件。
- [x] 基础与Ant Design of React/Vue设计工具体系。
- [ ] 自适应Vue版本(2.x, 3.x), 不需要手动指定版本
- 现代浏览器和 IE9 及以上(需要 polyfills)。
- 支持服务端渲染。
- Electron
``bash`
$ npm install @mega-design/ui-vue --save
`bash`
$ yarn add @mega-design/ui-vue
如果你的网络环境不佳,推荐使用 cnpm。
* 使用 babel-plugin-import(推荐)
`json5style: true
// .babelrc or babel-loader option
{
"plugins": [
["import", { "libraryName": "@mega-design/ui-vue", "libraryDirectory": "es", "style": "css" }] // 会加载 less 文件`
]
}
`
然后只需从 @mega-design/ui-vue 引入模块即可,无需单独引入样式。等同于下面手动引入的方式。
js`
// babel-plugin-import 会帮助你加载 JS 和 CSS
import { Button } from '@mega-design/ui-vue';
`
* 手动引入
js``
import Button from '@mega-design/lib/button'; // 加载 JS
import '@mega-design/lib/button/style/css'; // 加载 CSS
// import '@mega-design/lib/button/style'; // 加载 LESS
| Project | Description |
| --- | --- |
| vue-ref | 您可以使用回调来获取组件的引用,类似 react |