vue实现选中列表功能
<template>
<div>
<ul v-for="prop in items">
<dt>{{prop.name}}</dt>
<dd v-for="op in prop.options">
<input type="checkbox" :value="op" v-model="selectedProperties">{{op.value}}
</dd>
</ul>
{{selectedProperties}}<br />
{{foos}}
</div>
</template> <script>
export default {
computed:{
foos(){
return this.selectedProperties.map(item => item.value);
}
},
data() {
return {
selectedProperties: [],
items: [
{
"name": "容量", "type": 1, "options": [
{ "id": "1", "value": "64G" },
{ "id": "2", "value": "256G" }
]
},
{
"name": "颜色", "type": 1, "options": [
{ "id": "3", "value": "金色" },
{ "id": "4", "value": "红色" }
]
},
{
"name": "网络类型", "type": 1, "options": [
{ "id": "5", "value": "4G全网通" },
{ "id": "6", "value": "4G电信" },
{ "id": "7", "value": "4G移动" }
]
},
{
"name": "套餐类型", "type": 1, "options": [
{ "id": "8", "value": "普通套餐" },
{ "id": "9", "value": "高级套餐" }
]
}
]
}
}
} </script>
vue实现选中列表功能的更多相关文章
- django rest_framework vue 实现用户列表分页
django rest_framework vue 实现用户列表分页 后端 配置urls # 导入view from api.appview.userListView import userListV ...
- WijmoJS V2019.0 Update2发布:再度增强 React 和 Vue 框架的组件功能
前端开发工具包 WijmoJS 在2019年的第二个主要版本 V2019.0 Update2 已经发布,本次发布涵盖了React 和 Vue 框架下 WijmoJS 前端组件的功能增强,并加入更为易用 ...
- nginx 目录文件列表功能配置
工作中常常有写不能有网页下载东西的需求,在Apache下搭建完成后直接导入文件即可达到下载/显示文件的效果,而Nginx也可以满足这样的需求(nginx 目录列表功能默认是关闭的),这时就需要配置. ...
- HoverTree项目添加了查看留言列表功能
HoverTree项目添加了查看留言列表功能 页面:HoverTreeWeb项目下hvtpanel/usermessage/messagelist.aspx 添加留言页面:addmessage.asx ...
- 【转】如何开启notepad++函数列表功能
原文网址:http://jingyan.baidu.com/article/4b07be3c41e05e48b380f3f6.html Notepad++是window下特有的一款开源编辑器软件,相信 ...
- 开放Nginx在文件夹列表功能
nginx在列出的默认同意整个文件夹.你怎么转Nginx在文件夹列表功能?打开nginx.conf文件.在location server 要么 http段增加 autoindex on;另外两个參数最 ...
- CI 结合 vue.js 的搜索功能模块
CI 结合 vue.js 的搜索功能模块 最近在有优化公司后台的某个模块的搜索功能优化 原先的是这个样子的,很是单调: 老大给我找个图希望我能弄成这样子: 经过不断修改,最后成了这样子 是不是比以前好 ...
- 用Vue实现状态列表的操作涵盖所有的知识点
用Vue实现状态列表的操作涵盖所有的知识点
- 微信小程序新闻列表功能(读取文件、template模板使用)
微信小程序新闻列表功能(读取文件.template) 不忘初心,方得始终.初心易得,始终难守. 在之前的项目基础上进行修改,实现读取文件内容作为新闻内容进行展示. 首先,修改 post.wxml 文件 ...
随机推荐
- how to download a file with Nodejs(without using third-party libraries)用node下载文件
创建HTTP GET请求并将其管理response到可写文件流中: var http = require('http'); var fs = require('fs'); var file = fs. ...
- 22、IDP-ASE
IDPASE https://github.com/bdeonovic/IDPASE.jl Prepare necessary input files (1)FASTQ file of your hy ...
- IOS 获取系统通讯录
进入正题 获取系统通讯录,不想多讲,留下链接http://my.oschina.net/joanfen/blog/140146 通常做法: 首先创建一个ABAddressBookRef类的对象add ...
- 百度AI图片识别
官方文档:http://ai.baidu.com/tech/ocr/general
- cf779D(记忆化dp)
题目链接: http://codeforces.com/problemset/problem/799/D 题意: 给出两个矩阵边长 a, b, 和 w, h, 以及一个 c 数组, 可选择 c 数组中 ...
- 高效法则 之 你还在用这么low的方法打开软件吗?
电脑上的诸多功能被组织成软件的形式提供给用户.聊天的有QQ/Skype,看电影的有腾讯视频/芒果TV,听音乐的有酷狗/LessDJ,做图的有PS/Sketch,写代码搞开发的各种IDE Eclipse ...
- Shell操作相关的快捷键 --Linux
一.shell和bash shell --unix --Bourne shell ,bash --linux --Bourne again shell.bash (GNU Bourne-Again S ...
- CoinEye PRIVACY POLICY
PRIVACY POLICY First, welcome to use the app Thank you for using our products and services ("Se ...
- VC添加全局热键的方法
VC添加全局热键的方法 这个方法靠谱 http://blog.csdn.net/lujianfeiccie2009/article/details/7498704 VC添加全局热键的方法 标签: bu ...
- webpack配置Jquery全局包及全局包插件
一:在配置文件配置: plugins: [ //将来以template为模版,生成一个index.html并且发布到webpack-dev-server开启的node服务器上面去 new HtmlWe ...