From 2c50668b4a4ecfdbfda2903250644c00a42f423d Mon Sep 17 00:00:00 2001
From: tengge1 <930372551@qq.com>
Date: Tue, 14 May 2019 20:29:04 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=91=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ShadowEditor.UI/src/tree/Tree.jsx | 8 ++++----
ShadowEditor.UI/src/tree/css/Tree.css | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/ShadowEditor.UI/src/tree/Tree.jsx b/ShadowEditor.UI/src/tree/Tree.jsx
index c176a299..35f543c5 100644
--- a/ShadowEditor.UI/src/tree/Tree.jsx
+++ b/ShadowEditor.UI/src/tree/Tree.jsx
@@ -23,18 +23,18 @@ class Tree extends React.Component {
list.push(this.createNode(n));
});
- return
;
+ return ;
}
createNode(data) {
const leaf = !data.children || data.children.length === 0;
- const children = leaf ? null : ({data.children.map(n => {
+ const children = leaf ? null : ({data.children.map(n => {
return this.createNode(n);
})}
);
- return -
+ return
-
{data.text}
- {leaf ? null : }
+ {leaf ? null : children}
;
}
}
diff --git a/ShadowEditor.UI/src/tree/css/Tree.css b/ShadowEditor.UI/src/tree/css/Tree.css
index e69de29b..4b9fe2b6 100644
--- a/ShadowEditor.UI/src/tree/css/Tree.css
+++ b/ShadowEditor.UI/src/tree/css/Tree.css
@@ -0,0 +1,16 @@
+.Tree {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+.Tree .node a {
+ color: #555;
+ text-decoration: none;
+}
+
+.Tree .node .sub {
+ list-style: none;
+ margin: 0;
+ padding: 0 0 0 16px;
+}
\ No newline at end of file