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
f698043e
Commit
f698043e
authored
Nov 24, 2022
by
武广
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改类型和类目之后清空属性
parent
5e272f2d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
FormAttr.jsx
src/pages/ServiceGoods/components/FormAttr.jsx
+6
-0
index.jsx
src/pages/ServiceGoods/index.jsx
+1
-0
No files found.
src/pages/ServiceGoods/components/FormAttr.jsx
View file @
f698043e
...
@@ -92,6 +92,9 @@ const FormAttr = forwardRef((props, ref) => {
...
@@ -92,6 +92,9 @@ const FormAttr = forwardRef((props, ref) => {
setInitAttrData
(
initValue
.
initValue
);
setInitAttrData
(
initValue
.
initValue
);
setCategoryAttrs
(
res
.
data
);
setCategoryAttrs
(
res
.
data
);
});
});
}
else
{
setInitAttrData
({});
setCategoryAttrs
([]);
}
}
};
};
...
@@ -163,6 +166,9 @@ const FormAttr = forwardRef((props, ref) => {
...
@@ -163,6 +166,9 @@ const FormAttr = forwardRef((props, ref) => {
const
ids
=
props
.
categoryIds
;
const
ids
=
props
.
categoryIds
;
if
(
ids
&&
ids
.
length
)
{
if
(
ids
&&
ids
.
length
)
{
getAttribute
(
ids
[
ids
.
length
-
1
]);
getAttribute
(
ids
[
ids
.
length
-
1
]);
}
else
{
setInitAttrData
({});
setCategoryAttrs
([]);
}
}
},
[
props
.
categoryIds
]);
},
[
props
.
categoryIds
]);
...
...
src/pages/ServiceGoods/index.jsx
View file @
f698043e
...
@@ -66,6 +66,7 @@ const ServiceGoods = options => {
...
@@ -66,6 +66,7 @@ const ServiceGoods = options => {
const
productChange
=
task
=>
{
const
productChange
=
task
=>
{
setProductType
(
task
.
type
);
setProductType
(
task
.
type
);
setCategoryIds
([]);
const
timer
=
setTimeout
(()
=>
{
const
timer
=
setTimeout
(()
=>
{
resetForm
();
resetForm
();
clearTimeout
(
timer
);
clearTimeout
(
timer
);
...
...
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