diff --git a/src/assets/style/chat.css b/src/assets/style/chat.css index afd1506..7686f84 100644 --- a/src/assets/style/chat.css +++ b/src/assets/style/chat.css @@ -452,6 +452,7 @@ img.avatarUrl-img[lazy="loading"] { box-sizing: border-box; position: relative; background: linear-gradient(90deg, #025cea 0%, #0595f6 100%); + margin: 12rem 0; /* box-shadow: 1rem 2rem 5rem 0 rgba(10, 75, 173, 0.42), inset 0 -4rem 15rem 0 rgba(164, 203, 255, 0.25); */ @@ -769,7 +770,7 @@ img.avatarUrl-img[lazy="loading"] { } .chat-txt-content { - background: #5a9cff; + background: linear-gradient(103deg, #055cea 0%, #137dff 99%); color: #ffffff; text-align: left; -webkit-user-select: text; @@ -800,6 +801,7 @@ img.avatarUrl-img[lazy="loading"] { user-select: text; min-height: 5rem; text-align: justify; + margin: 0; } .chat-txt-content p a { diff --git a/src/components/hot-question.vue b/src/components/hot-question.vue index ef73987..b9fc84d 100644 --- a/src/components/hot-question.vue +++ b/src/components/hot-question.vue @@ -327,14 +327,12 @@ function initHotQuestionYTH(callback) { function initViewState() { footerMore.value = false // 当isQA=true时,需要检查第一页是否需要显示展开收起 - if (props.isQA && active.value === 0 && hotList.value.length > 4) { - footerMore.value = true + if (props.isQA && active.value === 0) { + footerMore.value = hotList.value.length > 4 } } function activeChange(e) { - console.log(e) - footerMore.value = true isExchange.value = false footerOpen.value = false numNone.value = 3 @@ -354,16 +352,16 @@ function activeChange(e) { console.log(`activeChange: active=${active.value}, len=${len}, isQA=${props.isQA}`) // 当isQA=true时,第一页也需要显示展开收起功能 - if ((active.value === 0 && !props.isQA) || len <= 4) { - footerMore.value = false + if ((active.value === 0 && !props.isQA)) { + footerMore.value = len > 4 } // 当isQA=true且在第一页时,如果数据超过4条也要显示展开收起 - if (props.isQA && active.value === 0 && len > 4) { - footerMore.value = true + if (props.isQA && active.value === 0) { + footerMore.value = len > 4 } // 其他页签如果数据超过4条也要显示展开收起 - if (active.value > 0 && len > 4) { - footerMore.value = true + if (active.value > 0) { + footerMore.value = len > 4 } updateTabHeight() } @@ -452,14 +450,14 @@ function updateTabHeight() { hiddenContent.style.visibility = originalVisibility } - // 展开状态且有更多内容时添加25px + // 展开状态且有更多内容时添加25rem const expandedPadding = footerOpen.value && hasMoreContent ? 25 : 0 - // 折叠状态且有更多内容时添加25px + // 折叠状态且有更多内容时添加25rem const collapsedPadding = hasMoreContent ? 25 : 0 const baseHeight = Math.max(totalHeight, 160) // visible content 最小高度 - tabHeights[tabIndex] = `${baseHeight + hiddenHeight + expandedPadding}px` - collapsedHeights[tabIndex] = `${baseHeight + collapsedPadding}px` + tabHeights[tabIndex] = `${baseHeight + hiddenHeight + expandedPadding}rem` + collapsedHeights[tabIndex] = `${baseHeight + collapsedPadding}rem` }) console.log( @@ -603,7 +601,7 @@ onMounted(() => { padding: 0 !important; &::before { - right: -5px !important; + right: -5rem !important; } } @@ -615,9 +613,9 @@ onMounted(() => { } .van-tabs__wrap { - padding: 0px 6px; + padding: 0rem 6rem; position: relative; - height: 39px !important; + height: 39rem !important; &::before { content: ''; @@ -625,9 +623,9 @@ onMounted(() => { z-index: 3; right: 0; top: 0; - width: 1px; - height: 40px; - box-shadow: -8px 0px 10px 10px #fff; + width: 1rem; + height: 40rem; + box-shadow: -8rem 0rem 10rem 10rem #fff; } &::after { @@ -645,13 +643,15 @@ onMounted(() => { .van-tabs__nav { .van-tab { - padding: 0px 10px; + padding: 0rem 10rem; color: #7e849f; - font-size: 13px; + font-size: 13rem; } } .van-cell__value { + text-align: left; + color: #025cea; span { word-break: break-all; word-wrap: break-word; @@ -659,18 +659,18 @@ onMounted(() => { } .van-tab--active { - margin: 0px -2px; + margin: 0rem -2rem; span { font-weight: 700; - font-size: 14px; + font-size: 14rem; color: #025cea; } }