@campus-admin/core 2.0.1 → 2.0.3
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/README.md +4 -0
- package/dist/i18n.d.ts +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +563 -466
- package/dist/pages/auth/WechatPane.vue.d.ts +4 -1
- package/dist/pages/auth/options.d.ts +1 -0
- package/dist/pages/auth/wechat-host.d.ts +10 -0
- package/dist/services/auth.d.ts +10 -0
- package/dist/services/login.d.ts +8 -0
- package/dist/stores/session.d.ts +13 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +36 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -29,6 +29,10 @@ createCampusApp({
|
|
|
29
29
|
|
|
30
30
|
This is a setup example: create `Home.vue` and provide real menus and authentication. In production, configure `auth.captcha()` and enforce authentication and password validation on the server. The source repository is private.
|
|
31
31
|
|
|
32
|
+
## WeChat scan sign-in
|
|
33
|
+
|
|
34
|
+
Since 2.0.2 the split login page's WeChat tab can show the platform's own QR code: add `wechat: { mount(el) }` to your `AuthProvider`. The framework only provides the container: `mount` is called when the tab is visible and its returned cleanup runs when the tab is hidden or the page is left; a failing `mount` shows a retry prompt. After your own callback gets a token, call `completeLogin({ token, user }, redirect)`. Without `wechat` the tab stays a placeholder, as in 2.0.1. The login page also accepts `login.panel.title`, `login.panel.background`, `login.card` and `login.fields`; see `docs/06-微信扫码登录.md` in the source repository.
|
|
35
|
+
|
|
32
36
|
## Upgrading from 1.0
|
|
33
37
|
|
|
34
38
|
Version 2 is a rewrite and is not API compatible with 1.0. Replace the old `createCampusAdmin` integration with `createCampusApp`, provide menus, brand and authentication using `CampusOptions`, and test your application before upgrading. Version 2 uses the new `@campus-admin/theme` package; the old `@campus-admin/icon` package is not a dependency. Keep a working 1.0 lockfile for rollback.
|
package/dist/i18n.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export declare function createCampusI18n(options: CampusOptions): import("vue-i1
|
|
|
44
44
|
captchaRequired: string;
|
|
45
45
|
wechatHint: string;
|
|
46
46
|
wechatNote: string;
|
|
47
|
+
wechatMountFailed: string;
|
|
48
|
+
wechatRetry: string;
|
|
47
49
|
qrcodeAlt: string;
|
|
48
50
|
helpTitle: string;
|
|
49
51
|
help1: string;
|
|
@@ -208,6 +210,8 @@ export declare function createCampusI18n(options: CampusOptions): import("vue-i1
|
|
|
208
210
|
captchaRequired: string;
|
|
209
211
|
wechatHint: string;
|
|
210
212
|
wechatNote: string;
|
|
213
|
+
wechatMountFailed: string;
|
|
214
|
+
wechatRetry: string;
|
|
211
215
|
qrcodeAlt: string;
|
|
212
216
|
helpTitle: string;
|
|
213
217
|
help1: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { MenuApp } from './types.js';
|
|
|
11
11
|
export { createCampusApp } from './app.js';
|
|
12
12
|
export { t, useCampusT } from './i18n.js';
|
|
13
13
|
export { ca } from './services/ca.js';
|
|
14
|
-
export { handleUnauthorized } from './services/auth.js';
|
|
14
|
+
export { completeLogin, handleUnauthorized } from './services/auth.js';
|
|
15
15
|
export { resolveEnvironment } from './security.js';
|
|
16
16
|
export type { Ca } from './services/ca.js';
|
|
17
17
|
export type { DialogOptions, NotifyOptions } from './services/feedback.js';
|