Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ssssssss-team
magic-api
提交
7cd247bf
M
magic-api
项目概览
ssssssss-team
/
magic-api
9 个月 前同步成功
通知
41
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
magic-api
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7cd247bf
编写于
10月 31, 2021
作者:
M
mxd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化状态条显示
上级
31debf08
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
9 deletion
+28
-9
magic-editor/src/console/src/assets/index.css
magic-editor/src/console/src/assets/index.css
+6
-0
magic-editor/src/console/src/components/editor/magic-script-editor.vue
...src/console/src/components/editor/magic-script-editor.vue
+17
-6
magic-editor/src/console/src/components/layout/magic-event.vue
...-editor/src/console/src/components/layout/magic-event.vue
+1
-1
magic-editor/src/console/src/components/layout/magic-status-bar.vue
...or/src/console/src/components/layout/magic-status-bar.vue
+1
-1
magic-editor/src/console/src/scripts/editor/dark-theme.js
magic-editor/src/console/src/scripts/editor/dark-theme.js
+2
-1
magic-editor/src/console/src/scripts/editor/folding.js
magic-editor/src/console/src/scripts/editor/folding.js
+1
-0
未找到文件。
magic-editor/src/console/src/assets/index.css
浏览文件 @
7cd247bf
...
...
@@ -117,6 +117,7 @@
--text-key-color
:
#660e7a
;
--suggest-hover-background
:
#D6EBFF
;
--suggest-hover-color
:
#000
;
--statusbar-em-color
:
#007f31
;
scrollbar-color
:
var
(
--scollbar-color
)
var
(
--scollbar-color
);
scrollbar-width
:
thin
;
outline
:
0
;
...
...
@@ -317,6 +318,11 @@
.ma-container
.monaco-list-row.focused
.monaco-highlighted-label
.highlight
{
color
:
#0097fb
!important
}
.ma-container
.ma-status-container
em
,
.ma-event
.ma-content
em
{
color
:
var
(
--statusbar-em-color
);
font-style
:
normal
;
font-weight
:
bold
;
}
/** 旋转特效 **/
@keyframes
rotate
{
...
...
magic-editor/src/console/src/components/editor/magic-script-editor.vue
浏览文件 @
7cd247bf
...
...
@@ -480,7 +480,8 @@ export default {
}
else
{
bus
.
$emit
(
'
report
'
,
'
script_add
'
)
}
bus
.
$emit
(
'
status
'
,
`接口「
${
thisInfo
.
groupName
}
/
${
thisInfo
.
name
}
(
${
thisInfo
.
groupPath
}
/
${
thisInfo
.
path
}
)」已保存`
.
replace
(
/
\/
+/g
,
'
/
'
))
let
fullName
=
utils
.
replaceURL
(
`
${
thisInfo
.
groupName
}
/
${
thisInfo
.
name
}
(
${
thisInfo
.
groupPath
}
/
${
thisInfo
.
path
}
)`
)
bus
.
$emit
(
'
status
'
,
`接口「
${
fullName
}
」已保存`
)
thisInfo
.
id
=
id
this
.
info
.
ext
.
tmpScript
=
saveObj
.
script
})
...
...
@@ -502,7 +503,8 @@ export default {
}
else
{
bus
.
$emit
(
'
report
'
,
'
function_add
'
)
}
bus
.
$emit
(
'
status
'
,
`函数「
${
thisInfo
.
groupName
}
/
${
thisInfo
.
name
}
(
${
thisInfo
.
groupPath
}
/
${
thisInfo
.
path
}
)」已保存`
.
replace
(
/
\/
+/g
,
'
/
'
))
let
fullName
=
utils
.
replaceURL
(
`
${
thisInfo
.
groupName
}
/
${
thisInfo
.
name
}
(
${
thisInfo
.
groupPath
}
/
${
thisInfo
.
path
}
)`
)
bus
.
$emit
(
'
status
'
,
`函数「
${
fullName
}
」已保存`
)
thisInfo
.
id
=
id
this
.
info
.
ext
.
tmpScript
=
saveObj
.
script
})
...
...
@@ -698,7 +700,10 @@ export default {
.
join
(
'
,
'
)
requestConfig
.
responseType
=
'
blob
'
requestConfig
.
validateStatus
=
()
=>
true
let
dataLen
=
0
let
fullName
=
utils
.
replaceURL
(
`
${
target
.
groupName
}
/
${
target
.
name
}
(
${
target
.
groupPath
}
/
${
target
.
path
}
)`
)
requestConfig
.
transformResponse
=
[
function
(
data
,
headers
){
dataLen
=
data
.
size
;
if
(
headers
[
'
content-disposition
'
]){
return
new
Promise
(
function
(
resolve
){
resolve
(
data
)});
}
...
...
@@ -714,13 +719,20 @@ export default {
}
})
}]
bus
.
$emit
(
'
status
'
,
'
开始测试...
'
)
bus
.
$emit
(
'
status
'
,
`开始测试「
${
fullName
}
」`
)
let
start
=
new
Date
().
getTime
()
request
.
execute
(
requestConfig
)
.
then
(
res
=>
{
res
.
data
.
then
(
data
=>
{
bus
.
$emit
(
'
status
'
,
`测试完毕,本次请求耗时:
${
new
Date
().
getTime
()
-
start
}
ms`
)
let
unit
=
[
'
B
'
,
'
KB
'
,
'
MB
'
];
let
index
=
0
;
while
(
index
<
unit
.
length
&&
dataLen
>=
1024
){
dataLen
=
dataLen
/
1024
index
++
;
}
dataLen
=
dataLen
.
toFixed
(
2
);
bus
.
$emit
(
'
status
'
,
`「
${
fullName
}
」测试完毕,状态:<em>
${
res
.
status
}
</em> 大小:<em>
${
dataLen
}${
unit
[
index
]}
</em> 耗时:<em>
${
new
Date
().
getTime
()
-
start
}
ms</em>`
)
const
contentType
=
res
.
headers
[
'
content-type
'
]
target
.
ext
.
debugDecorations
&&
this
.
editor
.
deltaDecorations
(
target
.
ext
.
debugDecorations
,
[])
target
.
ext
.
debugDecorations
=
target
.
ext
.
debugDecoration
=
null
...
...
@@ -731,7 +743,6 @@ export default {
bus
.
$emit
(
'
update-response-body-definition
'
,
target
.
responseBodyDefinition
);
bus
.
$emit
(
'
update-response-body
'
,
target
.
responseBody
)
}
else
{
bus
.
$emit
(
'
status
'
,
'
脚本执行完毕
'
)
// 执行完毕
target
.
running
=
false
bus
.
$emit
(
'
switch-tab
'
,
'
result
'
)
...
...
@@ -740,7 +751,7 @@ export default {
})
})
.
catch
(
error
=>
{
bus
.
$emit
(
'
status
'
,
'
请求出错...
'
)
bus
.
$emit
(
'
status
'
,
`请求出错:「
${
fullName
}
」`
)
target
.
ext
.
debuging
=
target
.
running
=
false
request
.
processError
(
error
)
})
...
...
magic-editor/src/console/src/components/layout/magic-event.vue
浏览文件 @
7cd247bf
...
...
@@ -12,7 +12,7 @@
<div
class=
"ma-content"
>
<div
v-for=
"(item, key) in eventList"
:key=
"'event_' + key"
class=
"ma-table-row content-bg"
>
<div>
{{
item
.
timestamp
}}
</div>
<div
>
{{
item
.
content
}}
</div>
<div
v-html=
"item.content"
>
</div>
</div>
</div>
</div>
...
...
magic-editor/src/console/src/components/layout/magic-status-bar.vue
浏览文件 @
7cd247bf
<
template
>
<div
class=
"ma-status-container"
>
<div
>
{{
message
}}
</div>
<div
v-html=
"message"
>
</div>
<div
class=
"ma-icons"
>
<span
v-if=
"config.header.repo !== false"
title=
"Gitee"
@
click=
"open('https://gitee.com/ssssssss-team/magic-api')"
>
...
...
magic-editor/src/console/src/scripts/editor/dark-theme.js
浏览文件 @
7cd247bf
...
...
@@ -99,6 +99,7 @@ export default {
'
text-property-color
'
:
'
#9876aa
'
,
'
text-key-color
'
:
'
#9876aa
'
,
'
suggest-hover-background
'
:
'
#113A5C
'
,
'
suggest-hover-color
'
:
'
#fff
'
'
suggest-hover-color
'
:
'
#fff
'
,
'
statusbar-em-color
'
:
'
#68dd9a
'
}
};
\ No newline at end of file
magic-editor/src/console/src/scripts/editor/folding.js
浏览文件 @
7cd247bf
import
*
as
monaco
from
'
monaco-editor
'
let
computeIndentLevel
=
function
(
line
,
tabSize
)
{
var
indent
=
0
;
var
i
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录