Mint-UI是一款基于Vue的移动UI组件库,在Vue的项目中可以使用它自定义的组件来实现需求。
不过遗憾的是,这个UI框架已经一年多没有更新了,官网也挂了,不过好在腾讯云上还有相关的开发文档https://cloud.tencent.com/developer/section/1489979
1、安装
Miny-UI是在Vue项目中使用的,在webpack下安装:
cnpm i mint-ui -S
2、使用
使用也非常的简单:
全部导入(体积非常大,不推荐):
-
引入全部组件:import MintUi from 'mint-ui' ---引入全部组件,import {button,cell} from 'mint-ui'
-
引入相关的样式文件:import from 'mint-ui/lib/style.css'
-
注册相关组件:vue.use(MintUi)
-
按照需要的内容去查文档直接用就好了
按需导入(推荐):
-
安装babel-plugin-
-
引入所需要的组件,使用import {Button} from 'mint-ui'
-
修改.babelrc中的plugin:[
["component", [
{
"libraryName": "mint-ui",
"style": true
}
]]]
-
注册相关的组件:Vue.component(Button.name,Button),其中的Button.name默认值为my-button,可以修改成。
-
按照文档直接使用
-