fix(测试跟踪): 创建用例,富文本框字段不填显示为null

--bug=1024542 --user=陈建星 【测试跟踪】新建、复制用例-文本框为空显示为null https://www.tapd.cn/55049933/s/1351756
This commit is contained in:
chenjianxing 2023-03-16 19:15:25 +08:00 committed by jianxing
parent f6d12e1647
commit 444381ff11
2 changed files with 4 additions and 9 deletions

View File

@ -80,7 +80,7 @@ export function parseCustomField(data, template, rules, oldFields) {
let customField = data.fields[i]; let customField = data.fields[i];
if (customField.id === item.id) { if (customField.id === item.id) {
try { try {
if (item.type === "textarea" || item.type === "richText") { if (item.type === "richText") {
setDefaultValue(item, "\"" + customField.textValue + "\""); setDefaultValue(item, "\"" + customField.textValue + "\"");
} else { } else {
setDefaultValue(item, customField.value); setDefaultValue(item, customField.value);

View File

@ -294,12 +294,8 @@ export default {
} }
} }
if ( if (['input', 'richText', 'textarea'].indexOf(this.contentObject.content.type) > -1) {
this.contentObject.content.type === "input" || if (!this.contentObject.content.defaultValue) {
this.contentObject.content.type === "richText"
) {
if (this.contentObject.content.defaultValue === "" ||
this.contentObject.content.defaultValue == null) {
this.isCustomNone = true; this.isCustomNone = true;
return this.$t("case.none"); return this.$t("case.none");
} else { } else {
@ -308,8 +304,7 @@ export default {
} }
} }
if (this.contentObject.content.defaultValue === "" || if (!this.contentObject.content.defaultValue) {
this.contentObject.content.defaultValue == null) {
this.isCustomNone = true; this.isCustomNone = true;
return this.$t("case.none"); return this.$t("case.none");
} else { } else {