hookehuyr

style(ui): 优化下拉菜单文字显示样式

为下拉菜单选项和按钮添加单行显示样式,防止文字溢出并保持布局整洁
1 <!-- 1 <!--
2 * @Date: 2025-05-29 15:34:17 2 * @Date: 2025-05-29 15:34:17
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-06-27 15:09:17 4 + * @LastEditTime: 2025-06-28 21:38:42
5 * @FilePath: /mlaj/src/views/teacher/checkinPage.vue 5 * @FilePath: /mlaj/src/views/teacher/checkinPage.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -833,6 +833,28 @@ const handleAdd = (type) => { ...@@ -833,6 +833,28 @@ const handleAdd = (type) => {
833 .van-back-top { 833 .van-back-top {
834 background-color: #4caf50; 834 background-color: #4caf50;
835 } 835 }
836 +/* 下拉菜单选项文字单行显示 */
837 +.van-dropdown-item {
838 + .van-cell__title {
839 + white-space: nowrap;
840 + overflow: hidden;
841 + text-overflow: ellipsis;
842 + max-width: 100%;
843 + flex: 0 0 80%; /* title占80%宽度 */
844 + }
845 +
846 + .van-cell__value {
847 + flex: 0 0 20%; /* value占20%宽度 */
848 + }
849 +}
850 +
851 +/* 下拉菜单按钮文字单行显示 */
852 +.van-dropdown-menu__title {
853 + white-space: nowrap;
854 + overflow: hidden;
855 + text-overflow: ellipsis;
856 + max-width: 100%;
857 +}
836 .calendar-checkin { 858 .calendar-checkin {
837 .van-calendar__selected-day { 859 .van-calendar__selected-day {
838 background: #a2d8a3 !important; 860 background: #a2d8a3 !important;
......
...@@ -460,6 +460,29 @@ onUnmounted(() => { ...@@ -460,6 +460,29 @@ onUnmounted(() => {
460 box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); 460 box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
461 } 461 }
462 462
463 +/* 下拉菜单选项文字单行显示 */
464 +.van-dropdown-item {
465 + .van-cell__title {
466 + white-space: nowrap;
467 + overflow: hidden;
468 + text-overflow: ellipsis;
469 + max-width: 100%;
470 + flex: 0 0 80%; /* title占80%宽度 */
471 + }
472 +
473 + .van-cell__value {
474 + flex: 0 0 20%; /* value占20%宽度 */
475 + }
476 +}
477 +
478 +/* 下拉菜单按钮文字单行显示 */
479 +.van-dropdown-menu__title {
480 + white-space: nowrap;
481 + overflow: hidden;
482 + text-overflow: ellipsis;
483 + max-width: 100%;
484 +}
485 +
463 .van-circle { 486 .van-circle {
464 font-size: 12px; 487 font-size: 12px;
465 font-weight: bold; 488 font-weight: bold;
......