Skip to content

Commit ea00f88

Browse files
committed
优化测试用例、历史记录等默认生成的名称
1 parent 428a0d4 commit ea00f88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
}
342342

343343
var tag = App.getTag()
344-
App.history.name = App.getMethod() + ' ' + (StringUtil.isEmpty(tag, true) ? 'Test' : tag) + ' ' + App.formatTime() //不自定义名称的都是临时的,不需要时间太详细
344+
App.history.name = App.getMethod() + (StringUtil.isEmpty(tag, true) ? '' : ' ' + tag) + ' ' + App.formatTime() //不自定义名称的都是临时的,不需要时间太详细
345345
}
346346
App.isSaveShow = show
347347
},
@@ -359,7 +359,7 @@
359359
return
360360
}
361361
var tag = App.getTag()
362-
App.exTxt.name = App.getMethod() + ' ' + (StringUtil.isEmpty(tag, true) ? 'Test' : tag)
362+
App.exTxt.name = App.getMethod() + (StringUtil.isEmpty(tag, true) ? '' : ' ' + tag)
363363
}
364364
else { //下载到本地
365365
if (App.isTestCaseShow) { //文档
@@ -1238,7 +1238,7 @@
12381238
this.locals.unshift({
12391239
'Document': {
12401240
'userId': App.User.id,
1241-
'name': method + ' ' + (StringUtil.isEmpty(req.tag, true) ? 'Test' : req.tag) + ' ' + App.formatDateTime(),
1241+
'name': method + (StringUtil.isEmpty(req.tag, true) ? '' : ' ' + req.tag) + ' ' + App.formatDateTime(),
12421242
'url': '/' + method,
12431243
'request': real
12441244
}

0 commit comments

Comments
 (0)