diff --git a/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-en-US.json b/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-en-US.json index cbcefb0508..7f9fe22138 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-en-US.json +++ b/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-en-US.json @@ -1,6 +1,7 @@ { "events": { - "PageClosed": "a event occurs when a stack page is closed" + "PageClosed": "a event occurs when a stack page is closed", + "TabChanged": "a event occurs when a tab is changed, it will not be triggered when a page is pushed or popped" }, "methods": { "Push": "push a new page onto the page stack", diff --git a/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-zh-CN.json b/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-zh-CN.json index 64bd9148fe..fa338bf5e3 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-zh-CN.json +++ b/docs/Masa.Blazor.Docs/wwwroot/data/apis/page-stack/PageStackNavController-zh-CN.json @@ -1,6 +1,7 @@ { "events": { - "PageClosed": "当堆栈页面关闭时触发" + "PageClosed": "当堆栈页面关闭时触发", + "TabChanged": "当选项卡更改时触发,页面入栈或出栈时不会触发" }, "methods": { "Push": "将新页面推送到页面堆栈", diff --git a/docs/Masa.Blazor.Docs/wwwroot/data/other-apis.json b/docs/Masa.Blazor.Docs/wwwroot/data/other-apis.json index 853beac4c2..6dec0a222f 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/data/other-apis.json +++ b/docs/Masa.Blazor.Docs/wwwroot/data/other-apis.json @@ -34,6 +34,11 @@ { "name": "PageClosed", "type": "EventHandler" + }, + { + "name": "TabChanged", + "type": "EventHandler", + "releasedOn": "v1.8.0" } ], "methods": [ diff --git a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/en-US.md b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/en-US.md index db0d24f8f7..873421354d 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/en-US.md +++ b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/en-US.md @@ -33,6 +33,8 @@ related: ### PageStackNavController +#### Methods + Used to control the navigation of the page stack. | Method name | Description | @@ -53,6 +55,13 @@ Used to control the navigation of the page stack. Go to stack page ``` +#### Events {updated-in=v1.8.0} + +| Event name | Description | Usage scenario | +|--------------|--------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| +| `PageClosed` | Triggered when the stack page is closed. | - | +| `TabChanged` | Triggered when the tab is switched, including system-level return. It will not be triggered when pushed or popped. | Reset some states of the old tab page when switching, such as popups. | + ### data-page-stack-strategy diff --git a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/zh-CN.md b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/zh-CN.md index d62afc159c..69c4fddd81 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/zh-CN.md +++ b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/page-stack/zh-CN.md @@ -32,6 +32,8 @@ related: ### PageStackNavController +#### 方法 {#methods} + 用于控制页面堆栈的导航。 | 方法名 | 说明 | @@ -52,6 +54,13 @@ related: Go to stack page ``` +#### 事件 {#events updated-in=v1.8.0} + +| 事件名 | 说明 | 使用场景 | +|--------------|-------------------------------|----------------------| +| `PageClosed` | 堆栈页面关闭时触发。 | - | +| `TabChanged` | 选项卡切换时触发,包括系统级返回时。入栈或出栈时不会触发。 | 切换时重置旧tab页的某些状态,如弹窗。 | + ### data-page-stack-strategy