@xdmp-open/ui-admin 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @xdmp-open/ui-admin
2
2
 
3
+ ## 0.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 租户台支持宿主注入 `tenantMode`:私有化(single)隐藏代入入口与代入提示条、页面文案改为「根租户信息维护」;缺省 saas 行为不变。
8
+
3
9
  ## 0.1.9
4
10
 
5
11
  ### Patch Changes
package/dist/context.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface AdminUiHost {
9
9
  getRoles?: () => string[];
10
10
  /** 当前用户手机号(对应 store.state.user.mobilePhone,加密存储原值,页面自行 Encrypt.randomDecode) */
11
11
  getMobilePhone?: () => string;
12
- /** 权限判定(对应 utils/permission 的 checkPermission:任一角色命中即 true) */
12
+ /** 权限判定(对应 utils/permission 的 checkPermission:任一角色命中即返回 true) */
13
13
  hasPermission?: (roles: string[]) => boolean;
14
14
  /** 登出(对应 dispatch('user/logout'):清 token 并跳登录页) */
15
15
  logout?: () => Promise<void> | void;
@@ -17,6 +17,11 @@ export interface AdminUiHost {
17
17
  refreshUserInfo?: (account: string) => Promise<void> | void;
18
18
  /** 重新生成动态路由(对应 dispatch('permission/generateRoutes', data)) */
19
19
  regenerateRoutes?: (data: unknown) => Promise<void> | void;
20
+ /**
21
+ * 租户运行时模式(single=私有化 / saas=逻辑隔离多租户)。
22
+ * 缺省按 saas(存量宿主行为不变);私有化宿主传 'single' 以隐藏代入等 SaaS 专属能力。
23
+ */
24
+ tenantMode?: 'single' | 'saas';
20
25
  }
21
26
  /** setupAdminUi 配置 */
22
27
  export interface AdminUiOptions extends AdminUiHost {
@@ -41,6 +46,11 @@ export declare function getCurrentUsername(): string;
41
46
  export declare function getCurrentRoles(): string[];
42
47
  /** 当前用户手机号(加密存储原值) */
43
48
  export declare function getCurrentMobilePhone(): string;
49
+ /**
50
+ * 租户运行时模式(宿主注入;缺省 saas,保持存量宿主行为)。
51
+ * 私有化(single)下隐藏代入等 SaaS 专属能力。
52
+ */
53
+ export declare function getTenantMode(): 'single' | 'saas';
44
54
  /** 权限判定(对齐 checkPermission:任一角色命中;未注入时返回 true 不阻断展示) */
45
55
  export declare function checkPermission(roles: string[]): boolean;
46
56
  /** 登出(先清除运营方代入,避免残留到下一会话) */