Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
ebe0554c
Commit
ebe0554c
authored
Aug 31, 2020
by
刘殿昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json格式化
parent
522b2148
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
src/components/general/codes.vue
src/components/general/codes.vue
+18
-12
src/pages/workbench/fwgl/serviceDetail.vue
src/pages/workbench/fwgl/serviceDetail.vue
+1
-1
No files found.
src/components/general/codes.vue
View file @
ebe0554c
...
@@ -17,12 +17,17 @@ import ace from "ace-builds";
...
@@ -17,12 +17,17 @@ import ace from "ace-builds";
import
"
ace-builds/webpack-resolver
"
;
// 在 webpack 环境中使用必须要导入
import
"
ace-builds/webpack-resolver
"
;
// 在 webpack 环境中使用必须要导入
import
"
ace-builds/src-noconflict/mode-json
"
;
// 默认设置的语言模式
import
"
ace-builds/src-noconflict/mode-json
"
;
// 默认设置的语言模式
export
default
{
export
default
{
props
:
[
"
url
"
,
"
datas
"
,
'
readOnly
'
],
props
:
{
url
:
{
type
:
String
,
default
:
""
,
},
datas
:
{
type
:
String
,
default
:
""
},
readOnly
:
{
type
:
Boolean
,
default
:
false
},
},
data
()
{
data
()
{
return
{
return
{
aceEditor
:
null
,
aceEditor
:
null
,
themePath
:
"
ace/theme/monokai
"
,
// 不导入 webpack-resolver,该模块路径会报错
modePath
:
this
.
acemodePath
};
};
},
},
...
@@ -31,17 +36,18 @@ export default {
...
@@ -31,17 +36,18 @@ export default {
maxLines
:
24
,
maxLines
:
24
,
minLines
:
10
,
minLines
:
10
,
fontSize
:
14
,
fontSize
:
14
,
mode
:
this
.
acemodePath
,
wrap
:
true
,
wrap
:
this
.
wrap
,
tabSize
:
2
,
tabSize
:
4
,
highlightActiveLine
:
false
,
highlightActiveLine
:
false
,
readOnly
:
this
.
readOnly
?
this
.
readOnly
:
false
readOnly
:
this
.
readOnly
,
});
});
if
(
this
.
url
)
{
if
(
this
.
url
)
{
this
.
getValue
();
this
.
getValue
();
}
}
if
(
this
.
datas
)
{
if
(
this
.
datas
)
{
this
.
aceEditor
.
setValue
(
this
.
datas
);
this
.
aceEditor
.
setValue
(
JSON
.
stringify
(
JSON
.
parse
(
this
.
datas
),
null
,
"
\t
"
)
);
}
}
},
},
watch
:
{},
watch
:
{},
...
@@ -49,10 +55,10 @@ export default {
...
@@ -49,10 +55,10 @@ export default {
getValue
()
{
getValue
()
{
this
.
$http
this
.
$http
.
get
(
this
.
url
)
.
get
(
this
.
url
)
.
then
(
response
=>
{
.
then
(
(
response
)
=>
{
this
.
aceEditor
.
setValue
(
response
.
data
);
this
.
aceEditor
.
setValue
(
response
.
data
);
})
})
.
catch
(
function
(
response
)
{
.
catch
(
function
(
response
)
{
console
.
log
(
response
);
console
.
log
(
response
);
});
});
},
},
...
@@ -61,8 +67,8 @@ export default {
...
@@ -61,8 +67,8 @@ export default {
},
},
getCodesVal
()
{
getCodesVal
()
{
return
this
.
aceEditor
.
getValue
();
return
this
.
aceEditor
.
getValue
();
}
}
,
}
}
,
};
};
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/pages/workbench/fwgl/serviceDetail.vue
View file @
ebe0554c
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
:stripe=
"true"
:stripe=
"true"
slot=
"res_table"
slot=
"res_table"
></table-um>
></table-um>
<v-apaas-code
:datas=
"res_code_arr"
slot=
"res_code"
></v-apaas-code>
<v-apaas-code
:datas=
"res_code_arr"
slot=
"res_code"
:readOnly=
"true"
></v-apaas-code>
</info-list>
</info-list>
<p
v-if=
"now_service == 1&&workflows_id"
>
<p
v-if=
"now_service == 1&&workflows_id"
>
流程服务接口说明见文档中心流程服务接口文档
流程服务接口说明见文档中心流程服务接口文档
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment