一:概述

1.中文文档

  https://mint-ui.github.io/#!/en

2.安装包

  

二:mt-button的使用

  主要是介绍css-component

1.程序

  在App.vue下面写

<template>
<div>
<h1>这是 App 组件</h1> <router-link to="/account">Account list</router-link>
<router-link to="/goodlist">Goodslist list</router-link>
<router-view></router-view> <br> <mt-button type="primary">primary</mt-button>
<mt-button type="default">default</mt-button>
<mt-button type="danger">danger</mt-button> <br> <mt-button size="small" type="primary">small</mt-button>
<mt-button size="large" type="danger">large</mt-button>
<mt-button size="normal" type="primary">normal</mt-button> <br> <mt-button disabled>disabled</mt-button> <br> <mt-button plain>plain</mt-button> <br> <mt-button icon="back">back</mt-button>
<mt-button icon="more">更多</mt-button> </div>
</template> <script>
</script> <style> </style>

  

2.效果

  

三:toast的使用

  主要是介绍js component

1.需求说明一下

  刷新进页面弹出提示框,然后等页面数据刷新结束之后,就自动关闭弹框

  包括弹框图标,以及变色

2.新建一个app.css

  用于图标变色

.mytoast i{
color: aqua !important;
}

  

3.使用bootstrap的图标

  所以,需要引用包。同时,将新建的css引入

  修改main.js如下:

// js的主要入口
console.log("ok") import Vue from 'vue' //引用vue-router,然后和vue产生关系
import VueRouter from 'vue-router'
Vue.use(VueRouter) //MintUI
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI) //bootstrap的样式
import 'bootstrap/dist/css/bootstrap.css' import './css/app.css' import app from './App.vue'
import router from './router.js'
var vm = new Vue({
el:'#app',
render:c=>c(app),
router
})

  

4.App.vue代码如下

<template>
<div>
<h1>这是 App 组件</h1> <router-link to="/account">Account list</router-link>
<router-link to="/goodlist">Goodslist list</router-link>
<router-view></router-view> <br> <mt-button type="primary" @click="show">primary</mt-button>
<mt-button type="default">default</mt-button>
<mt-button type="danger">danger</mt-button> <br> <mt-button size="small" type="primary">small</mt-button>
<mt-button size="large" type="danger">large</mt-button>
<mt-button size="normal" type="primary">normal</mt-button> <br> <mt-button disabled>disabled</mt-button> <br> <mt-button plain>plain</mt-button> <br> <mt-button icon="back">back</mt-button>
<mt-button icon="more">更多</mt-button> </div>
</template> <script>
import {Toast} from 'mint-ui';
export default {
data(){
return {
toastTnstance:null
};
},
created(){
this.getList();
},
methods:{
//模拟获取样表的方法
getList(){
this.show();
setTimeout(() => {
this.toastTnstance.close();
}, 2000);
},
show(){
this.toastTnstance=Toast({
message: 'Upload Complete',
position: 'bottom',
duration: -1,
iconClass: 'glyphicon glyphicon-king', //图标
className:'mytoast' //自定义toast样式
});
} }
}
</script> <style> </style>

  

5.效果

  

四:按需导入

1.导包

  

2.在.babelrc中修改

  

3.引入需要的组件

  main.js

// js的主要入口
console.log("ok") import Vue from 'vue' //引用vue-router,然后和vue产生关系
import VueRouter from 'vue-router'
Vue.use(VueRouter) //MintUI,这种是全部导入
// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'
// Vue.use(MintUI) //按需导入
import {Button} from 'mint-ui'
Vue.component(Button.name,Button) //bootstrap的样式
import 'bootstrap/dist/css/bootstrap.css' import './css/app.css' import app from './App.vue'
import router from './router.js'
var vm = new Vue({
el:'#app',
render:c=>c(app),
router
})

  

013 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. Go语言入门——函数

    写了快一个月的Go,已经没有什么陌生感了. 一行代码写完,不会在行尾本能的敲上“:”,直接Enter键换行: 定义变量把变量名放在前面,类型放在后面: 使用struct去定义自己想要的数据模型就好比定 ...

  2. maven引入oracle驱动

    下载驱动: https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html 例如我这边是1 ...

  3. Spring框架的AOP编程,最通俗的语言解释,易懂易学

    第七章:AOP技术 前言: AOP技术是根据动态代理设计模式进行的技术.动态代理技术分jdk动态代理和cglib动态代理 jdk动态代理特点: (1)继承java.lang.reflect.proxy ...

  4. Mac OS 查看端口和杀死进程

    查看sudo lsof -i:port (端口号) sudo lsof -i:9501 COMMAND PID USER FD TYPE DEVICESIZE/OFF NODE NAME php 77 ...

  5. virt-install创建虚拟机并制作成模板

    一.使用virt-install创建新的虚拟机 virt--template --ram --vcpu= --virt-type kvm --cdrom=/Data/kvm/iso/CentOS-.i ...

  6. 论文笔记系列-Auto-DeepLab:Hierarchical Neural Architecture Search for Semantic Image Segmentation

    Pytorch实现代码:https://github.com/MenghaoGuo/AutoDeeplab 创新点 cell-level and network-level search 以往的NAS ...

  7. 项目Beta冲刺(团队)——05.25(3/7)

    项目Beta冲刺(团队)--05.25(3/7) 格式描述 课程名称:软件工程1916|W(福州大学) 作业要求:项目Beta冲刺(团队) 团队名称:为了交项目干杯 作业目标:记录Beta敏捷冲刺第3 ...

  8. xargs的用法

    处理带有空格的文件名 #我们创建了3个日志文件, 且故意让文件名称中都含有空格 [roc@roclinux ~]$ ;i<;i++)); do touch "test ${i}.log ...

  9. Java中对象的比较(学习笔记)

    1)详细说明对象的比较方式有哪些? ①对象引用的比较("= ="运算符) "= ="是将对象的引用进行比较,实质是比较两个引用变量是否引用同一个对象.注意的点: ...

  10. hook杂思-面向函数编程

    hook:方法拦截 以函数单元为编程对象: 在编译时或运行时进行函数单元的替代.修改.功能添加操作: 所有的操作都不是在原始编码时完成的: 函数单元作为参量.操作对象.编码对象存在于机制中: 机制: ...