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. 【原创】大叔经验分享(6)Oozie如何查看提交到Yarn上的任务日志

    通过oozie job id可以查看流程详细信息,命令如下: oozie job -info 0012077-180830142722522-oozie-hado-W 流程详细信息如下: Job ID ...

  2. vs查找功能不显示查找结果

    今天打开vs,查找的时候发现查找结果窗口不出现了,导致看不到查找结果. 网上各种搜索,甚至看到不少说什么要重装vs的解决方案,我也是醉了...... 其实解决办法很简单啊 vs--窗口--重置窗口布局 ...

  3. vue-i18n国际化在data中切换不起作用

    vue-i18n是一个针对于vue的国际化插件,使用非常简单,具体使用方式看我细细道来. 实现方式 1. 下载包 npm install vue-i18n 2. 配置 在main.js文件中加入如下配 ...

  4. 九.LNMP网站架构实践部署

    期中集群架构-第九章-期中架构LNMP章节====================================================================== 01. LNMP ...

  5. C语言对字符串去重

    # include <stdio.h> # include <string.h> char * getNewChar(char * str,char * newStr); in ...

  6. [原创]基于Zynq Linux环境搭建(三)

    此篇编译Kernel 解压: [#17#17:26:56 FPGADeveloper@ubuntu ~/Zybo_Demo]$tar zxvf *.tar.gz 进入到文件kernel文件夹中,cle ...

  7. Codeforces 628F 最大流转最小割

    感觉和昨天写了的题一模一样... 这种题也能用hall定理取check, 感觉更最小割差不多. #include<bits/stdc++.h> #define LL long long # ...

  8. 4.基于梯度的攻击——MIM

    MIM攻击原论文地址——https://arxiv.org/pdf/1710.06081.pdf 1.MIM攻击的原理 MIM攻击全称是 Momentum Iterative Method,其实这也是 ...

  9. Spark SQL大数据处理并写入Elasticsearch

    SparkSQL(Spark用于处理结构化数据的模块) 通过SparkSQL导入的数据可以来自MySQL数据库.Json数据.Csv数据等,通过load这些数据可以对其做一系列计算 下面通过程序代码来 ...

  10. vitualbox中的centos7与主机共享文件

    我在vitualbox中安装了一个centos7,最小安装.主机是win10操作系统.那么如何在虚拟机和主机之间进行文件共享呢,下面是本人实现过程,以及过程中遇到的一些问题. 1.在主机中选择一个文件 ...