|
@@ -44,20 +44,24 @@
|
|
|
</ul>
|
|
</ul>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- 附件 chips:选择即上传,上传中显进度、失败可移除 -->
|
|
|
|
|
|
|
+ <!-- 附件 chips:选择即上传。移除按钮始终可见(解析中也能撤掉),解析中额外显示进度 -->
|
|
|
<div v-if="attachments.length" class="ai-composer__atts">
|
|
<div v-if="attachments.length" class="ai-composer__atts">
|
|
|
<span v-for="att in attachments" :key="att.localId" class="ai-att" :class="{ 'is-failed': att.failed }">
|
|
<span v-for="att in attachments" :key="att.localId" class="ai-att" :class="{ 'is-failed': att.failed }">
|
|
|
<Icon :icon="att.icon" :size="13" />
|
|
<Icon :icon="att.icon" :size="13" />
|
|
|
<span class="ai-att__name">{{ att.name }}</span>
|
|
<span class="ai-att__name">{{ att.name }}</span>
|
|
|
<span class="ai-att__meta">{{ att.meta }}</span>
|
|
<span class="ai-att__meta">{{ att.meta }}</span>
|
|
|
<span v-if="att.uploading" class="ai-att__progress">{{ att.progress }}%</span>
|
|
<span v-if="att.uploading" class="ai-att__progress">{{ att.progress }}%</span>
|
|
|
- <Icon
|
|
|
|
|
- v-else
|
|
|
|
|
|
|
+ <!-- 用文本 × 而不是 Icon:Icon 的类名是运行时拼的,UnoCSS 扫不到就渲染成 0×0,
|
|
|
|
|
+ 删除按钮会「看不见也点不到」 -->
|
|
|
|
|
+ <button
|
|
|
|
|
+ type="button"
|
|
|
class="ai-att__remove"
|
|
class="ai-att__remove"
|
|
|
- icon="mdi:close-circle-outline"
|
|
|
|
|
- :size="13"
|
|
|
|
|
- @click="removeAttachment(att.localId)"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ :title="`移除 ${att.name}`"
|
|
|
|
|
+ :aria-label="`移除 ${att.name}`"
|
|
|
|
|
+ @click.stop="removeAttachment(att.localId)"
|
|
|
|
|
+ >
|
|
|
|
|
+ ×
|
|
|
|
|
+ </button>
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -756,7 +760,19 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&__remove {
|
|
&__remove {
|
|
|
|
|
+ display: inline-flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ width: 14px;
|
|
|
|
|
+ height: 14px;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ color: var(--ai-text-2);
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ border: 0;
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
|
|
|
&:hover {
|
|
&:hover {
|
|
|
color: @error-color;
|
|
color: @error-color;
|