提交 994e30cc 作者: 翁进城

新增子分类修复

上级 22f1d493
...@@ -129,7 +129,7 @@ const Category: FC = (props: any) => { ...@@ -129,7 +129,7 @@ const Category: FC = (props: any) => {
render: (text: string, record: categoryEntity, index: number) => { render: (text: string, record: categoryEntity, index: number) => {
return ( return (
<div className='table-option-wrap'> <div className='table-option-wrap'>
{record.children?.length > 0 ? ( {record.level == 1 ? (
<> <>
{btnAddChildCgy ? ( {btnAddChildCgy ? (
<Button <Button
...@@ -418,7 +418,7 @@ const Category: FC = (props: any) => { ...@@ -418,7 +418,7 @@ const Category: FC = (props: any) => {
}; };
// 新增子分类 // 新增子分类
const sureAddChildrenCgy = (record: categoryEntity) => { const sureAddChildrenCgy = (record: categoryEntity) => {
let pid: string | number = -1; let pid: string | number;
categoryList.map((item: categoryEntity) => { categoryList.map((item: categoryEntity) => {
if (item.children && item.children.length != 0) { if (item.children && item.children.length != 0) {
const bol: boolean = item.children.some( const bol: boolean = item.children.some(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论