fix(消息管理): 修复邮件标题默认不显示带有Metersphere开头问题

This commit is contained in:
guoyuqi 2024-02-06 18:39:30 +08:00 committed by Craftsman
parent 58d2fa1b9e
commit b44e04da7c
1 changed files with 10 additions and 1 deletions

View File

@ -223,7 +223,16 @@
if (props.isUpdatePreview) { if (props.isUpdatePreview) {
return replaceVariableStr(props.robot.subject || '', props.fields || [], true); return replaceVariableStr(props.robot.subject || '', props.fields || [], true);
} }
return replacePreviewName(props.robot.previewSubject || ''); let previewName = replacePreviewName(props.robot.previewSubject || '');
// Metersphere
if (
props.robot.platform === 'MAIL' &&
props.robot.previewSubject !== null &&
props.robot.previewSubject?.indexOf('Metersphere') === -1
) {
previewName = `Metersphere ${previewName}`;
}
return previewName
}); });
const template = computed(() => { const template = computed(() => {