yangg 3 giorni fa
parent
commit
d58afd42e5
1 ha cambiato i file con 8 aggiunte e 4 eliminazioni
  1. 8 4
      src/views/project/components/dataList.vue

+ 8 - 4
src/views/project/components/dataList.vue

@@ -2292,11 +2292,15 @@ export default {
 
                 if (matchedContent?.content) {
                   // 构建替换内容
+                  const cleanContent = matchedContent.content.trim() // 清理前后空格
+                  const chineseDescription = matchedContent.chinese_description || '' // 获取中文释义,如果有的话 !important
                   const formattedReplacement = `
-                    <span class="replacement-content" data-code="${currentCode}">
-                      ${matchedContent.content}
-                    </span>
-                  `.trim()
+                    <span 
+                      class="replacement-content" 
+                      data-code="${currentCode}" 
+                      title="${chineseDescription}"
+                      style="background-color: #ffff00; padding: 2px 4px; border-radius: 2px; display: inline-block;"
+                    >${cleanContent}${chineseDescription ? `<span class="chinese-desc" style="color: #67c23a; margin-left: 4px; font-size: 0.9em;">(${chineseDescription})</span>` : ''}</span>`.trim()
 
                   // 处理表格和其他内容
                   updatedContent = this.processTableContent(