tree组件初步优化

This commit is contained in:
禺狨 2023-03-21 14:38:50 +08:00
parent 0f5e7fd9c1
commit 092cf2f69e
3 changed files with 7 additions and 20 deletions

View File

@ -30,12 +30,7 @@ export const TreeCategory = (props: PropInterface) => {
if (props.type === "no-cate") {
new_arr.unshift({
key: 0,
title: (
<>
<span></span>
<span className="tree-num">{props.categoryCount[0] || 0}</span>
</>
),
title: "未分类",
});
}
@ -51,9 +46,6 @@ export const TreeCategory = (props: PropInterface) => {
let name = (
<>
<span className="tree-title-elli">{categories[id][i].name}</span>
<span className="tree-num">
{props.categoryCount[categories[id][i].id] || 0}
</span>
</>
);
arr.push({
@ -64,9 +56,6 @@ export const TreeCategory = (props: PropInterface) => {
let name = (
<>
<span className="tree-title-elli">{categories[id][i].name}</span>
<span className="tree-num">
{props.categoryCount[categories[id][i].id] || 0}
</span>
</>
);
const new_arr: Option[] = checkArr(categories, categories[id][i].id);
@ -112,7 +101,6 @@ export const TreeCategory = (props: PropInterface) => {
>
<div className="j-b-flex">
<span>{props.text}</span>
<span className="tree-num-total">{props.resourceTotal}</span>
</div>
</div>
<Tree

View File

@ -116,13 +116,12 @@ export const UploadImageButton = (props: PropsInterface) => {
></UploadImageSub>
</Col>
</Row>
<div className="image-list-box">
{imageList.length === 0 && (
<Col span={24}>
<Empty description="暂无图片" />
</Col>
)}
<div className="image-list-box">
{imageList.map((item) => (
<div
key={item.id}

View File

@ -519,7 +519,7 @@ textarea.ant-input {
}
.tree-title-elli {
max-width: 100px;
width: 100%;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;