文章标题
来源:互联网 发布:广东粤数大数据 电话 编辑:程序博客网 时间:2024/06/18 13:51
vue中的选购商品进行判断
1.html
<div id="app"> <div class="item"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/28963/backpack.jpg" width="235" height="300"/> <div class="quantity"> <button class="inc" @click="counter > 0 ? counter -= 1 : 0">-</button> <span class="quant-text">Quantity: {{ counter }}</span> <button class="inc" @click="counter += 1">+</button> </div> <button class="submit" @click="">Submit</button> </div><!--item--></div>
2.js
new Vue({ el: '#app', data() { return { counter: 0 } }});
最终效果
阅读全文
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- Dlib的编译和使用(二)
- 十年建站老司机带你十分钟搭建网站
- UITextView 禁止换空行
- 这是我的第一个博客
- vue cli 打包后图片路径错误
- 文章标题
- HDU 6208 The Dominator of Strings
- 数据库设计 第一范式、第二范式、第三范式 三大范式介绍
- dubbo分布式框架中swagger环境的搭建
- Ubuntu16.04英文版如何安装Sogou输入法
- 看似普通的方式equals
- android调用系统相册选图或相机拍照后对图片进行剪切无内存溢出支持7.0
- 【两个有序数组求中位数】
- Cyswin 和 NCL 安装流程