hookehuyr

fix

<!--
* @Date: 2023-06-21 10:23:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-08-25 16:11:50
* @LastEditTime: 2023-08-25 16:31:01
* @FilePath: /bieyuan/src/views/index.vue
* @Description: 文件描述
-->
......@@ -211,8 +211,11 @@ const selectIndex = (idx) => { // 保存手动点击的索引值
const clickMinus = () => { // 减少预约数
num.value = num.value > 1 ? num.value - 1 : 1;
}
const clickPlus = () => { // 新增预约数
num.value = num.value + 1;
if (num.value.toString().length < 3) {
num.value = num.value + 1
}
}
const clickNext = () => { // 点击下一步按钮
......@@ -397,13 +400,14 @@ const isMinValue = (array, value) => { // 判断输入值是否小于数组中
.input_num {
border: 0;
background-color: #F7F7F7;
height: 2rem;
width: 4em;
height: 2.5rem;
// width: 4em;
width: 70%;
color: #976C46;
text-align: center;
font-weight: bold;
font-size: 1.5rem;
margin: 0 1rem;
// margin: 0 1rem;
}
}
......
......@@ -196,11 +196,13 @@ const selectIndex = (idx) => {
index.value = idx;
}
const clickMinus = () => {
const clickMinus = () => { // 减少预约数
num.value = num.value > 1 ? num.value - 1 : 1;
}
const clickPlus = () => {
num.value = num.value + 1;
const clickPlus = () => { // 新增预约数
if (num.value.toString().length < 3) {
num.value = num.value + 1
}
}
// 最大日期默认为6个月
......