Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
merchant-manage-ui
Commits
95a0b54e
Commit
95a0b54e
authored
Oct 20, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 添加超出折叠显示
parent
9939024c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
52 deletions
+96
-52
index.jsx
src/pages/GoodsManage/createModal/index.jsx
+80
-52
service.js
src/pages/GoodsManage/service.js
+9
-0
style.less
src/pages/GoodsManage/style.less
+7
-0
No files found.
src/pages/GoodsManage/createModal/index.jsx
View file @
95a0b54e
...
...
@@ -2,7 +2,13 @@
import
{
Form
}
from
'
@ant-design/compatible
'
;
import
'
@ant-design/compatible/assets/index.css
'
;
import
{
MinusCircleOutlined
,
PlusOutlined
,
RestOutlined
}
from
'
@ant-design/icons
'
;
import
{
MinusCircleOutlined
,
PlusOutlined
,
RestOutlined
,
DownOutlined
,
UpOutlined
,
}
from
'
@ant-design/icons
'
;
import
{
Modal
,
Table
,
...
...
@@ -234,7 +240,9 @@ class goodsManage extends Component {
treeChange
=
value
=>
{
const
cid
=
value
[
value
.
length
-
1
];
this
.
setState
({
categoryId
:
cid
,
initCascader
:
value
});
if
(
value
.
length
===
3
)
{
this
.
getAttribute
(
cid
);
}
};
remove
=
(
flag
,
k
)
=>
{
...
...
@@ -842,6 +850,10 @@ class goodsManage extends Component {
{
/* 商品属性 */
}
<
Card
className=
{
styles
.
card
}
bordered=
{
false
}
>
<
div
className=
{
styles
.
cardTitle
}
>
商品属性
</
div
>
<
div
className=
{
styles
.
attrbox
+
(
this
.
state
.
isMore
?
styles
.
attrboxMore
:
''
)
}
more=
{
this
.
state
.
isMore
}
>
<
Row
>
{
this
.
state
.
categoryAttrs
.
length
>
0
&&
this
.
state
.
categoryAttrs
.
map
((
k
,
i
)
=>
(
...
...
@@ -892,6 +904,22 @@ class goodsManage extends Component {
</
Col
>
))
}
</
Row
>
</
div
>
{
this
.
state
.
categoryAttrs
.
length
>
12
&&
(
<
div
>
<
Button
type=
"link"
onClick=
{
()
=>
this
.
setState
(
state
=>
({
isMore
:
!
state
.
isMore
,
}))
}
>
{
this
.
state
.
isMore
?
'
收起
'
:
'
展示更多
'
}
{
this
.
state
.
isMore
?
<
UpOutlined
/>
:
<
DownOutlined
/>
}
</
Button
>
</
div
>
)
}
{
skuOldAttr
.
length
>
0
&&
(
<
div
>
<
Row
>
注:以下商品属性已失效,请使用新的属性
</
Row
>
...
...
src/pages/GoodsManage/service.js
View file @
95a0b54e
...
...
@@ -87,6 +87,15 @@ export async function categoryList() {
prefix
:
goodsApi
,
});
}
/**
* 商品分类
* type 商品类型:1-实物类,2-虚拟类,4-服务类
* */
export
async
function
apiCategoryListType
(
type
)
{
return
request
.
get
(
`/product/category/getByProductType/
${
type
}
`
,
{
prefix
:
goodsApi
,
});
}
// 批量修改
export
async
function
uploadFile
(
file
)
{
...
...
src/pages/GoodsManage/style.less
View file @
95a0b54e
...
...
@@ -119,3 +119,10 @@
color: #1890ff;
cursor: pointer;
}
.attrbox {
max-height: 384px;
overflow: hidden;
}
.attrboxMore {
max-height: max-content;
}
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