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 ...
随机推荐
- 解决在页面中无法获取qrcode.js生成的base64的图片
应用场景 生成带二维码的推广海报图片 旧方法: 将用户自己的推广连接先通过qrcode.js生成二维码,然后再用后台返回的一张背景图片和二维码通过canvas绘制成一张海报. 问题 在部分安卓手机上获 ...
- 神舟笔记本Hasee安装Ubuntu Desktop和Gnome
目录 1. 安装Ubuntu-desktop 2. 解决hasee T97 WiFi.声音输入输出.无法关机问题 3. 更新grub启动引导 4. 安装缺失的驱动(否则4.15内核无法进入桌面) 5. ...
- XSS简单练习
xss平台: https://xss.haozi.me题解: https://blog.csdn.net/AlexYoung28/article/details/82315538 对在xss.haoz ...
- MoveIt简单编程
目的:使用一些简单代码使机器人运动到指定位置.讲解代码怎么实现机器人的运动. 参考文献: 第一个博客需要下载<Mastering ROS for robotics Programming> ...
- python基础语法11 内置模块time,datatime,random,os,sys,hashlib模块
time模块 在python的三种时间表现形式: 1.时间戳: 给电脑看的. - 自1970-01-01 00:00:00到当前时间,按秒计算,计算了多少秒. 2.格式化时间(Format Strin ...
- python基础语法2 流程控制 if,while,for
if语句: 什么是if? 主要是用于判断事物得对错,真假,是否可行 语法结构: python是通过缩进来决定代码的归属 pep8: 缩进一定是四个空格 tab键 if 条件: 代码块 .... ... ...
- CF379C-New Year Ratings Change
https://www.luogu.org/problemnew/show/CF379C 一道水题,折腾了我好久! 解题: 先排序,从小到大挨个满足客户,把最终rating放进集合里,判断是否已经给出 ...
- ID 迭代加深搜索 模板 埃及分数
#include <bits/stdc++.h> using namespace std; #define LL long long int Maxd; LL Ans[10], now[1 ...
- 03_vlan & access & trunk 口(数通华为)
1. 网络拓扑: 2. SW1配置: 2.1 关闭设备调试信息:<Huawei>undo terminal monitor <Huawei>undo terminal debu ...
- [PHP] Laravel 5.5 的 BCrypt对密码进行加密及密码验证
Laravel 5.5 的 BCrypt对密码进行加密及密码验证 一.加密 方法1) $password= Hash::make('密码'); 方法2) /也可直接使用 bcrypt 的 functi ...