@campus-admin/core 2.0.5 → 2.0.6
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 +18 -0
- package/dist/i18n.d.ts +4 -0
- package/dist/index.js +398 -311
- package/dist/router.d.ts +3 -1
- package/dist/stores/layout.d.ts +27 -3
- package/dist/style.css +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -39,6 +39,24 @@ Since 2.0.5 a menu page can ask the desktop sidebar to collapse while it is open
|
|
|
39
39
|
|
|
40
40
|
For manual control use `useLayoutStore()`: `applySideCollapse('panel' | 'all' | 'none')`, `toggleSidePanel()` (same as the collapse button), and the read-only state `sidePanelCollapsed` and `sideHiddenActive`. The user's own collapse choice is still stored under the existing `side-collapsed` key.
|
|
41
41
|
|
|
42
|
+
## Page opening mode (2.0.6)
|
|
43
|
+
|
|
44
|
+
Set `MenuPage.openMode` (also forwarded to route meta):
|
|
45
|
+
|
|
46
|
+
| Value | Behavior |
|
|
47
|
+
| --- | --- |
|
|
48
|
+
| `normal` / omitted | Normal layout (omitted keeps legacy `sideCollapse`) |
|
|
49
|
+
| `collapsePanel` | Collapse the second sidebar on desktop |
|
|
50
|
+
| `collapseAll` | Collapse both sidebars on desktop |
|
|
51
|
+
| `content` | Hide the header and sidebars within the window, on every screen size |
|
|
52
|
+
| `screen` | Browser fullscreen on every screen size; fall back to `content` if denied |
|
|
53
|
+
|
|
54
|
+
An explicit `openMode`, including `normal`, takes precedence over `sideCollapse`. The previous content layout returns on leaving, and only browser fullscreen opened by the framework is exited. Manual buttons and Escape win until the next page; changing query/hash on the same path does not reapply the mode. Adjacent fullscreen pages keep fullscreen active. No opening-mode state is stored in the browser.
|
|
55
|
+
|
|
56
|
+
The router requests fullscreen before lazy-loading the page, within the user activation from menu, tab or search clicks. Browsers may reject fullscreen after a refresh, direct address navigation, restored tab, expired activation, or on unsupported devices. The page then fills the window and shows a dismissible **Click to enter fullscreen** button. Clicking retries the native API; a failed retry keeps the fallback. This requires no platform-specific click handler.
|
|
57
|
+
|
|
58
|
+
The demo's Feature menu includes five pages at `/feature/open-mode/{normal|collapsePanel|collapseAll|content|screen}` for switching between modes.
|
|
59
|
+
|
|
42
60
|
## WeChat scan sign-in
|
|
43
61
|
|
|
44
62
|
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.
|
package/dist/i18n.d.ts
CHANGED
|
@@ -126,6 +126,8 @@ export declare function createCampusI18n(options: CampusOptions): import("vue-i1
|
|
|
126
126
|
current: string;
|
|
127
127
|
};
|
|
128
128
|
tabs: {
|
|
129
|
+
enterScreen: string;
|
|
130
|
+
dismissScreen: string;
|
|
129
131
|
refresh: string;
|
|
130
132
|
close: string;
|
|
131
133
|
closeLeft: string;
|
|
@@ -292,6 +294,8 @@ export declare function createCampusI18n(options: CampusOptions): import("vue-i1
|
|
|
292
294
|
current: string;
|
|
293
295
|
};
|
|
294
296
|
tabs: {
|
|
297
|
+
enterScreen: string;
|
|
298
|
+
dismissScreen: string;
|
|
295
299
|
refresh: string;
|
|
296
300
|
close: string;
|
|
297
301
|
closeLeft: string;
|