Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api-gateway
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
API
api-gateway
Commits
6ff2a0ab
Commit
6ff2a0ab
authored
Aug 30, 2019
by
fairyly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改后端配置
parent
37c48cb5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
back-table-right.vue
src/components/createApi/back-table-right.vue
+11
-4
No files found.
src/components/createApi/back-table-right.vue
View file @
6ff2a0ab
...
@@ -131,16 +131,18 @@ export default {
...
@@ -131,16 +131,18 @@ export default {
}
}
}
}
}
}
console
.
log
(
'obj.type:'
,
obj
.
type
)
// 设置子级禁用和不禁用
// 设置子级禁用和不禁用
if
(
obj
.
type
==
'object'
&&
Object
.
keys
(
obj
.
properties
).
length
)
{
if
(
obj
.
type
==
'object'
&&
Object
.
keys
(
obj
.
properties
).
length
)
{
obj
.
isRootKeyFlag
=
false
;
obj
.
isRootKeyFlag
=
false
;
for
(
let
k
in
obj
.
properties
)
{
for
(
let
k
in
obj
.
properties
)
{
obj
.
properties
[
k
].
isRootKeyFlag
=
obj
.
isRootKey
?
true
:
false
;
obj
.
properties
[
k
].
isRootKeyFlag
=
obj
.
isRootKey
?
true
:
false
;
if
(
obj
.
properties
[
k
].
type
==
'object'
&&
Object
.
keys
(
obj
.
properties
[
k
].
properties
).
length
)
{
if
(
obj
.
properties
[
k
].
type
==
'object'
&&
Object
.
keys
(
obj
.
properties
[
k
].
properties
).
length
)
{
console
.
log
(
0
)
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
properties
[
k
].
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
properties
[
k
].
properties
);
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
properties
[
k
].
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
properties
[
k
].
properties
);
}
}
if
(
obj
.
properties
[
k
].
type
==
'array'
&&
Object
.
keys
(
obj
.
properties
[
k
].
items
.
properties
).
length
)
{
if
(
obj
.
properties
[
k
].
type
==
'array'
&&
Object
.
keys
(
obj
.
properties
[
k
].
items
.
properties
).
length
)
{
console
.
log
(
1
,
obj
.
isRootKey
,
obj
.
isRootKey
?
2
:
3
)
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
properties
[
k
].
items
.
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
properties
[
k
].
items
.
properties
);
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
properties
[
k
].
items
.
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
properties
[
k
].
items
.
properties
);
}
}
}
}
...
@@ -152,6 +154,7 @@ export default {
...
@@ -152,6 +154,7 @@ export default {
if
(
obj
.
items
.
properties
[
key
].
type
==
'object'
&&
Object
.
keys
(
obj
.
items
.
properties
[
key
].
properties
).
length
)
{
if
(
obj
.
items
.
properties
[
key
].
type
==
'object'
&&
Object
.
keys
(
obj
.
items
.
properties
[
key
].
properties
).
length
)
{
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
items
.
properties
[
key
].
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
items
.
properties
[
key
].
properties
);
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
items
.
properties
[
key
].
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
items
.
properties
[
key
].
properties
);
}
}
console
.
log
(
obj
.
items
.
properties
[
key
].
properties
)
if
(
obj
.
items
.
properties
[
key
].
type
==
'array'
&&
Object
.
keys
(
obj
.
items
.
properties
[
key
].
properties
).
length
)
{
if
(
obj
.
items
.
properties
[
key
].
type
==
'array'
&&
Object
.
keys
(
obj
.
items
.
properties
[
key
].
properties
).
length
)
{
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
items
.
properties
[
key
].
items
.
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
items
.
properties
[
key
].
items
.
properties
);
obj
.
isRootKey
?
await
that
.
checkArrObjData
(
obj
.
items
.
properties
[
key
].
items
.
properties
)
:
await
that
.
checkArrObjFalse
(
obj
.
items
.
properties
[
key
].
items
.
properties
);
}
}
...
@@ -167,11 +170,13 @@ export default {
...
@@ -167,11 +170,13 @@ export default {
item
[
k
].
isRootKeyFlag
=
true
;
item
[
k
].
isRootKeyFlag
=
true
;
await
that
.
checkArrObjData
(
item
[
k
].
properties
);
await
that
.
checkArrObjData
(
item
[
k
].
properties
);
}
}
console
.
log
(
'true:'
,
item
[
k
])
if
(
item
[
k
].
type
==
'array'
&&
Object
.
keys
(
item
[
k
].
items
.
properties
).
length
)
{
if
(
item
[
k
].
type
==
'array'
&&
Object
.
keys
(
item
[
k
].
items
.
properties
).
length
)
{
item
[
k
].
isRootKeyFlag
=
true
;
item
[
k
].
isRootKeyFlag
=
true
;
await
that
.
checkArrObjData
(
item
[
k
].
items
.
properties
);
await
that
.
checkArrObjData
(
item
[
k
].
items
.
properties
);
}
}
}
}
that
.
$forceUpdate
();
},
},
async
checkArrObjFalse
(
item
)
{
async
checkArrObjFalse
(
item
)
{
const
that
=
this
;
const
that
=
this
;
...
@@ -179,13 +184,15 @@ export default {
...
@@ -179,13 +184,15 @@ export default {
item
[
k
].
isRootKeyFlag
=
false
;
item
[
k
].
isRootKeyFlag
=
false
;
if
(
item
[
k
].
type
==
'object'
&&
Object
.
keys
(
item
[
k
].
properties
).
length
)
{
if
(
item
[
k
].
type
==
'object'
&&
Object
.
keys
(
item
[
k
].
properties
).
length
)
{
item
[
k
].
isRootKeyFlag
=
false
;
item
[
k
].
isRootKeyFlag
=
false
;
await
that
.
checkArrObj
Data
(
item
[
k
].
properties
);
await
that
.
checkArrObj
False
(
item
[
k
].
properties
);
}
}
console
.
log
(
'false:'
,
item
[
k
])
if
(
item
[
k
].
type
==
'array'
&&
Object
.
keys
(
item
[
k
].
items
.
properties
).
length
)
{
if
(
item
[
k
].
type
==
'array'
&&
Object
.
keys
(
item
[
k
].
items
.
properties
).
length
)
{
item
[
k
].
isRootKeyFlag
=
tru
e
;
item
[
k
].
isRootKeyFlag
=
fals
e
;
await
that
.
checkArrObj
Data
(
item
[
k
].
items
.
properties
);
await
that
.
checkArrObj
False
(
item
[
k
].
items
.
properties
);
}
}
}
}
that
.
$forceUpdate
();
},
},
/**
/**
* 处理
* 处理
...
...
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