fix(StudyDetailPage): 调整学习资料弹窗样式和关闭逻辑
将弹窗位置从右侧改为底部,允许点击遮罩关闭 移除返回按钮,改用关闭图标按钮
Showing
1 changed file
with
17 additions
and
8 deletions
| ... | @@ -444,9 +444,9 @@ | ... | @@ -444,9 +444,9 @@ |
| 444 | <!-- 学习资料全屏弹窗 --> | 444 | <!-- 学习资料全屏弹窗 --> |
| 445 | <van-popup | 445 | <van-popup |
| 446 | v-model:show="showMaterialsPopup" | 446 | v-model:show="showMaterialsPopup" |
| 447 | - position="right" | 447 | + position="bottom" |
| 448 | :style="{ width: '100%', height: '100%' }" | 448 | :style="{ width: '100%', height: '100%' }" |
| 449 | - :close-on-click-overlay="false" | 449 | + :close-on-click-overlay="true" |
| 450 | :lock-scroll="true" | 450 | :lock-scroll="true" |
| 451 | > | 451 | > |
| 452 | <div class="flex flex-col h-full bg-gray-50"> | 452 | <div class="flex flex-col h-full bg-gray-50"> |
| ... | @@ -454,16 +454,16 @@ | ... | @@ -454,16 +454,16 @@ |
| 454 | <div class="bg-white shadow-sm border-b border-gray-100"> | 454 | <div class="bg-white shadow-sm border-b border-gray-100"> |
| 455 | <div class="flex items-center justify-between px-4 py-3"> | 455 | <div class="flex items-center justify-between px-4 py-3"> |
| 456 | <div class="flex items-center gap-3"> | 456 | <div class="flex items-center gap-3"> |
| 457 | - <van-button | 457 | + <!-- <van-button |
| 458 | @click="showMaterialsPopup = false" | 458 | @click="showMaterialsPopup = false" |
| 459 | type="default" | 459 | type="default" |
| 460 | size="small" | 460 | size="small" |
| 461 | round | 461 | round |
| 462 | class="w-8 h-8 p-0 bg-gray-100 border-0" | 462 | class="w-8 h-8 p-0 bg-gray-100 border-0" |
| 463 | > | 463 | > |
| 464 | - <van-icon name="arrow-left" size="16" class="text-gray-600" /> | 464 | + <van-icon name="cross" size="16" class="text-gray-600" /> |
| 465 | - </van-button> | 465 | + </van-button> --> |
| 466 | - <div> | 466 | + <div class="px-1"> |
| 467 | <h2 class="text-lg font-medium text-gray-900">学习资料</h2> | 467 | <h2 class="text-lg font-medium text-gray-900">学习资料</h2> |
| 468 | <p class="text-xs text-gray-500"> | 468 | <p class="text-xs text-gray-500"> |
| 469 | 共 {{ courseFile?.list ? courseFile.list.length : 0 }} 个文件 | 469 | 共 {{ courseFile?.list ? courseFile.list.length : 0 }} 个文件 |
| ... | @@ -471,9 +471,18 @@ | ... | @@ -471,9 +471,18 @@ |
| 471 | </div> | 471 | </div> |
| 472 | </div> | 472 | </div> |
| 473 | <div class="px-2 py-1 bg-blue-50 rounded-full"> | 473 | <div class="px-2 py-1 bg-blue-50 rounded-full"> |
| 474 | - <span class="text-blue-600 text-sm font-medium"> | 474 | + <!-- <span class="text-blue-600 text-sm font-medium"> |
| 475 | {{ courseFile?.list ? courseFile.list.length : 0 }} | 475 | {{ courseFile?.list ? courseFile.list.length : 0 }} |
| 476 | - </span> | 476 | + </span> --> |
| 477 | + <van-button | ||
| 478 | + @click="showMaterialsPopup = false" | ||
| 479 | + type="default" | ||
| 480 | + size="small" | ||
| 481 | + round | ||
| 482 | + class="w-8 h-8 p-0 bg-gray-100 border-0" | ||
| 483 | + > | ||
| 484 | + <van-icon name="cross" size="16" class="text-gray-600" /> | ||
| 485 | + </van-button> | ||
| 477 | </div> | 486 | </div> |
| 478 | </div> | 487 | </div> |
| 479 | </div> | 488 | </div> | ... | ... |
-
Please register or login to post a comment