mint-ui之Swipe使用
<template>
<div>
<div class="swipe-wrapper">
<mt-swipe :auto="1000" ref="swipeWrapper">
<mt-swipe-item class="swip-item-1 item">1</mt-swipe-item>
<mt-swipe-item class="swip-item-2 item">2</mt-swipe-item>
<mt-swipe-item class="swip-item-3 item">3</mt-swipe-item>
</mt-swipe>
</div>
<div class="button-wrapper">
<button class="prev-button flex-item" @click="prev">prev</button>
<button class="next-button flex-item" @click="next">next</button>
</div>
</div>
</template> <script>
export default {
data() {
return {};
},
methods: {
prev: function() {
this.$refs.swipeWrapper.prev();
console.log(this.$children);
},
next: function() {
this.$refs.swipeWrapper.next();
}
}
};
</script> <style>
.swipe-wrapper {
width: 100%;
height: 300px;
} .swip-item-1 {
background: red;
} .swip-item-2 {
background: blue;
} .swip-item-3 {
background: green;
} .item {
text-align: center;
font-size: 40px;
color: white;
} .button-wrapper {
display: flex;
height: 100px;
} .flex-item {
flex: 1;
display: inline-block;
text-align: center;
height: 100%;
line-height: 100%;
font-size: 40px;
} .prev-button {
background: darkorange;
} .next-button {
background: green;
}
</style>

mint-ui之Swipe使用的更多相关文章
- Mint UI 之 Swipe 组件
#为什么不显示内容? 一定要指定 mt-swipe 元素的宽和高. <mt-swipe :auto="4000" class="swipe"> &l ...
- vue mint ui 手册文档对于墙的恐惧
http://www.cnblogs.com/smallteeth/p/6901610.html npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm ...
- vue mint ui 手册文档
npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm i mint-ui -S CDN 目前可以通过 unpkg.com/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 ...
- 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, ...
随机推荐
- sql server相关
sql server nolock 在sqlserver 中with(nolock)详解 所有Select加 With (NoLock)解决阻塞死锁 在查询语句中使用 NOLOCK 和 READP ...
- jquery dataTables例子
https://datatables.net/examples/styling/bootstrap.html http://datatables.club/example/#styling http: ...
- iOS 正则表达式(一)
在iOS开发中,正则一直是最常用的,但也是一直记不住的,现在做一些简单的总结 我们在网上找的正则,要有'\',这个在iOS是转义符,需要'\\'这样 int main(int argc, const ...
- mybatis之接口绑定
接口绑定方案 mybatis中,提供了一套接口绑定方案,程序员可以提供一个接口,然后提供对应接口的一个mapper.xml文件.MyBatis会自动将接口和xml文件进行绑定.实际上就是mybatis ...
- MyBatis基础入门《四》接口方式.Select查询集合
MyBatis基础入门<四>接口方式.Select查询集合 描述: 在<MyBatis基础入门<二>Select查询>中有说过,SQLSession有两种用法,这里 ...
- 关于 LD_LIBRARY_PATH 这个环境变量
这个变量中可以保存linux寻找库时搜索的路径,按照一篇文章中的介绍,不应该设置这个变量.文章的重点如下: 1. 不要设置这个变量. 2. Solaris中,在编译时,使用 -L 选项指定编译时库的搜 ...
- [Unit Test] Unit Test Brief Introduction
Levels of Testing- Acceptance- Performance- Functional- Integration- Unit Why Unit Testing- Feedback ...
- 9.if/else/elif
简单的条件是通过使用 if/else/elif 语法创建的.条件的括号是允许的,但不是必需的.考虑到基于表的缩进的性质,可以使用 elif 而不是 else/if 来维持缩进的级别. if [expr ...
- BR(BoomerangRobot)机器人项目
项目宗旨:推动机器人技术及相关知识的普及,增进广大机器人DIYer们的交流,提高爱好者们自身的专业水平,项目提供以机器人BR(boomerangrobot)为硬件平台,ROS(robot operat ...
- IIS8无法通过IP访问解决办法
今天配置在Windows server 2012 R2 上配置IIS8时,出现局域网内无法使用IP访问站点的问题,查找资料依然无法解决.最后发现IIS8配置好主机名后无法使用主机IP访问站点,只能使用 ...