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