mirror of
https://github.com/PlayEdu/backend
synced 2025-07-19 19:19:43 +08:00
tree组件初步优化
This commit is contained in:
parent
0f5e7fd9c1
commit
092cf2f69e
@ -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
|
||||
|
@ -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}
|
||||
|
@ -519,7 +519,7 @@ textarea.ant-input {
|
||||
}
|
||||
|
||||
.tree-title-elli {
|
||||
max-width: 100px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
Loading…
x
Reference in New Issue
Block a user