refactor: 重构数据权限 - 部门分配组件

This commit is contained in:
dap
2025-10-24 16:05:04 +08:00
parent a986e1a2ab
commit a38cf80ea4
4 changed files with 199 additions and 189 deletions

View File

@@ -0,0 +1,27 @@
import { defineComponent, h } from 'vue';
/**
* 使用默认插槽来自定义组件
* 给vbenForm的components使用
*/
export const DefaultSlot = defineComponent({
name: 'DefaultSlot',
inheritAttrs: false,
props: {
/**
* 绑定到根节点的div上的属性
*/
rootDivAttrs: {
type: Object,
default: () => ({}),
},
},
render() {
/**
* 获取属性 传递给作用域插槽供外部使用
*/
const attrs = this.$attrs;
return h('div', { ...this.rootDivAttrs }, this.$slots.default?.(attrs));
},
});