mint-ui Picker的使用
<template>
<div v-bind:style="{minHeight:clientHeight + 'px'}" id="recive-min-body">
<mt-header title="我的赞">
<mt-button icon="back" slot="left" @click.native="goBack">返回</mt-button>
</mt-header>
<form>
<h3 class="recive-min-input">请填写以下信息:</h3>
<mt-field label="你要点赞给" placeholder="巩一杰" @click.native="handleClick"></mt-field>
<!-- <mt-field label="使用数量" placeholder="1张"></mt-field> -->
<mt-popup
v-model="popupVisible"
position="bottom"
modal=false>
<mt-picker v-bind:style="{width:clientWidth + 'px',padding: 20 + 'px'}" :slots="slots" @change="onValuesChange"></mt-picker>
</mt-popup>
<mt-field label="点赞理由" placeholder="点赞理由要规范" type="textarea" rows="4"></mt-field>
<div class="recive-buttonBox">
<mt-button type="primary" class="recive-button" @click.native="reciveTestSubmit">确定</mt-button>
</div>
</form>
</div>
</template>
<style scoped>
#recive-min-body {
background-color: #f5f5f5;
}
.picker-item {
padding: 30px;
}
.recive-min-input {
margin-top: 10px;
}
form h3 {
margin: 0;
padding: 10px !important;
font-weight: normal;
font-size: 15px;
}
.recive-buttonBox {
margin: 0 20px;
}
.recive-button {
width: 100%;
border-radius: 7px;
margin-top: 20px;
}
</style>
<script>
export default {
data () {
return {
clientWidth: document.documentElement.clientWidth,
clientHeight: document.documentElement.clientHeight,
popupVisible:false,
slots:
[
{
flex: 1,
values: ['大一', '大二', '大三'],
className: 'slot1',
textAlign: 'left'
}, {
divider: true,
content: '-',
className: 'slot2'
}, {
flex: 1,
values: ['1', '2', '3'],
className: 'slot3',
textAlign: 'right'
}
],
ids: ""
}
},
watch: {
values:function(val,oldval){
console.log(val,oldval);
}
},
methods:{
goBack: function() {
this.$router.push({ path: '/home/mine' });
},
handleClick: function() {
this.popupVisible = true;
},
onValuesChange(picker, values) {
if (values[0]=='大一') {
picker.setSlotValues(1, ['1','2','3']);
}else if (values[0]=='大二') {
picker.setSlotValues(1, ['a','b','c']);
}else if (values[0]=='大三') {
picker.setSlotValues(1, ['4','5','6']);
};
}
},
mounted(){
// this.ids = filters.ytox(this.$route.params.ids)
}
}
</script>
效果图:


mint-ui Picker的使用的更多相关文章
- 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, ...
- vuetify,vux,Mint UI 等框架的选择
vuetify: https://vuetifyjs.com/zh-Hans/getting-started/quick-start NutUI:https://github.com/jdf2e/nu ...
随机推荐
- B. Salty Fish Go! -期望题(瞎搞题)
链接:https://www.nowcoder.com/acm/contest/104/B来源:牛客网 题意:A few days ago, WRD was playing a small game ...
- python selenium配置
写该博客时环境 mac 10.14.1 (18B75) python 3.7 pip (不用这个就是了,用pip3) $ pip --version pip 10.0.1 from /Users/wj ...
- Dotnetbar中如何让LabelX自动换行
把LableX标签控件的WordWrap属性设置为true. https://zhidao.baidu.com/question/207858423.html 另外lable控件可以设置AutoSiz ...
- 看数据库的文件大小 MySQL Binlog日志的生成和清理规则
小结: 1.避免并行大大事务对磁盘.内存的消耗: MySQL数据文件导致实例空间满的解决办法_空间/内存_常见问题_云数据库 RDS 版-阿里云 https://help.aliyun.com/kno ...
- [daily][grub2] grub2修改内核选项
以前, 我们就直接去修改 /boot/grub/grub.cfg 文件了. 其实这并不正确. 正确的做法是: 1. 修改 /etc/default/grub 文件. [root@dpdk ~]# c ...
- 玩具装箱&土地购买
今天一天8h 写了两道斜率优化的题(别问我效率为什么这么低 代码bug太多了) 关键是思考的不周全 估计是写的题少手生 以后就会熟练起来了吧. 这道题显然有一个n^2的dp方程 设f[i]表示前i件物 ...
- 树和二叉树->最优二叉树
文字描述 结点的路径长度 从树中一个结点到另一个结点之间的分支构成这两个结点之间的路径,路径上的分支数目称作路径长度. 树的路径长度 从树根到每一个结点的路径长度之和叫树的路径长度. 结点的带权路径长 ...
- maven如何将本地jar安装到本地仓库
1.首先确认你的maven是否已经配置: 指令:mvn -v 2.本地的jar包位置: 3.在自己项目pom.xml中添加jar依赖: <dependency> <groupId&g ...
- Entity Framework中IQueryable, IEnumerable, IList的区别(转载)
原文:http://www.cnblogs.com/hiteddy/archive/2011/10/01/Difference_among_IQueryable_IEnumeralb_IList_in ...
- 内核block机制
内核版本:linux2.6.22.6 硬件平台:JZ2440 驱动源码 block_ipc_poll_key_int_drv.c : #include <linux/module.h> # ...