Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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-platform
Commits
228d5054
Commit
228d5054
authored
Sep 17, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增searchSelect只读状态
parent
b6394fed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
SearchSelect.tsx
src/components/NiceForm/components/SearchSelect.tsx
+5
-1
index.tsx
src/components/NiceForm/index.tsx
+3
-2
No files found.
src/components/NiceForm/components/SearchSelect.tsx
View file @
228d5054
...
...
@@ -26,7 +26,7 @@ const SelectContent = (props) => {
// 自定义搜索型下拉框
const
SearchSelect
=
(
props
:
ISchemaFieldComponentProps
)
=>
{
const
ref
=
useRef
<
any
>
({})
const
{
schema
,
form
,
path
,
mutators
}
=
props
const
{
schema
,
form
,
path
,
mutators
,
editable
}
=
props
const
dataSourceRef
=
useRef
<
any
[]
>
([])
const
pinyinRef
=
useRef
<
any
[]
>
([])
// 可选参数 fetchSearch, select为search
...
...
@@ -62,6 +62,9 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
}
useEffect
(()
=>
{
if
(
!
editable
)
{
return
;
}
setLoading
(
true
)
fetchSearch
({
[
fetchParams
]:
''
...
...
@@ -128,6 +131,7 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
filterOption=
{
false
}
loading=
{
loading
}
options=
{
dataSource
}
disabled=
{
!
editable
}
// getPopupContainer={triggerNode => {
// return triggerNode
// }}
...
...
src/components/NiceForm/index.tsx
View file @
228d5054
...
...
@@ -22,7 +22,7 @@ import CustomRadio from './components/CustomRadio';
import
SearchSelect
from
'./components/SearchSelect'
;
import
TableTagList
from
'./components/TableTagList'
;
import
'./index.less'
import
{
Checkbox
}
from
'@formily/antd-components'
;
import
{
Checkbox
,
Radio
}
from
'@formily/antd-components'
;
import
DateSelect
from
'./components/DateSelect'
;
import
VirtualChildren
from
'./components/VirtualChildren'
import
{
useLinkComponentProps
}
from
'./linkages/linkComponentProps'
;
...
...
@@ -92,7 +92,8 @@ export const componentExport = {
DateRangePicker
:
DatePicker
.
RangePicker
,
TableTagList
,
DateSelect
,
VirtualChildren
VirtualChildren
,
RadioGroup
:
Radio
.
Group
}
const
NiceForm
:
React
.
FC
<
NiceFormProps
>
=
props
=>
{
const
{
children
,
components
,
effects
,
expressionScope
,
...
reset
}
=
props
;
...
...
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