feat: 更新QuestionItem和QuestionBoxView组件

- 在QuestionItem.vue中移除垂直间距,替换为NDivider以优化布局
- 在QuestionBoxView.vue中修改问题输入框的占位符,更新提示区域逻辑,调整问题内容卡片样式
This commit is contained in:
2025-05-03 07:14:14 +08:00
parent 5ec2babc44
commit fe5b420d49
2 changed files with 13 additions and 18 deletions

View File

@@ -146,7 +146,6 @@ function getScoreColor(score: number | undefined): string {
</template>
<template v-if="item.questionImages && item.questionImages.length > 0">
<NSpace
vertical
size="small"
>
<NImage
@@ -157,7 +156,7 @@ function getScoreColor(score: number | undefined): string {
lazy
/>
</NSpace>
<br>
<NDivider style="margin: 10px 0;" />
</template>
<NText

View File

@@ -435,7 +435,7 @@ onUnmounted(() => {
type="textarea"
:count-graphemes="countGraphemes"
class="question-textarea"
placeholder="在这里输入您的问题..."
placeholder="随便说点"
/>
</div>
@@ -591,20 +591,13 @@ onUnmounted(() => {
<NDivider class="form-divider" />
<!-- 提示区域 - 合并条件 -->
<transition
name="fade"
appear
<NAlert
v-if="!isUserLoggedIn && !isSelf && !allowUploadImage"
type="info"
class="login-alert"
>
<NAlert
v-if="!isUserLoggedIn && !isSelf"
type="info"
class="login-alert"
>
{{ !allowUploadImage && targetUserSetting !== null ?
'登录后才能上传图片,或该用户未允许匿名上传图片。' :
allowUploadImage ? '当前为匿名状态,图片上传后将无法更改。' : '' }}
</NAlert>
</transition>
{{ '主播不允许上传图片' }}
</NAlert>
<!-- 匿名选项 -->
<transition
@@ -743,7 +736,10 @@ onUnmounted(() => {
</template>
<!-- 问题内容 -->
<NCard class="question-content">
<NCard
class="question-content"
size="small"
>
<div
v-if="item.question.message"
class="question-message"
@@ -755,7 +751,7 @@ onUnmounted(() => {
v-if="item.questionImages && item.questionImages.length > 0"
class="question-image-container"
>
<NImage
<NImage
v-for="(img, index) in item.questionImages"
:key="index"
:src="img.path"