|
|
@ -1,5 +1,6 @@ |
|
|
|
<template> |
|
|
|
<a-spin :spinning="treeState.loading"> |
|
|
|
<div class="ns-tree-container"> |
|
|
|
<div class="ns-tree-form"> |
|
|
|
<div v-if="header" class="ns-tree-title"> |
|
|
|
<ns-icon :name="header.icon" size="14" /> |
|
|
@ -10,7 +11,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="min-height: 150px; overflow-y: scroll"> |
|
|
|
<div style="min-height: 150px"> |
|
|
|
<ns-tree v-if="treeData?.length" v-bind="getBindValue" v-model:selectedKeys="selectedKeys"> |
|
|
|
<template #[item]="data" v-for="(item, index) in Object.keys($slots)" :key="index"> |
|
|
|
<slot :name="item" v-bind="{ ...data, formModel } || {}"></slot> |
|
|
@ -18,6 +19,7 @@ |
|
|
|
</ns-tree> |
|
|
|
<!-- <a-empty v-if="!treeData?.length" /> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-spin> |
|
|
|
</template> |
|
|
|
<script lang="ts" setup> |
|
|
@ -150,4 +152,12 @@ |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.ns-tree-container { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
&:last-child { |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|