Files
wxapp_escort/components/hospital-select/index.wxss
T
lik cee932c4c5 feat(hospital): 医院选择改为底部弹层并适配键盘
面板通过 root-portal 挂到页面根部,脱离父级 scroll-view 与 transform 层叠上下文,
两个预约入口共用同一选择面板;展开高度按窗口与键盘高度计算,搜索与手动填写
关闭 adjust-position,删除原先按行高推算列表高度和自动上滚页面的逻辑。
2026-11-16 19:30:28 +08:00

38 lines
4.6 KiB
Plaintext

/* 普通表单行;浮层由 root-portal 挂到页面根部,不撑开原表单。 */
.hospital-row { display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; min-height: 100rpx; padding: 24rpx 0; border-bottom: 2rpx solid var(--line, #ECE3D6); }
.is-compact .hospital-row { min-height: 88rpx; padding: 20rpx 0; }
.is-disabled { opacity: 0.6; }
.hospital-label { flex-shrink: 0; color: var(--muted, #6F655C); font-size: var(--fs-30, 30rpx); letter-spacing: 1rpx; line-height: 1.6; }
.is-compact .hospital-label { font-size: var(--fs-28, 28rpx); }
.hospital-value { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-end; gap: 12rpx; margin-left: 24rpx; }
.hospital-value-text { min-width: 0; color: var(--ink, #2B2521); font-size: var(--fs-30, 30rpx); font-weight: 500; text-align: right; line-height: 1.6; word-break: break-all; }
.hospital-value-text.is-placeholder, .hospital-placeholder { color: var(--muted, #6F655C); font-weight: 400; }
.hospital-chevron { flex-shrink: 0; width: 16rpx; height: 16rpx; border-right: 2rpx solid var(--muted, #6F655C); border-bottom: 2rpx solid var(--muted, #6F655C); transform: rotate(45deg); }
.hospital-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 1000; color: var(--ink, #2B2521); }
.hospital-mask { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(43, 37, 33, 0.3); }
.hospital-panel { position: absolute; left: 0; right: 0; display: flex; flex-direction: column; box-sizing: border-box; padding-bottom: env(safe-area-inset-bottom); border-radius: 32rpx 32rpx 0 0; background: var(--white, #FFFFFF); overflow: hidden; }
.hospital-panel.keyboard-open { padding-bottom: 0; }
.hospital-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; min-height: 104rpx; padding: 0 20rpx 0 32rpx; }
.hospital-title { font-size: var(--fs-32, 32rpx); font-weight: 600; line-height: 1.5; }
.hospital-close { display: flex; align-items: center; justify-content: center; width: 88rpx; height: 88rpx; }
.close-mark { position: relative; width: 28rpx; height: 28rpx; }
.close-mark::before, .close-mark::after { content: ''; position: absolute; top: 13rpx; left: 0; width: 28rpx; height: 2rpx; background: var(--muted, #6F655C); transform: rotate(45deg); }
.close-mark::after { transform: rotate(-45deg); }
.hospital-search { flex-shrink: 0; padding: 0 32rpx 16rpx; }
.hospital-search-input, .hospital-manual-input { box-sizing: border-box; width: 100%; height: 88rpx; padding: 16rpx 20rpx; color: var(--ink, #2B2521); font-size: var(--fs-30, 30rpx); border: 2rpx solid var(--line, #ECE3D6); border-radius: 16rpx; background: var(--paper, #FAF8F5); }
.hospital-options { flex: 1; height: 0; min-height: 0; box-sizing: border-box; }
.hospital-option { display: flex; align-items: center; gap: 16rpx; margin: 0 32rpx; padding: 24rpx 0; border-bottom: 2rpx solid var(--line, #ECE3D6); }
.hospital-option:last-child { border-bottom: none; }
.hospital-option:active, .hospital-option.is-selected { background: var(--brand-soft, #FFF4E8); }
.hospital-option-main { flex: 1; min-width: 0; }
.hospital-option-name { display: block; color: var(--ink, #2B2521); font-size: var(--fs-30, 30rpx); font-weight: 500; line-height: 1.5; word-break: break-all; }
.hospital-option-sub { display: block; margin-top: 8rpx; color: var(--muted, #6F655C); font-size: var(--fs-26, 26rpx); line-height: 1.6; word-break: break-all; }
.hospital-option-selected { flex-shrink: 0; width: 20rpx; height: 12rpx; margin: -6rpx 8rpx 0; border-left: 3rpx solid var(--brand-ink, #9B4508); border-bottom: 3rpx solid var(--brand-ink, #9B4508); transform: rotate(-45deg); }
.hospital-empty { padding: 40rpx 32rpx; text-align: center; color: var(--muted, #6F655C); font-size: var(--fs-28, 28rpx); line-height: 1.6; }
.hospital-other { display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 96rpx; border-top: 2rpx solid var(--line, #ECE3D6); color: var(--brand-ink, #9B4508); font-size: var(--fs-30, 30rpx); }
.hospital-manual-panel { flex: 1; min-height: 0; padding: 0 32rpx 24rpx; overflow-y: auto; }
.manual-actions { display: flex; gap: 16rpx; margin-top: 24rpx; }
.manual-actions button[size="default"] { display: flex; align-items: center; justify-content: center; flex: 1; width: auto; min-height: 88rpx; margin: 0; padding: 16rpx; border-radius: 16rpx; font-size: var(--fs-30, 30rpx); line-height: 1.5; }
.manual-back { background: var(--paper, #FAF8F5); color: var(--ink, #2B2521); }
.manual-confirm { background: var(--brand-strong, #B8520A); color: var(--white, #FFFFFF); }
.manual-actions button::after { border: none; }