Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
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
shenshaokai
jinfa-admin
Commits
f04b5e03
Commit
f04b5e03
authored
Sep 27, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改flex-layout问题
parent
54cfe19f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
app.tsx
src/app.tsx
+4
-4
FlexLayout.tsx
src/pages/content/components/FilterTable/FlexLayout.tsx
+5
-5
infomationInfo.tsx
src/pages/content/infomation/infomationInfo.tsx
+1
-5
No files found.
src/app.tsx
View file @
f04b5e03
...
...
@@ -85,10 +85,10 @@ export function render(oldRender:Function) {
export
function
onRouteChange
({
routes
,
matchedRoutes
,
location
,
action
})
{
console
.
log
(
'onRouteChange'
)
if
(
isDev
)
{
console
.
log
(
'dev'
)
return
;
}
//
if (isDev) {
//
console.log('dev')
//
return;
//
}
if
(
whiteLists
.
includes
(
location
.
pathname
))
{
return
...
...
src/pages/content/components/FilterTable/FlexLayout.tsx
View file @
f04b5e03
...
...
@@ -2,7 +2,7 @@ import React from 'react';
import
{
Row
,
Col
}
from
'antd'
;
import
{
SchemaField
}
from
"@formily/antd"
;
const
renderCol
=
(
schema
,
isLast
)
=>
{
const
renderCol
=
(
schema
)
=>
{
const
{
flexcol
=
{},
}
=
schema
&&
schema
[
'x-component-props'
]
||
{};
const
flexProps
=
schema
[
'x-flex-props'
]
||
{}
return
<
Col
{
...
flexcol
}
{
...
flexProps
}
key=
{
schema
.
path
}
>
...
...
@@ -10,12 +10,12 @@ const renderCol = (schema, isLast) => {
</
Col
>
}
const
FlexRowLayout
=
(
props
)
=>
{
const
childProperties
=
props
.
schema
.
getOrderProperties
()
const
childProperties
=
props
.
schema
&&
props
.
schema
.
getOrderProperties
()
const
{
justify
=
"start"
,
align
=
"top"
}
=
props
.
props
[
'x-component-props'
]
||
{}
return
(
<
Row
justify=
{
justify
}
align=
{
align
}
>
{
childProperties
.
map
((
v
,
i
,
arr
)
=>
renderCol
(
v
.
schema
,
arr
.
length
-
1
===
i
))
childProperties
.
map
((
v
,
i
,
arr
)
=>
renderCol
(
v
.
schema
))
}
</
Row
>
)
...
...
@@ -23,13 +23,13 @@ const FlexRowLayout = (props) => {
FlexRowLayout
.
isVirtualFieldComponent
=
true
const
FlexColumnLayoutStyle
=
{
'display'
:
'flex'
,
'flexDirection'
:
'column'
}
const
FlexColumnLayout
=
(
props
)
=>
{
const
childProperties
=
props
.
schema
.
getOrderProperties
()
const
childProperties
=
props
.
schema
&&
props
.
schema
.
getOrderProperties
();
console
.
log
(
"childProperties"
,
childProperties
)
const
{
style
}
=
props
.
props
[
'x-component-props'
]
||
{};
return
(
...
...
src/pages/content/infomation/infomationInfo.tsx
View file @
f04b5e03
...
...
@@ -44,9 +44,7 @@ const InfomationInfo = () => {
const
columns
=
res
.
data
.
map
((
item
)
=>
({
label
:
item
.
name
,
value
:
item
.
id
}));
setFormStatus
(
"layout.columnId"
,
"options"
,
columns
)
}
// if(!preview) {
getColumn
()
// }
},
[])
useEffect
(()
=>
{
...
...
@@ -55,10 +53,8 @@ const InfomationInfo = () => {
const
labels
=
res
.
data
.
map
((
item
)
=>
({
label
:
item
.
name
,
value
:
item
.
id
}));
setFormStatus
(
"layout.labelIds"
,
"dataSource"
,
labels
)
}
// if(!preview) {
getLabels
()
// }
})
},
[])
useEffect
(()
=>
{
const
data
=
initialValues
.
data
||
{}
...
...
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