帮助中心
获取牛币
联系我们
关于我们
版权声明
素材牛首页
微博登录
QQ登录
微信扫码登录
注册
登录
新浪微博
QQ登陆
微信登录
热门搜索:
小程序
支付
Java
后台模板
上传
商城模板
jQuery
手机
Thinkphp
微信
Vue.js
首 页
网页特效
整站源码
PHP实例
网站模版
工具箱
常用代码
论坛
游戏源码
资源分享
当前位置:
首页
»
精选常用代码
» vue产品筛选效果
vue产品筛选效果
浏览:961次
-
评论:1次
-
发布时间:2018-09-11
Html
Css
Js
你的选择:
{{abc}}
x
{{item.title}}
{{con.text}}
* { margin:0; padding:0; } ul,li { list-style:none; } .clear { clear:both; } .wrap { width:1200px; margin:50px auto; } .wrap .wrap_header { width:100%; padding:15px 10px; box-sizing:border-box; background:rgba(195,239,255,0.3); } .wrap .wrap_header h1 { display:inline; color:#666; font-size:15px; } .wrap .wrap_header span { display:inline-block; padding:2px 10px; background:#ffe4c6; color:#f78000; border:1px solid #ffbf7b; font-size:12px; border-radius:5px; margin-right:30px; position:relative; } .wrap .wrap_header span .pos { position:absolute; top:-1px; right:-15px; display:block; width:15px; height:100%; background:#ff9191; color:#fff; text-align:center; border:1px solid #ff9191; border-radius:0 5px 5px 0; cursor:pointer; } .wrap .contenter { background:rgba(235,250,255,0.3); padding:15px; box-sizing:border-box; } .wrap .block { width:100%; float:left; padding:15px 0; border-bottom:1px dashed #e5e5e5; } .wrap .block:nth-of-type(4) { border:none; } .wrap .block .title { float:left; color:#f78000; font-size:15px; margin-right:30px; } .wrap .block ul { float:left; } .wrap .block ul li { float:left; font-size:13px; color:#666; margin-right:20px; line-height:22px; cursor:pointer; } .wrap .block ul li.one { background:rgba(195,239,255,0.3) }
var datalist = [{ title: '品牌', id: '1', list: [{ text: '苹果' }, { text: '三星' }, { text: '小米' }, { text: '华为' }, { text: '中兴' }, { text: '联想' }, { text: 'oppo' }, { text: '360手机' }, ] }, { title: '尺寸', id: '2', list: [{ text: '3.0寸以下' }, { text: '3.0-3.9英寸' }, { text: '4.0-4.5英寸' }, { text: '4.6-4.9英寸' }, { text: '5.0-5.5英寸' }, { text: '6.0-6.5英寸' }, ] }, { title: '系统', id: '3', list: [{ text: 'IOS系统' }, { text: 'Android系统' }, { text: 'Window系统' }, ] }, { title: '网络', id: '4', list: [{ text: '联通3G' }, { text: '双卡单4G' }, { text: '双卡双4G' }, { text: '联通4G' }, { text: '电信4G' }, { text: '移动4G' } ] }, ] var vm = new Vue({ el: '#app', data: { date: datalist, cont: {}, }, methods: { addcontent: function(index, con) { this.$set(this.cont, con, index) }, remove: function(index, con) { this.$(this.cont, con, index) } } })
↑上面代码改变,会自动显示代码结果
jQuery调用版本:
1.11.3
<!doctype html><html><head><meta charset="utf-8"><title>vue产品筛选效果-www.sucainiu.com</title><script src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script><style>
</style></head><body>
<script>
</script>
</body></html>
立即下载
收藏
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!
充值积分
充值会员
更多说明»
代码描述:vue写的商城产品筛选
vue写的商城产品筛选,适合初学者学习
JavaScript 通过回车键触发点击/提交事件
3D标签选择效果代码
讨论这个常用代码(1)
回答他人问题或分享心得会奖励牛币
Lv1 新人
qq***37
2019年08月27日
简洁大方,很实用
回复
文明上网,理性发言! 😉 阿里云幸运券,
戳我领取
发表评论
提交回复
我的积分余额:
0
已下载次数:
961
所需牛币:
5
开始下载
牛币获取:
签到、评论、充值
» 在线充值
(10牛币=1元)
成为VIP可永久免积分下载全部常用代码
» 查看详情
VIP
客服
签到
充值