Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
deploy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhouzihao
deploy-ui
Commits
97f216ac
Commit
97f216ac
authored
Mar 31, 2020
by
zhouzihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev-添加配置页面的json支持
parent
81cb29c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
src/views/ConfigList.vue
src/views/ConfigList.vue
+15
-3
No files found.
src/views/ConfigList.vue
View file @
97f216ac
...
@@ -54,8 +54,9 @@
...
@@ -54,8 +54,9 @@
<Input
v-model=
"showData.path"
></Input>
<Input
v-model=
"showData.path"
></Input>
</FormItem>
</FormItem>
<FormItem
label=
"配置内容"
>
<FormItem
label=
"配置内容"
>
<Input
v-model=
"showData.content"
type=
"textarea"
:rows=
"20"
></Input>
<Input
v-
if=
"showData.type==2"
v-
model=
"showData.content"
type=
"textarea"
:rows=
"20"
></Input>
</FormItem>
</FormItem>
<vue-json-editor
v-if=
"showData.type==1"
v-model=
"json"
exapndedOnStart=
"true"
@
json-change=
"onJsonChange"
></vue-json-editor>
</Form>
</Form>
</div>
</div>
<div
class=
"demo-drawer-footer"
>
<div
class=
"demo-drawer-footer"
>
...
@@ -70,9 +71,12 @@ import MasterPage from "@/components/Master";
...
@@ -70,9 +71,12 @@ import MasterPage from "@/components/Master";
import
axios
from
"
axios
"
;
import
axios
from
"
axios
"
;
import
config
from
"
@/config/configs
"
;
import
config
from
"
@/config/configs
"
;
import
_
from
"
lodash
"
;
import
_
from
"
lodash
"
;
import
vueJsonEditor
from
"
vue-json-editor
"
;
export
default
{
export
default
{
components
:
{
components
:
{
MasterPage
MasterPage
,
vueJsonEditor
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -156,7 +160,8 @@ export default {
...
@@ -156,7 +160,8 @@ export default {
env_name
:
""
,
env_name
:
""
,
p_id
:
1
,
p_id
:
1
,
envlist
:
[],
envlist
:
[],
project_name
:
""
project_name
:
""
,
json
:
null
,
};
};
},
},
methods
:
{
methods
:
{
...
@@ -205,6 +210,13 @@ export default {
...
@@ -205,6 +210,13 @@ export default {
this
.
env_name
=
(
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
})).
name
;
this
.
env_name
=
(
_
.
find
(
this
.
envlist
,
{
env_id
:
this
.
env_id
})).
name
;
this
.
isShow
=
true
;
this
.
isShow
=
true
;
this
.
showData
=
this
.
data1
[
index
];
this
.
showData
=
this
.
data1
[
index
];
if
(
this
.
showData
.
type
==
1
){
this
.
json
=
JSON
.
parse
(
this
.
showData
.
content
);
}
},
onJsonChange
:
function
(
value
)
{
this
.
showData
.
content
=
JSON
.
stringify
(
value
);
console
.
log
(
value
);
},
},
build
:
function
()
{
build
:
function
()
{
//
//
...
...
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