mirror of https://github.com/halo-dev/halo-admin
Add category tree component in CategoryList
parent
3778b04025
commit
5c5c9b5cee
|
@ -54,9 +54,9 @@
|
||||||
:md="14"
|
:md="14"
|
||||||
:sm="24"
|
:sm="24"
|
||||||
:xs="24"
|
:xs="24"
|
||||||
:style="{ 'padding-bottom': '12px' }"
|
:style="{ 'padding-bottom': '1rem' }"
|
||||||
>
|
>
|
||||||
<a-card title="所有分类">
|
<a-card title="分类列表">
|
||||||
<a-table
|
<a-table
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="categories"
|
:dataSource="categories"
|
||||||
|
@ -91,6 +91,12 @@
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<a-card
|
||||||
|
title="分类树"
|
||||||
|
class="category-tree"
|
||||||
|
>
|
||||||
|
<category-tree :categories="categories" />
|
||||||
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,6 +104,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CategorySelectTree from './components/CategorySelectTree'
|
import CategorySelectTree from './components/CategorySelectTree'
|
||||||
|
import CategoryTree from './components/CategoryTree'
|
||||||
import categoryApi from '@/api/category'
|
import categoryApi from '@/api/category'
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
|
@ -124,7 +131,7 @@ const columns = [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
components: { CategorySelectTree },
|
components: { CategorySelectTree, CategoryTree },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
categories: [],
|
categories: [],
|
||||||
|
@ -162,5 +169,8 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<sty\le scoped>
|
||||||
|
.category-tree {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue