fix: 使用Tree替换原有VbenTree
This commit is contained in:
@@ -4,7 +4,7 @@ import type { SystemRoleApi } from '#/api/system/role';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
||||
import { Tree, useVbenModal } from '@vben/common-ui';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import { NCheckbox } from 'naive-ui';
|
||||
@@ -136,9 +136,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||
<Modal title="数据权限" class="w-[40%]">
|
||||
<Form class="mx-4">
|
||||
<template #dataScopeDeptIds="slotProps">
|
||||
<!-- <Spin :spinning="deptLoading"> -->
|
||||
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
||||
<VbenTree
|
||||
<Tree
|
||||
:tree-data="deptTree"
|
||||
multiple
|
||||
bordered
|
||||
@@ -149,7 +147,6 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||
:auto-check-parent="false"
|
||||
:check-strictly="!isCheckStrictly"
|
||||
/>
|
||||
<!-- </Spin> -->
|
||||
</template>
|
||||
</Form>
|
||||
<template #prepend-footer>
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { SystemRoleApi } from '#/api/system/role';
|
||||
|
||||
import { ref } from 'vue';
|
||||
|
||||
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
||||
import { Tree, useVbenModal } from '@vben/common-ui';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import { NCheckbox } from 'naive-ui';
|
||||
@@ -127,9 +127,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||
<Modal title="数据权限" class="w-[40%]">
|
||||
<Form class="mx-4">
|
||||
<template #menuIds="slotProps">
|
||||
<!-- <Spin :spinning="menuLoading" class="w-full"> -->
|
||||
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
||||
<VbenTree
|
||||
<Tree
|
||||
:tree-data="menuTree"
|
||||
multiple
|
||||
bordered
|
||||
@@ -138,7 +136,6 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||
value-field="id"
|
||||
label-field="name"
|
||||
/>
|
||||
<!-- </Spin> -->
|
||||
</template>
|
||||
</Form>
|
||||
<template #prepend-footer>
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { SystemTenantPackageApi } from '#/api/system/tenant-package';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
||||
import { Tree, useVbenModal } from '@vben/common-ui';
|
||||
import { handleTree } from '@vben/utils';
|
||||
|
||||
import { NCheckbox } from 'naive-ui';
|
||||
@@ -135,8 +135,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||
<Modal :title="getTitle" class="w-[40%]">
|
||||
<Form class="mx-6">
|
||||
<template #menuIds="slotProps">
|
||||
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
||||
<VbenTree
|
||||
<Tree
|
||||
class="max-h-[400px] overflow-y-auto"
|
||||
:loading="menuLoading"
|
||||
:tree-data="menuTree"
|
||||
|
||||
Reference in New Issue
Block a user