013 mint-ui
一:概述
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的更多相关文章
- vue  mint UI
		vue 与mint UI 结合开发手机app html5页面 api 文档 http://mint-ui.github.io/#!/zh-cn 
- 基于VUE.JS的移动端框架Mint UI
		Mint UI GitHub:github.com/ElemeFE/mint 项目主页:mint-ui.github.io/# Demo:elemefe.github.io/mint- 文档:mint ... 
- vue mint ui 手册文档对于墙的恐惧
		http://www.cnblogs.com/smallteeth/p/6901610.html npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm ... 
- Mint UI文档
		Mint UI文档:http://elemefe.github.io/mint-ui/#/ 一.Mint UI的安装和基本用法. 1.NPM :npm i mint-ui -S 建议使用npm进行安装 ... 
- 新建一个基于vue.js+Mint UI的项目
		上篇文章里面讲到如何新建一个基于vue,js的项目(详细文章请戳用Vue创建一个新的项目). 该项目如果需要组件等都需要自己去写,今天就学习一下如何新建一个基于vue.js+Mint UI的项目,直接 ... 
- iView webapp / Mint UI / MUI  [前端UI]
		前端UI iView webapp一套高质量的 微信小程序 UI 组件库 https://weapp.iviewui.com/?from=iview Mint UI 基于 Vue.js 的移动端组件库 ... 
- Mint UI 使用指南
		上来直接在webpack里将Mint UI引入项目,发现各种问题.饿了么组件库文档太坑了,好多地方写错,有些该说明的地方没说,比如例子里单文件.vue组件里用的类post-css处理器,我一直使用SA ... 
- Mint UI Example的运行
		Mint -UI是新推出的移动端UI框架 官网 不过官网上的文档例子不是很全面. 建议下载他们提供的example来学习. 1.examplle源码下载地址 2.打开项目,我这里使用webstorm, ... 
- vuetify,vux,Mint UI 等框架的选择
		vuetify: https://vuetifyjs.com/zh-Hans/getting-started/quick-start NutUI:https://github.com/jdf2e/nu ... 
- Vue移动组件库Mint UI的安装与使用
		一.什么是 Mint UI 1.Mint UI 包含丰富的 CSS 和 JS 组件,可以提升移动端开发效率 2.Mint UI 按需加载组件 3.Mint UI 轻量化 二.Mint UI 的安装 1 ... 
随机推荐
- windows上搭建NFS服务器及客户端 挂载
			在Windows相关系统上搭建NFS服务及客户端挂载 有两种方式: 第一种: (Windows Server2008R2等类似企业版这样的版本的Server服务上有自带的NFS服务进行搭建) (特别 ... 
- Jmeter 使用集合点
			概念解释 集合点,这个概念是loadrunner中的. 这个东西可以这样理解,比如我们在跑100起跑的时候,需要在发令枪响之后,10人同时起步,等10人同时达到终点, 再次开发令枪,重复上面的动作. ... 
- 将java的jar包作为windows的服务来启动
			1.在idea中用maven将程序打成jar,放到运行的目录中. 2.去github上面下载winsw: https://github.com/kohsuke/winsw/releases 3. 将W ... 
- Python调用百度接口(情感倾向分析)和讯飞接口(语音识别、关键词提取)处理音频文件
			本示例的过程是: 1. 音频转文本 2. 利用文本获取情感倾向分析结果 3. 利用文本获取关键词提取 首先是讯飞的语音识别模块.在这里可以找到非实时语音转写的相关文档以及 Python 示例.我略作了 ... 
- php单例型(singleton pattern)
			搞定,吃饭 <?php /* The purpose of singleton pattern is to restrict instantiation of class to a single ... 
- 玩转Spring--消失的事务@Transactional
			消失的事务 端午节前,组内在讨论一个问题: 一个没有加@Transactional注解的方法,去调用一个加了@Transactional的方法,会不会产生事务? 文字苍白,还是用代码说话. 先写一个@ ... 
- MSAA简介
			https://www.cnblogs.com/gnagwang/archive/2010/04/20/1716006.html MSAA的全称是Microsoft Active Accessibil ... 
- jsp  request对象
			getParameter( ) :返回name指定参数的参数值 String[] getParameterValues(String name) :返回包含参数name的所有值的数值 getA ... 
- Tasking
			Put your plan on the tick list, and set the completion time limit, daily repetition, etc. according ... 
- MATLAB画图笔记
			plot函数 plot(x,y)默认格式: 若x,y是向量,则它们必须具有相同的长度.函数将以x为横轴,绘制y. 若x,y都是矩阵,则它们必须具有相同的尺寸,plot函数将针对x的各列绘制y的每列.更 ... 
