mirror of
https://github.com/PlayEdu/backend
synced 2025-07-20 10:09:42 +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") {
|
if (props.type === "no-cate") {
|
||||||
new_arr.unshift({
|
new_arr.unshift({
|
||||||
key: 0,
|
key: 0,
|
||||||
title: (
|
title: "未分类",
|
||||||
<>
|
|
||||||
<span>未分类</span>
|
|
||||||
<span className="tree-num">{props.categoryCount[0] || 0}</span>
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,9 +46,6 @@ export const TreeCategory = (props: PropInterface) => {
|
|||||||
let name = (
|
let name = (
|
||||||
<>
|
<>
|
||||||
<span className="tree-title-elli">{categories[id][i].name}</span>
|
<span className="tree-title-elli">{categories[id][i].name}</span>
|
||||||
<span className="tree-num">
|
|
||||||
{props.categoryCount[categories[id][i].id] || 0}
|
|
||||||
</span>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
arr.push({
|
arr.push({
|
||||||
@ -64,9 +56,6 @@ export const TreeCategory = (props: PropInterface) => {
|
|||||||
let name = (
|
let name = (
|
||||||
<>
|
<>
|
||||||
<span className="tree-title-elli">{categories[id][i].name}</span>
|
<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);
|
const new_arr: Option[] = checkArr(categories, categories[id][i].id);
|
||||||
@ -112,7 +101,6 @@ export const TreeCategory = (props: PropInterface) => {
|
|||||||
>
|
>
|
||||||
<div className="j-b-flex">
|
<div className="j-b-flex">
|
||||||
<span>全部{props.text}</span>
|
<span>全部{props.text}</span>
|
||||||
<span className="tree-num-total">{props.resourceTotal}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Tree
|
<Tree
|
||||||
|
@ -116,13 +116,12 @@ export const UploadImageButton = (props: PropsInterface) => {
|
|||||||
></UploadImageSub>
|
></UploadImageSub>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<div className="image-list-box">
|
|
||||||
{imageList.length === 0 && (
|
{imageList.length === 0 && (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<Empty description="暂无图片" />
|
<Empty description="暂无图片" />
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
|
<div className="image-list-box">
|
||||||
{imageList.map((item) => (
|
{imageList.map((item) => (
|
||||||
<div
|
<div
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
@ -519,7 +519,7 @@ textarea.ant-input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tree-title-elli {
|
.tree-title-elli {
|
||||||
max-width: 100px;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user