<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. [archlinux][plasma][screensaver] plasma5配置屏保程序,没成功(-_-#)

    plamsa用了好久,一直没有屏保.我想要玄酷的屏保! 用xscreensaver, 之前用FVWM2的时候,就用过了,很玄酷. 一,安装 pacman -S xscreensaver 二,配置 xs ...

  2. JAVA常用的异常处理情况

    从编程到现在,遇见过很多次程序崩的情况,好多时候都不知道怎么去解决才好,一般性解决就是百度或者问别人,但是每一次百度解决的下一次还是会遇见同样的问题,也没有系统的整理梳理过相关的处理异常的知识,再一次 ...

  3. java web filter读取classpath配置文件内容

    以下demo,从类路径classpath中获取venus.properties(本项目中用到的文件),思路是在初始化的时候读取,然后放在局部变量里面. package club.codeapes.we ...

  4. Verilog如何从外部更改模块内参数

    例如有一个模块 module x(a,b,c); input a,b; output c; 'd0, h=9'd3; ...... endmodule 两种解决方法: 1.使用带有参数值的模块实例语句 ...

  5. kvc原理

    KVC底层实现原理 第一步:寻找该属性有没有setsetter方法?有,就直接赋值 第二步:寻找有没有该属性带下划线的成员属性?有,就直接赋值 第三步:寻找有没有该属性的成员属性?有,就直接赋值 1. ...

  6. svn 部署 配置

    创建目录并配置 建立版本库目录 创建一个项目名叫wy 在/data/svndata/wy mkdir -p /data/svndata/wy 建立项目版本库 创建一个新的Subversion项目wy, ...

  7. what's the python之变量、基本数据类型

    what's the 变量? Python 中的变量赋值不需要类型声明. 变量在内存中创建,包括变量的标识,名称和数据. 变量在使用前都必须赋值,变量赋值以后该变量才会被创建. 等号(=)用来给变量赋 ...

  8. sap 调试工具,修改变量值

    1: 点击修改,输入变量值,按enter键.

  9. create genil component

    https://help.sap.com/viewer/79ef8b1636dd492d8fd430d2d309b90f/MDG92_SP01/en-US/16a5115454744a18e10000 ...

  10. Scala对class/object反射

    近期有需求,要根据解析字符串,根据字符串的内容去调用方法.想到的基本就是使用反射.但是基本上能找到的资料,全没有讲scala的反射.只有零星点点的讲解.大部分都是用scala的语法写java反射最后翻 ...