+
@@ -28,22 +29,21 @@ export default {
bus.$on('ws_log', rows => this.onLogReceived(rows[0]))
},
methods: {
+ doExpand(item){
+ item.expand = !item.expand;
+ },
onLogReceived(row){
row.timestamp = utils.formatDate(new Date())
let throwable = row.throwable
delete row.throwable
row.message = (row.message || '').replace(/ /g, ' ').replace(/\n/g,'
')
- this.logs.push(row)
+ row.expand = false;
if (throwable) {
- let messages = throwable.replace(/ /g, ' ').split('\n');
- for (let i = 0; i < messages.length; i++) {
- this.logs.push({
- level: row.level,
- message: messages[i],
- throwable: true
- })
- }
+ row.message += throwable.replace(/ /g, ' ').replace(/\n/g,'
')
+ row.throwable = true
}
+ row.newline = row.message.indexOf('
') > -1
+ this.logs.push(row)
let container = this.$refs.container;
this.$nextTick(() => container.scrollTop = container.scrollHeight)
},
@@ -92,4 +92,19 @@ export default {
.ma-log .throwable {
color: var(--log-error-color)
}
+
+.ma-log i{
+ margin-right: -10px;
+ margin-left: -10px;
+ font-size: 12px;
+ width: 20px;
+ display: inline-block;
+ height: 20px;
+ text-align: center;
+}
+.ma-log .collapse{
+ height: 20px;
+ line-height: 20px;
+ overflow: hidden;
+}
diff --git a/magic-editor/src/console/src/components/resources/magic-api-list.vue b/magic-editor/src/console/src/components/resources/magic-api-list.vue
index a6416cdc..5eb60842 100644
--- a/magic-editor/src/console/src/components/resources/magic-api-list.vue
+++ b/magic-editor/src/console/src/components/resources/magic-api-list.vue
@@ -536,6 +536,8 @@ export default {
requestGroup('group/create', this.createGroupObj).success(data => {
this.createGroupObj.id = data
this.createGroupObj.folder = true
+ this.createGroupObj.paths = []
+ this.createGroupObj.options = []
bus.$emit('report', 'group_create')
bus.$emit('status', `分组「${this.createGroupObj.name}」创建成功`)
this.deleteOrAddGroupToTree(this.tree, this.createGroupObj)
diff --git a/magic-editor/src/console/src/scripts/beautifier/core/output.js b/magic-editor/src/console/src/scripts/beautifier/core/output.js
index 99b4e0e8..4a569423 100644
--- a/magic-editor/src/console/src/scripts/beautifier/core/output.js
+++ b/magic-editor/src/console/src/scripts/beautifier/core/output.js
@@ -310,7 +310,9 @@ Output.prototype.get_code = function(eol) {
var sweet_code = this.__lines.join('\n');
- if (eol !== '\n') {
+ if (eol === '\r\n') {
+ sweet_code = sweet_code.replaceAll(/([^\r])\n/g, `$1${eol}`);
+ }else if (eol !== '\n') {
sweet_code = sweet_code.replace(/[\n]/g, eol);
}
return sweet_code;
diff --git a/magic-editor/src/console/src/scripts/parsing/index.js b/magic-editor/src/console/src/scripts/parsing/index.js
index 2447b1ab..43051c19 100644
--- a/magic-editor/src/console/src/scripts/parsing/index.js
+++ b/magic-editor/src/console/src/scripts/parsing/index.js
@@ -291,15 +291,7 @@ class CharacterStream {
}
matchDigit(consume) {
- if (this.index >= this.end)
- return false;
- let c = this.source.charAt(this.index);
- if (c!== ' ' && !isNaN(c)) {
- if (consume)
- this.index++;
- return true;
- }
- return false;
+ return this.matchAny('0123456789', consume)
}
matchIdentifierStart(consume) {
diff --git a/magic-editor/src/console/src/scripts/parsing/tokenizer.js b/magic-editor/src/console/src/scripts/parsing/tokenizer.js
index be932159..9089d572 100644
--- a/magic-editor/src/console/src/scripts/parsing/tokenizer.js
+++ b/magic-editor/src/console/src/scripts/parsing/tokenizer.js
@@ -84,7 +84,7 @@ const tokenizerString = (stream, tokenType, tokens) => {
}
let ch = stream.consume();
if (tokenType !== TokenType.TripleQuote && (ch === '\r' || ch === '\n')) {
- throw new ParseException(tokenType.getError() + tokenType.getError() + "定义的字符串不能换行", stream.endSpan());
+ throw new ParseException(tokenType.error + tokenType.error + "定义的字符串不能换行", stream.endSpan());
}
}
if (!matchedEndQuote) {
diff --git a/pom.xml b/pom.xml
index 890f2034..29197279 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
org.ssssssss
magic-api-parent
-
1.4.0
+
1.4.1
pom
magic-api-parent
auto generate http api
@@ -30,7 +30,7 @@
2.4.5
- 1.5.0
+ 1.5.1
1.21
2.7
1.6