1.安装: npm install mint-ui --save

    npm install babel-plugin-component --save-dev //(只引入部分组件时需要安装)

2.导入项目中

  (1).直接引入整个项目

//main.js文件
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css' Vue.use(MintUI)

  (2).按组件引入

//main文件

import 'mint-ui/lib/style.css';   //官方文档上没有引入CSS文件,可是我没有引入时组件不生效
import { Swipe, SwipeItem, Badge, Header, Button } from 'mint-ui'; Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Badge.name, Badge);
Vue.component(Header.name, Header);
Vue.component(Button.name, Button);

3.在vue模块中直接引入某些模块的方式

//.vue文件
<script>
import { Indicator, Toast, MessageBox } from "mint-ui";
...
</script>

4.一些注意点

  import {MessageBox} from 'mint-ui'
  MessageBox.confirm('', '', {
    message: '继续发布?',
title: '提示',
confirmButtonText: '继续编辑',
cancelButtonText: '确认取消'
}).then(action => {}, action => {}) MessageBox.prompt(message, title, {option}); //下面是源码
MessageBox.alert = function(message, title, options) {
if (typeof title === 'object') {
options = title;
title = '';
}
return MessageBox(merge({
title: title,
message: message,
$type: 'alert',
closeOnPressEscape: false,
closeOnClickModal: false
}, options));
};
MessageBox.confirm = function(message, title, options) {
if (typeof title === 'object') {
options = title;
title = '';
}
return MessageBox(merge({
title: title,
message: message,
$type: 'confirm',
showCancelButton: true
}, options));
};
MessageBox.prompt = function(message, title, options) {
if (typeof title === 'object') {
options = title;
title = '';
}
return MessageBox(merge({
title: title,
message: message,
showCancelButton: true,
showInput: true,
$type: 'prompt'
}, options));
};
 

  

mint-ui笔记的更多相关文章

  1. vue mint UI

    vue 与mint  UI 结合开发手机app  html5页面 api  文档   http://mint-ui.github.io/#!/zh-cn

  2. 基于VUE.JS的移动端框架Mint UI

    Mint UI GitHub:github.com/ElemeFE/mint 项目主页:mint-ui.github.io/# Demo:elemefe.github.io/mint- 文档:mint ...

  3. vue mint ui 手册文档对于墙的恐惧

    http://www.cnblogs.com/smallteeth/p/6901610.html npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm ...

  4. Mint UI文档

    Mint UI文档:http://elemefe.github.io/mint-ui/#/ 一.Mint UI的安装和基本用法. 1.NPM :npm i mint-ui -S 建议使用npm进行安装 ...

  5. 新建一个基于vue.js+Mint UI的项目

    上篇文章里面讲到如何新建一个基于vue,js的项目(详细文章请戳用Vue创建一个新的项目). 该项目如果需要组件等都需要自己去写,今天就学习一下如何新建一个基于vue.js+Mint UI的项目,直接 ...

  6. iView webapp / Mint UI / MUI [前端UI]

    前端UI iView webapp一套高质量的 微信小程序 UI 组件库 https://weapp.iviewui.com/?from=iview Mint UI 基于 Vue.js 的移动端组件库 ...

  7. Mint UI 使用指南

    上来直接在webpack里将Mint UI引入项目,发现各种问题.饿了么组件库文档太坑了,好多地方写错,有些该说明的地方没说,比如例子里单文件.vue组件里用的类post-css处理器,我一直使用SA ...

  8. Mint UI Example的运行

    Mint -UI是新推出的移动端UI框架 官网 不过官网上的文档例子不是很全面. 建议下载他们提供的example来学习. 1.examplle源码下载地址 2.打开项目,我这里使用webstorm, ...

  9. vuetify,vux,Mint UI 等框架的选择

    vuetify: https://vuetifyjs.com/zh-Hans/getting-started/quick-start NutUI:https://github.com/jdf2e/nu ...

  10. Vue移动组件库Mint UI的安装与使用

    一.什么是 Mint UI 1.Mint UI 包含丰富的 CSS 和 JS 组件,可以提升移动端开发效率 2.Mint UI 按需加载组件 3.Mint UI 轻量化 二.Mint UI 的安装 1 ...

随机推荐

  1. Mysql 常用SQL语句集锦

    基础篇 //查询时间,友好提示 $sql = "select date_format(create_time, '%Y-%m-%d') as day from table_name" ...

  2. js通过高德地图获取当前位置的经度纬度

    效果图如下: 已经获取到了经度纬度了 代码如下: <!doctype html> <html> <head> <meta charset="utf- ...

  3. Diango 框架起步

    一.命令行搭建Django项目 安装django # 在指定解释器环境下安装django 1.11.9# 在真实python3环境下: pip3 install django==1.11.9# 在虚拟 ...

  4. Linux /etc/sudoers 文件详解

    [root@test ~]# cat /etc/sudoers## Sudoers allows particular users to run various commands as## the r ...

  5. VMware虚拟机安装Linux系统后IP配置(二)

    1.在NAT模式下自动获取IP 2.编辑网卡配置文件(通用) 3.Ctrl+L 清屏.重启网络服务后检查网络是否正常上网 修改后本机IP地址在linux中ping通本机IP 然而在本机却ping不通l ...

  6. ansible的Filter

    filter的格式:   value..| filter() 在python中就是类的实例化 filter(self,*args,**kwargs) self就是filter中管道符前的value. ...

  7. sql修改一个字段多个值

    UPDATE 表名 SET 修改的字段=REPLACE(修改的字段,'修改的值','新值');

  8. (一)主域相同子域不同之document.domain跨域

    一.什么是主域名,什么是子域名? 主域名又称一级域名或者顶级域名,由域名主体.域名后缀组成,比如cnblogs.com : 子域名有二级域名,比如www.cnblogs.com.三级域名,比如home ...

  9. PostgreSQL自学笔记:3 数据库的基本操作

    3 数据库的基本操作 3.1 创建数据库 3.1.1 使用对象浏览器创建数据库 [Server] -> PostgreSQL 9.6 -> 数据库,右击 -> 创建 通常: 数据库: ...

  10. BZOJ.4598.[SDOI2016]模式字符串(点分治 Hash)

    LOJ BZOJ 洛谷 点分治.考虑如何计算过\(rt\)的答案. 记\(pre[i]\)表示(之前的)子树内循环匹配了\(S\)的前缀\(i\)的路径有多少,\(suf[i]\)表示(之前的)子树内 ...