mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 02:57:09 +08:00
feat(tenant): 新增多租户模块 (#75)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { ref } from 'vue'
|
||||
import type { TreeNodeData } from '@arco-design/web-vue'
|
||||
import { listMenuTree } from '@/apis'
|
||||
import { listTenantPackageMenu } from '@/apis/tenant/tenantPackage'
|
||||
|
||||
/** 菜单模块 */
|
||||
export function useMenu(options?: { onSuccess?: () => void }) {
|
||||
@@ -17,5 +18,18 @@ export function useMenu(options?: { onSuccess?: () => void }) {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
return { menuList, getMenuList, loading }
|
||||
|
||||
// 获取租户套餐菜单
|
||||
const getTenantPackageMenuList = async () => {
|
||||
try {
|
||||
loading.value = true
|
||||
const res = await listTenantPackageMenu()
|
||||
menuList.value = res.data
|
||||
options?.onSuccess && options.onSuccess()
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
return { menuList, getMenuList, loading, getTenantPackageMenuList }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user