Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xform
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
田翔
xform
Commits
f8cb45b3
Commit
f8cb45b3
authored
Dec 24, 2024
by
杨子龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- 增加自定义组件传入
parent
3bf8eda9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
index.js
src/core/FormRender/index.js
+10
-3
No files found.
src/core/FormRender/index.js
View file @
f8cb45b3
...
...
@@ -7,7 +7,7 @@
import
React
,
{
useMemo
,
useContext
,
forwardRef
,
useImperativeHandle
,
useState
,
useEffect
}
from
'react'
import
FormRender
,
{
useForm
}
from
'form-render'
import
{
ConfigProvider
,
Spin
}
from
'antd'
import
w
idgets
from
'../widgets'
import
baseW
idgets
from
'../widgets'
import
{
isObject
,
getFieldInfo
}
from
'../../utils'
import
{
getWatch
}
from
'./watch'
import
styles
from
'../../main.less'
...
...
@@ -28,7 +28,7 @@ const XRender = (props, ref) => {
}
))
const
{
schemaValues
,
disabledFields
,
disabled
,
codes
,
env
,
firstCall
}
=
props
const
{
schemaValues
,
disabledFields
,
disabled
,
codes
,
env
,
firstCall
,
widgets
=
{}
}
=
props
window
.
pandaXform
=
{
codes
,
env
,
...
...
@@ -184,6 +184,13 @@ const XRender = (props, ref) => {
window
.
tableLocal
=
[]
},
[])
const
widgetsObj
=
{
...
baseWidgets
,
...
widgets
}
console
.
log
(
widgets
);
return
(
<
div
className
=
{
styles
.
formRender
}
>
<
FormRender
...
...
@@ -194,7 +201,7 @@ const XRender = (props, ref) => {
mapping
=
{{
object
:
'Header'
,
}}
widgets
=
{
widgets
}
widgets
=
{
widgets
Obj
}
watch
=
{
watch
}
onMount
=
{
onMount
}
/
>
...
...
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