<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的使用的更多相关文章

  1. vue mint ui 手册文档对于墙的恐惧

    http://www.cnblogs.com/smallteeth/p/6901610.html npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm ...

  2. vue mint ui 手册文档

    npm 安装 推荐使用 npm 的方式安装,它能更好地和 webpack 打包工具配合使用. npm i mint-ui -S CDN 目前可以通过 unpkg.com/mint-ui 获取到最新版本 ...

  3. vue mint UI

    vue 与mint  UI 结合开发手机app  html5页面 api  文档   http://mint-ui.github.io/#!/zh-cn

  4. 基于VUE.JS的移动端框架Mint UI

    Mint UI GitHub:github.com/ElemeFE/mint 项目主页:mint-ui.github.io/# Demo:elemefe.github.io/mint- 文档:mint ...

  5. Mint UI文档

    Mint UI文档:http://elemefe.github.io/mint-ui/#/ 一.Mint UI的安装和基本用法. 1.NPM :npm i mint-ui -S 建议使用npm进行安装 ...

  6. 新建一个基于vue.js+Mint UI的项目

    上篇文章里面讲到如何新建一个基于vue,js的项目(详细文章请戳用Vue创建一个新的项目). 该项目如果需要组件等都需要自己去写,今天就学习一下如何新建一个基于vue.js+Mint UI的项目,直接 ...

  7. iView webapp / Mint UI / MUI [前端UI]

    前端UI iView webapp一套高质量的 微信小程序 UI 组件库 https://weapp.iviewui.com/?from=iview Mint UI 基于 Vue.js 的移动端组件库 ...

  8. Mint UI 使用指南

    上来直接在webpack里将Mint UI引入项目,发现各种问题.饿了么组件库文档太坑了,好多地方写错,有些该说明的地方没说,比如例子里单文件.vue组件里用的类post-css处理器,我一直使用SA ...

  9. Mint UI Example的运行

    Mint -UI是新推出的移动端UI框架 官网 不过官网上的文档例子不是很全面. 建议下载他们提供的example来学习. 1.examplle源码下载地址 2.打开项目,我这里使用webstorm, ...

  10. vuetify,vux,Mint UI 等框架的选择

    vuetify: https://vuetifyjs.com/zh-Hans/getting-started/quick-start NutUI:https://github.com/jdf2e/nu ...

随机推荐

  1. Yarn && npm设置镜像源

    安装yarn npm i -g yarn yarn yarn config set registry https://registry.npm.taobao.org --global yarn con ...

  2. javascript中call、apply、bind详解

    1.apply和call的区别在哪里 2.什么情况下用apply,什么情况下用call 3.apply的其他巧妙用法(一般在什么情况下可以使用apply) 我首先从网上查到关于apply和call的定 ...

  3. 字母算术的python算法

    据说Google出过一道题目:WWWDOT – GOOGLE = DOTCOM. 其中每个字母代表一个数字,数字不能重复,而且最高位的数字不能为0. 像这样的谜题被称为cryptarithms或者字母 ...

  4. set,env,export,set -x,set -e;

    set 用来显示本地变量 env 用来显示环境变量 export 用来显示和设置环境变量 set 显示当前shell的变量,包括当前用户的变量 env 显示当前用户的变量 export 显示当前导出成 ...

  5. 使用PrintDBGridEh进行打印 (转)

    使用PrintDBGridEh进行打印 (转)   if not ADOQuery1.Active then exit;  if ADOQuery1.RecordCount<=0 then ex ...

  6. AT3611 Tree MST 点分治+最小生成树

    正解:点分治+最小生成树 解题报告: 传送门! 然后这题麻油翻译,,,所以这边的建议是先说下题意呢亲 所以题意大概就是说,给一棵n个节点的树,树上每个点都有个权值,然后构造一个完全图,(u,v)之间连 ...

  7. oracle中,将两个select语句的结果作为一个整体显示出来

    如果我们需要将两个select语句的结果作为一个整体显示出来,我们就需要用到union或者union all关键字.union(或称为联合)的作用是将多个结果合并在一起显示出来.union和union ...

  8. tomcat 的acceptCount、acceptorThreadCount、maxConnections、maxThreads 如何确定

    acceptCount 连接在被ServerSocketChannel accept之前就暂存在这个队列中,acceptCount就是这个队列的最大长度. ServerSocketChannel ac ...

  9. 设置帝国cms文章标题 真正符合百度建站标准

    百度建站指南中有提到内容页的标题设置,标题描述清晰最好包含主站和频道信息:内容标题_频道名称_网站名称.帝国cms文章标题一般默认是内容标题_网站名称,那么如何调用当前文章的频道名称(分类名称)呢? ...

  10. MySQL 创建用户并分配用户权限

    mysql在最新的版本中会生成随机密码,存储在/etc/my.conf的文件中,但是大多数使用者不会在意这个,因为随机的密码识别性太差,所以我们可以自己配置数据库用户以及设置密码. 设置跳过密码登陆r ...