Showing
2 changed files
with
14 additions
and
8 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2023-06-21 10:23:09 | 2 | * @Date: 2023-06-21 10:23:09 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2023-08-25 16:11:50 | 4 | + * @LastEditTime: 2023-08-25 16:31:01 |
| 5 | * @FilePath: /bieyuan/src/views/index.vue | 5 | * @FilePath: /bieyuan/src/views/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -211,8 +211,11 @@ const selectIndex = (idx) => { // 保存手动点击的索引值 | ... | @@ -211,8 +211,11 @@ const selectIndex = (idx) => { // 保存手动点击的索引值 |
| 211 | const clickMinus = () => { // 减少预约数 | 211 | const clickMinus = () => { // 减少预约数 |
| 212 | num.value = num.value > 1 ? num.value - 1 : 1; | 212 | num.value = num.value > 1 ? num.value - 1 : 1; |
| 213 | } | 213 | } |
| 214 | + | ||
| 214 | const clickPlus = () => { // 新增预约数 | 215 | const clickPlus = () => { // 新增预约数 |
| 215 | - num.value = num.value + 1; | 216 | + if (num.value.toString().length < 3) { |
| 217 | + num.value = num.value + 1 | ||
| 218 | + } | ||
| 216 | } | 219 | } |
| 217 | 220 | ||
| 218 | const clickNext = () => { // 点击下一步按钮 | 221 | const clickNext = () => { // 点击下一步按钮 |
| ... | @@ -397,13 +400,14 @@ const isMinValue = (array, value) => { // 判断输入值是否小于数组中 | ... | @@ -397,13 +400,14 @@ const isMinValue = (array, value) => { // 判断输入值是否小于数组中 |
| 397 | .input_num { | 400 | .input_num { |
| 398 | border: 0; | 401 | border: 0; |
| 399 | background-color: #F7F7F7; | 402 | background-color: #F7F7F7; |
| 400 | - height: 2rem; | 403 | + height: 2.5rem; |
| 401 | - width: 4em; | 404 | + // width: 4em; |
| 405 | + width: 70%; | ||
| 402 | color: #976C46; | 406 | color: #976C46; |
| 403 | text-align: center; | 407 | text-align: center; |
| 404 | font-weight: bold; | 408 | font-weight: bold; |
| 405 | font-size: 1.5rem; | 409 | font-size: 1.5rem; |
| 406 | - margin: 0 1rem; | 410 | + // margin: 0 1rem; |
| 407 | } | 411 | } |
| 408 | } | 412 | } |
| 409 | 413 | ... | ... |
| ... | @@ -196,11 +196,13 @@ const selectIndex = (idx) => { | ... | @@ -196,11 +196,13 @@ const selectIndex = (idx) => { |
| 196 | index.value = idx; | 196 | index.value = idx; |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | -const clickMinus = () => { | 199 | +const clickMinus = () => { // 减少预约数 |
| 200 | num.value = num.value > 1 ? num.value - 1 : 1; | 200 | num.value = num.value > 1 ? num.value - 1 : 1; |
| 201 | } | 201 | } |
| 202 | -const clickPlus = () => { | 202 | +const clickPlus = () => { // 新增预约数 |
| 203 | - num.value = num.value + 1; | 203 | + if (num.value.toString().length < 3) { |
| 204 | + num.value = num.value + 1 | ||
| 205 | + } | ||
| 204 | } | 206 | } |
| 205 | 207 | ||
| 206 | // 最大日期默认为6个月 | 208 | // 最大日期默认为6个月 | ... | ... |
-
Please register or login to post a comment