fix: 去掉spin,影响占位
parent
059687e1f5
commit
c5774bb1b2
|
@ -7,7 +7,7 @@ import { ref } from 'vue';
|
||||||
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
||||||
import { handleTree } from '@vben/utils';
|
import { handleTree } from '@vben/utils';
|
||||||
|
|
||||||
import { Checkbox, message, Spin } from 'ant-design-vue';
|
import { Checkbox, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { getDeptList } from '#/api/system/dept';
|
import { getDeptList } from '#/api/system/dept';
|
||||||
|
@ -28,6 +28,13 @@ const isCheckStrictly = ref(true); // 父子联动状态
|
||||||
const expandedKeys = ref<number[]>([]); // 展开的节点
|
const expandedKeys = ref<number[]>([]); // 展开的节点
|
||||||
|
|
||||||
const [Form, formApi] = useVbenForm({
|
const [Form, formApi] = useVbenForm({
|
||||||
|
commonConfig: {
|
||||||
|
componentProps: {
|
||||||
|
class: 'w-full',
|
||||||
|
},
|
||||||
|
formItemClass: 'col-span-2',
|
||||||
|
labelWidth: 80,
|
||||||
|
},
|
||||||
layout: 'horizontal',
|
layout: 'horizontal',
|
||||||
schema: useAssignDataPermissionFormSchema(),
|
schema: useAssignDataPermissionFormSchema(),
|
||||||
showDefaultActions: false,
|
showDefaultActions: false,
|
||||||
|
@ -128,10 +135,10 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Modal title="数据权限">
|
<Modal title="数据权限" class="w-[40%]">
|
||||||
<Form class="mx-4">
|
<Form class="mx-4">
|
||||||
<template #dataScopeDeptIds="slotProps">
|
<template #dataScopeDeptIds="slotProps">
|
||||||
<Spin :spinning="deptLoading" class="w-full">
|
<!-- <Spin :spinning="deptLoading"> -->
|
||||||
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
||||||
<VbenTree
|
<VbenTree
|
||||||
:tree-data="deptTree"
|
:tree-data="deptTree"
|
||||||
|
@ -144,7 +151,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||||
:auto-check-parent="false"
|
:auto-check-parent="false"
|
||||||
:check-strictly="!isCheckStrictly"
|
:check-strictly="!isCheckStrictly"
|
||||||
/>
|
/>
|
||||||
</Spin>
|
<!-- </Spin> -->
|
||||||
</template>
|
</template>
|
||||||
</Form>
|
</Form>
|
||||||
<template #prepend-footer>
|
<template #prepend-footer>
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { ref } from 'vue';
|
||||||
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
import { useVbenModal, VbenTree } from '@vben/common-ui';
|
||||||
import { handleTree } from '@vben/utils';
|
import { handleTree } from '@vben/utils';
|
||||||
|
|
||||||
import { Checkbox, message, Spin } from 'ant-design-vue';
|
import { Checkbox, message } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { getMenuList } from '#/api/system/menu';
|
import { getMenuList } from '#/api/system/menu';
|
||||||
|
@ -120,10 +120,10 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Modal title="数据权限">
|
<Modal title="数据权限" class="w-[40%]">
|
||||||
<Form class="mx-4">
|
<Form class="mx-4">
|
||||||
<template #menuIds="slotProps">
|
<template #menuIds="slotProps">
|
||||||
<Spin :spinning="menuLoading" class="w-full">
|
<!-- <Spin :spinning="menuLoading" class="w-full"> -->
|
||||||
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
<!-- TODO @芋艿:可优化,使用 antd 的 tree?原因是,更原生 -->
|
||||||
<VbenTree
|
<VbenTree
|
||||||
:tree-data="menuTree"
|
:tree-data="menuTree"
|
||||||
|
@ -134,7 +134,7 @@ function getAllNodeIds(nodes: any[], ids: number[] = []): number[] {
|
||||||
value-field="id"
|
value-field="id"
|
||||||
label-field="name"
|
label-field="name"
|
||||||
/>
|
/>
|
||||||
</Spin>
|
<!-- </Spin> -->
|
||||||
</template>
|
</template>
|
||||||
</Form>
|
</Form>
|
||||||
<template #prepend-footer>
|
<template #prepend-footer>
|
||||||
|
|
Loading…
Reference in New Issue