利用单选框的单选特性作tab切换
<RadioGroup v-model="selectType" type="button" @onchange="selectTypeChange">
<Radio label="全部"></Radio>
<Radio label="图文"></Radio>
<Radio label="文件"></Radio>
<Radio label="视频"></Radio>
</RadioGroup>
通过点击变化的钩子函数进行匹配
selectTypeChange(val) {
console.log(val)
let _this = this;
switch(val)
{
case "全部":
_this.init(_this.searchText,_this.active,_this.currentState, _this.chooseDate[0], _this.chooseDate[1], '','',1)
_this.selectType = '全部'
break;
case "图文": _this.init(_this.searchText,_this.active,_this.currentState, _this.chooseDate[0], _this.chooseDate[1], '05','00',1)
_this.selectType = '图文'
_this.st = '05'
break;
case "文件":
_this.init(_this.searchText, _this.active, _this.currentState, _this.chooseDate[0], _this.chooseDate[1], '10','00',1)
_this.selectType = '文件'
_this.st = '10'
break;
case "视频":
_this.init(_this.searchText, _this.active, _this.currentState, _this.chooseDate[0], _this.chooseDate[1], '15','00',1)
_this.selectType = '视频'
_this.st = '15'
break;
default:
}
},
利用单选框的单选特性作tab切换的更多相关文章
- Vue 单选框与单选框组 组件
radio组件 v-model : 通过当然绑定的值与input上的value值来确定当前选中项. 在父作用域中通过active设置当前默认选中项,如果选中项发生改变后通过input事件通知传递到父 ...
- JS中获取页面单选框radio和复选框checkbox中当前选中的值
单选框:单选框的name值全部相同 页面有一组单选框的元素<td><input type="radio name="radioid">满意< ...
- 【六】jquery之HTML代码/文本/值[下拉列表框、多选框、单选框的选中]
val()方法不仅能设置元素的值,同时也能获取元素的值.另外,val()方法还有另外一个用处,就是它能使select(下拉列表框).checkbox(多选框)和radio(单选框)相应的选项被选中,在 ...
- 使用jQuery为文本框、单选框、多选框、下拉框、下拉多选框设值及返回值的处理
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...
- JS基础入门篇(四)—this的使用,模拟单选框,选项卡和复选框
1.this的使用 this js中的关键字 js内部已经定义好了,可以不声明 直接使用 this的指向问题 1. 在函数外部使用 this指向的是window 2. 在函数内部使用 有名函数 直接调 ...
- 一款兼容pc 移动端的tab切换
利用touchslider.js插件来制作的tab切换,可任意修改很方便~~~ 样式: <style> .box-163css{ width:100%; position:relative ...
- 利用jQuery动态设置单选框的选中
一.需要实现的效果 这里使用jQuery来实现.需要实现的效果如下:当下拉条改变时,单选框选中的值随之变化. <!DOCTYPE html> <html> <head&g ...
- Selenium WebDriver-操作单选框
先判断按钮是否已经被选中 如果没有被选中,才可以点击 #encoding=utf-8 import unittest import time import chardet from selenium ...
- CSS魔法堂:改变单选框颜色就这么吹毛求疵!
前言 是否曾经被业务提出"能改改这个单选框的颜色吧!让它和主题颜色搭配一下吧!",然后苦于原生不支持换颜色,最后被迫自己手撸一个凑合使用.若抛开input[type=radio] ...
随机推荐
- 3年Java,鏖战腾讯
作者:codegoose https://segmentfault.com/a/1190000017864721 经过半年的沉淀,加上对MySQL,redis和分布式这块的补齐,终于重拾面试信心,再次 ...
- kubernetes容器集群自签TLS证书
集群部署 1.环境规划 2.安装docker 3.自签TLS证书 4.部署Flannel网络 5.部署Etcd集群 6.创建Node节点kubeconfig文件 7.获取K8S二进制包 8.运行Mas ...
- LeetCode Array Easy 268. Missing Number
Description Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one th ...
- 【知识强化】第六章 应用层 6.3 文件传输协议FTP
这节课我们来学习一下文件传输协议FTP. 我们知道一个文件的传输过程呢一定需要协议的规定,那在文件传送协议这一块呢有很多个协议.比较主要的两个一个是文件传送协议FTP,一个是简单文件传送协议TFTP. ...
- 四、bootstrap-Table
一.bootstrap-Table基础表格 <!DOCTYPE html> <html lang="en"> <head> <meta c ...
- Mysql 事务相关
MySQL介绍 什么是MySQL? MySQL 是一种关系型数据库,在Java企业级开发中非常常用,因为 MySQL 是开源免费的,并且方便扩展.阿里巴巴数据库系统也大量用到了 MySQL,因此它 ...
- Bootstrap 警告框
<div class="panel panel-primary"> <div class="panel-heading"> <h3 ...
- iter()(一)
>>> f=open('script2.py') >>> f <_io.TextIOWrapper name='script2.py' mode='r' en ...
- 【NOIP2019模拟2019.11.13】旅行 && GDKOI2018 还念(二分答案+dij)
Description: 题解: 显然满足二分性. 并且每一条边要不选l要不选r. 二分的那条链肯定要选l. 考虑有两个人在走最短路,一个人一开始必须走二分的那条链,要求第一个人走的比第二个人快. 安 ...
- testNG之顺序执行
@Test testNG1.java: import org.testng.annotations.Test; public class testNG1 { @Test public void t ...