@sunny-base-web/effects 0.8.27 → 0.8.29
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/dist/index.d.ts +23 -0
- package/dist/index.js +5 -5
- package/dist/index.mjs +444 -429
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -3153,6 +3153,18 @@ declare interface UseTableOptions {
|
|
|
3153
3153
|
gridEvents?: Record<string, (...args: any[]) => any>;
|
|
3154
3154
|
}
|
|
3155
3155
|
|
|
3156
|
+
/**
|
|
3157
|
+
* 用户信息便捷访问 Hook
|
|
3158
|
+
*
|
|
3159
|
+
* 封装 userStore + accessStore,提供常用用户属性和 token 的 computed 快捷访问
|
|
3160
|
+
*
|
|
3161
|
+
* @example
|
|
3162
|
+
* const { code, name, token } = useUser()
|
|
3163
|
+
* console.log(code.value) // 'EMP001'
|
|
3164
|
+
* console.log(token.value) // 'eyJhbGci...'
|
|
3165
|
+
*/
|
|
3166
|
+
export declare function useUser(): UseUserReturn;
|
|
3167
|
+
|
|
3156
3168
|
/**
|
|
3157
3169
|
* 获取用户资源
|
|
3158
3170
|
* @param cModnumb - 模块编号
|
|
@@ -3168,6 +3180,17 @@ export declare function useUserResources(cModnumb: string): {
|
|
|
3168
3180
|
fetchResources: () => Promise<void>;
|
|
3169
3181
|
};
|
|
3170
3182
|
|
|
3183
|
+
declare interface UseUserReturn {
|
|
3184
|
+
code: ComputedRef<string>;
|
|
3185
|
+
name: ComputedRef<string>;
|
|
3186
|
+
roles: ComputedRef<string[]>;
|
|
3187
|
+
isSuperAdmin: ComputedRef<boolean>;
|
|
3188
|
+
homePath: ComputedRef<string>;
|
|
3189
|
+
agent: ComputedRef<Record<string, any> | undefined>;
|
|
3190
|
+
userInfo: ComputedRef<any>;
|
|
3191
|
+
token: ComputedRef<string | null>;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3171
3194
|
/**
|
|
3172
3195
|
* 弱密码项
|
|
3173
3196
|
*/
|