035——VUE中表单控件处理之使用vue控制select操作文字栏目列表
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单控件处理之使用vue控制select操作文字栏目列表 </title>
<script src="vue.js"></script>
</head>
<body>
<div id="lantian">
<div>{{cid}}</div>
<!--select单选-->
<!--<select v-model="cid">--> <!--select多选-->
<select v-model="cid" multiple>
<option value="">请选择栏目</option>
<!--select单选的时候:-->
<option v-for="v in category" :value="v.cid">{{v.title}}</option> </select> </div>
<script>
var app = new Vue({
el: '#lantian',
data: {
category: [
{cid: 1, title: 'PHP课程'},
{cid: 2, title: 'HTML课程'},
{cid: 3, title: 'JAVA课程'},
{cid: 4, title: 'JQUERY课程'}
],
// cid:3
cid: []
}
});
</script> </body>
</html>
035——VUE中表单控件处理之使用vue控制select操作文字栏目列表的更多相关文章
- 034——VUE中表单控件处理之使用vue控制radio表单的实例操作
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 031——VUE中表单控件处理之使用vue控制input和textarea表单项
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 037——VUE中表单控件处理之表单修饰符:lazy/number/trim
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 036——VUE中表单控件处理之动态绑定文章的属性的处理方法
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 032——VUE中表单控件处理之复选框的处理
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Vue表单控件绑定
前面的话 本文将详细介绍Vue表单控件绑定 基础用法 可以用 v-model 指令在表单控件元素上创建双向数据绑定.它会根据控件类型自动选取正确的方法来更新元素.v-model本质上不过是语法糖,它负 ...
- 关于vue.js中表单控件绑定练习
html: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8 ...
- Vue#表单控件绑定
使用v-model 在表单控件上实现数据双向绑定. 单选:https://jsfiddle.net/miloer/bs49p0fx/ <input type="checkbox&quo ...
- vue表单控件绑定(表单数据的自动收集)
v-model指令 你可以用 v-model 指令在表单控件元素上创建双向数据绑定.它会根据控件类型自动选取正确的方法来更新元素.尽管有些神奇 但 v-model 本质上不过是语法糖,它负责监听用户的 ...
随机推荐
- fiddler操作改到本地
urlreplace test5.api.bookapi.cn:8889 localhost:8080
- android studio 版本修改无效解决方案
我们都知道android的版本声明,是在AndroidManifest.xml文件里面的.例如 <manifest xmlns:android="http://schemas.andr ...
- 【转】使用DataConnectionDialog在运行时设置数据源连接字符串
介绍: DataConnectionDialog 类: 打开“数据连接”对话框,获取用户选择的数据连接信息. 命名空间为:Microsoft.Data.ConnectionUI 所在程序集:Micro ...
- Java ArrayList详细介绍和使用示例
①对ArrayList的整体认识 ArrayList是一个数组队列,相当于动态数组.与Java中的数组相比,它的容量能动态增长.它继承了AbstractList,实现了List,RandomAcces ...
- Ubuntu16 安装Jira
参见:https://segmentfault.com/a/1190000008194333 https://www.ilanni.com/?p=12119烂泥:jira7.3/7.2安装.中文及破解 ...
- SeekArc
https://github.com/neild001/SeekArc https://github.com/imflyn/SeekArc
- nsis源码 nsisdialogdesigner
; 安装程序初始定义常量!define PRODUCT_NAME "nsisdialogdesigner"!define PRODUCT_VERSION "1.1.3&q ...
- RedHat7.4最小化安装没有ifconfig命令
软件环境 VirtualBox 5.2.8 rhel-server-7.4-x86_64-dvd.iso 系统环境 Win10 64 位 8G内存 最小化安装了RedHat7.4之后,进入系统之后使用 ...
- hibernate关联非主键注解配置
现在有两张表:一张t_s_user用户表和t_s_user_serial_number用户序号表 CREATE TABLE `t_s_user` ( `id` ) NOT NULL, `email` ...
- idea 配置http代理
工作的环境是在局域网,想要访问外网都是通过代理来访问外网的,最近自己在写maven项目,需要用的依赖下载不能直接访问外部网络,需要配置代理 1.首先在idea里面配置代理地址 settings-> ...