|
@@ -37,9 +37,9 @@ const Category = ({category:{name, _id}, children}) =>
|
|
|
{children}
|
|
|
</div>
|
|
|
|
|
|
-const Categories = ({children}) =>
|
|
|
+const Categories = ({children, data}) =>
|
|
|
<div style={{border: '2px solid', paddingLeft: '20px'}}>
|
|
|
- <h1>categories</h1>
|
|
|
+ <h1>categories({data && data.length})</h1>
|
|
|
{children}
|
|
|
</div>
|
|
|
|
|
@@ -74,7 +74,7 @@ const MetaTest = () => {
|
|
|
|
|
|
return (
|
|
|
<MetaPlate data={data}>
|
|
|
- <Categories>
|
|
|
+ <Categories prop='data'>
|
|
|
<Category prop="category" keyDataKey="_id">
|
|
|
<Goods sourceDataKey="goods">
|
|
|
<Good prop="good" keyDataKey="_id">
|
|
@@ -83,7 +83,7 @@ const MetaTest = () => {
|
|
|
</div>
|
|
|
</Good>
|
|
|
</Goods>
|
|
|
- <Categories sourceDataKey="subCategories" >
|
|
|
+ <Categories sourceDataKey="subCategories" prop='data'>
|
|
|
<Category prop="category" keyDataKey="_id" />
|
|
|
</Categories>
|
|
|
</Category>
|