本文实例为大家分享了vue实现计步器功的具体代码,供大家参考,具体内容如下
1.首先先创建一个Stepper.vue
- +.counter-component { position: relative; display: inline-table; overflow: hidden; vertical-align: middle; } .counter-show { float: left; } input { display: inline-block; border: none; border-top: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; height: 25px; line-height: 25px; width: 30px; text-align: center; outline: none; text-align: center; background: #fff; } .counter-btn { border: 1px solid #e3e3e3; display: inline-block; height: 25px; line-height: 25px; width: 25px; text-align: center; cursor: pointer; } .counter-btn:hover { border-color: #4fc08d; background: #4fc08d; color: #fff; } .active { background: rgb(182, 181, 181); }
2.然后页面加载
import Stepper from "./Stepper/Stepper";data(){ return { Numbers: 1, maxNumbers: 5 } }
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



