diff --git a/src/compenents/tree-category/index.tsx b/src/compenents/tree-category/index.tsx index d912b37..a4bb1a3 100644 --- a/src/compenents/tree-category/index.tsx +++ b/src/compenents/tree-category/index.tsx @@ -31,12 +31,10 @@ export const TreeCategory = (props: PropInterface) => { new_arr.unshift({ key: 0, title: ( -
- 未分类 - - ({props.categoryCount[0] || 0}) - -
+ <> + 未分类 + {props.categoryCount[0] || 0} + ), }); } @@ -51,12 +49,12 @@ export const TreeCategory = (props: PropInterface) => { for (let i = 0; i < categories[id].length; i++) { if (!categories[categories[id][i].id]) { let name = ( -
- {categories[id][i].name} + <> + {categories[id][i].name} - ({props.categoryCount[categories[id][i].id] || 0}) + {props.categoryCount[categories[id][i].id] || 0} -
+ ); arr.push({ title: name, @@ -64,12 +62,12 @@ export const TreeCategory = (props: PropInterface) => { }); } else { let name = ( -
- {categories[id][i].name} + <> + {categories[id][i].name} - ({props.categoryCount[categories[id][i].id] || 0}) + {props.categoryCount[categories[id][i].id] || 0} -
+ ); const new_arr: Option[] = checkArr(categories, categories[id][i].id); arr.push({ @@ -112,8 +110,10 @@ export const TreeCategory = (props: PropInterface) => { onSelect([], ""); }} > - 全部{props.text} - ({props.resourceTotal}) +
+ 全部{props.text} + {props.resourceTotal} +
.ant-btn-default:hover { color: #ff4d4f !important; @@ -504,7 +498,24 @@ textarea.ant-input { } .tree-num { + width: auto; + display: block; color: rgba(0, 0, 0, 0.45); + margin-right: 4px; +} + +.tree-num-total { + width: auto; + display: block; + color: rgba(0, 0, 0, 0.45); + margin-right: 8px; +} + +.tree-title-elli { + max-width:100px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .ant-tabs {