bugfix: 输入内容会携带报告标签

This commit is contained in:
2026-03-10 16:28:11 +08:00
parent b997f10cfc
commit e934d77f95
4 changed files with 35 additions and 40 deletions

View File

@@ -20,7 +20,6 @@
</div>
</div>
<div class="editor-wrapper">
<!-- 静态占位符 - 当编辑器为空时显示 -->
<div v-if="showPlaceholder" class="editor-placeholder">
{{ $t('Input.placeholder') }}
</div>
@@ -506,8 +505,9 @@
let node: Node | null
while ((node = walker.nextNode())) {
if (node.parentElement?.classList.contains('custom-placeholder')) continue
if (node.parentElement?.classList.contains('editor-tag')) continue
// 使用 closest() 检查当前节点的祖先元素是否包含需要排除的 class
if (node.parentElement?.closest('.custom-placeholder')) continue
if (node.parentElement?.closest('.editor-tag')) continue
text += node.textContent
}
@@ -732,14 +732,15 @@
)
const handleCreateProject = async () => {
// 这里可以添加创建项目的逻辑
if (!inputValue.value.trim()) {
return
}
const params = {
type: typeValue.value,
area: areaValue.value,
style: styleValue.value,
useReport: reportTags.value.length > 0,
temperature: 0.7
}
const projectres = await createProject(params)
@@ -1035,7 +1036,7 @@
min-height: 5rem;
line-height: 1.4rem;
}
.editor-placeholder{
.editor-placeholder {
font-family: 'Regular';
font-size: 1.4rem;
padding: 0;