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
黄庭坚
jinfa-platform
Commits
4bd58fd4
Commit
4bd58fd4
authored
Aug 27, 2020
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补充商品筛选
parent
5124934b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
5 deletions
+84
-5
index.tsx
src/components/ModalTable/index.tsx
+1
-1
SearchSelect.tsx
src/components/NiceForm/components/SearchSelect.tsx
+3
-0
global.less
src/global/styles/global.less
+10
-0
PositionSetting.tsx
src/pages/repositories/components/PositionSetting.tsx
+70
-4
No files found.
src/components/ModalTable/index.tsx
View file @
4bd58fd4
...
@@ -38,7 +38,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
...
@@ -38,7 +38,7 @@ const ModalTable:React.FC<ModalTableProps> = (props) => {
tableType=
'small'
tableType=
'small'
currentRef=
{
selfRef
}
currentRef=
{
selfRef
}
formRender=
{
(
child
,
ps
)
=>
<
Row
justify=
'space-between'
>
formRender=
{
(
child
,
ps
)
=>
<
Row
justify=
'space-between'
>
<
Col
>
{
child
}
</
Col
>
<
Col
span=
{
18
}
>
{
child
}
</
Col
>
<
Col
style=
{
{
marginTop
:
4
}
}
>
{
ps
}
</
Col
>
<
Col
style=
{
{
marginTop
:
4
}
}
>
{
ps
}
</
Col
>
</
Row
>
}
</
Row
>
}
{
...
resetTable
}
{
...
resetTable
}
...
...
src/components/NiceForm/components/SearchSelect.tsx
View file @
4bd58fd4
...
@@ -128,6 +128,9 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
...
@@ -128,6 +128,9 @@ const SearchSelect = (props: ISchemaFieldComponentProps) => {
filterOption=
{
false
}
filterOption=
{
false
}
loading=
{
loading
}
loading=
{
loading
}
options=
{
dataSource
}
options=
{
dataSource
}
getPopupContainer=
{
triggerNode
=>
{
return
triggerNode
}
}
value=
{
props
.
value
}
value=
{
props
.
value
}
dropdownRender=
{
originNode
=>
<
SelectContent
confirm=
{
confirm
}
resetField=
{
resetField
}
parentRef=
{
ref
}
handleChange=
{
handleChange
}
multiple=
{
multiple
}
value=
{
props
.
value
}
>
{
originNode
}
</
SelectContent
>
}
dropdownRender=
{
originNode
=>
<
SelectContent
confirm=
{
confirm
}
resetField=
{
resetField
}
parentRef=
{
ref
}
handleChange=
{
handleChange
}
multiple=
{
multiple
}
value=
{
props
.
value
}
>
{
originNode
}
</
SelectContent
>
}
{
...
multipleProps
}
{
...
multipleProps
}
...
...
src/global/styles/global.less
View file @
4bd58fd4
...
@@ -206,6 +206,8 @@ h6 {
...
@@ -206,6 +206,8 @@ h6 {
}
}
}
}
.tree-node-circle {
.tree-node-circle {
width: 4px;
width: 4px;
height: 4px;
height: 4px;
...
@@ -266,4 +268,11 @@ h6 {
...
@@ -266,4 +268,11 @@ h6 {
position: absolute;
position: absolute;
top: 100%;
top: 100%;
font-size: 12px;
font-size: 12px;
}
// 强制覆盖下拉框固定位置
.fixed-ant-selected-down {
.ant-select-dropdown {
top: 36px !important;
}
}
}
\ No newline at end of file
src/pages/repositories/components/PositionSetting.tsx
View file @
4bd58fd4
...
@@ -15,6 +15,11 @@ import { Button, message } from 'antd'
...
@@ -15,6 +15,11 @@ import { Button, message } from 'antd'
import
NiceForm
from
'@/components/NiceForm'
import
NiceForm
from
'@/components/NiceForm'
import
ModalTable
from
'@/components/ModalTable'
import
ModalTable
from
'@/components/ModalTable'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
GlobalConfig
}
from
'@/global/config'
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
import
SearchSelect
from
'@/components/NiceForm/components/SearchSelect'
import
Search
from
'@/components/NiceForm/components/Search'
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
import
Submit
from
'@/components/NiceForm/components/Submit'
export
interface
PositionSettingProps
{
export
interface
PositionSettingProps
{
addSchemaAction
:
ISchemaFormActions
,
addSchemaAction
:
ISchemaFormActions
,
...
@@ -221,9 +226,59 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
...
@@ -221,9 +226,59 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
properties
:
{
properties
:
{
name
:
{
name
:
{
type
:
'string'
,
type
:
'string'
,
"x-component"
:
'Search'
,
'x-component'
:
'ModalSearch'
,
"x-component-props"
:
{
'x-component-props'
:
{
placeholder
:
'请输入商品名称或者ID'
placeholder
:
'请输入商品名称/ID'
,
align
:
'flex-left'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'flex-layout'
,
'x-component-props'
:
{
rowStyle
:
{
flexWrap
:
'nowrap'
,
style
:
{
marginRight
:
0
}
},
colStyle
:
{
marginTop
:
20
,
},
},
properties
:
{
categoryId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品类'
,
className
:
'fixed-ant-selected-down'
,
// 该类强制将显示的下拉框出现在select下, 只有这里出现问题, ??
fetchSearch
:
PublicApi
.
getProductSelectGetSelectCategory
,
style
:
{
width
:
160
}
}
},
brandId
:
{
type
:
'string'
,
"x-component"
:
'SearchSelect'
,
"x-component-props"
:
{
placeholder
:
'请选择品牌'
,
fetchSearch
:
PublicApi
.
getProductSelectGetSelectBrand
,
style
:
{
width
:
160
}
}
},
submit
:
{
"x-component"
:
'Submit'
,
"x-mega-props"
:
{
span
:
1
},
"x-component-props"
:
{
children
:
'查询'
}
}
}
}
}
}
}
}
...
@@ -282,7 +337,18 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
...
@@ -282,7 +337,18 @@ const PositionSetting:React.FC<PositionSettingProps> = (props) => {
fetchTableData=
{
params
=>
fetchProductList
(
params
)
}
fetchTableData=
{
params
=>
fetchProductList
(
params
)
}
formilyProps=
{
formilyProps=
{
{
{
ctx
:
{
schema
:
formProduct
}
ctx
:
{
schema
:
formProduct
,
components
:
{
ModalSearch
:
Search
,
SearchSelect
,
Submit
}
,
effects
:
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'name'
,
FORM_FILTER_PATH
,
);
}
}
}
}
}
}
tableProps=
{
{
tableProps=
{
{
...
...
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