diff --git a/example/src/demo/pc/fullscreen/before-change.vue b/example/src/demo/pc/fullscreen/before-change.vue
new file mode 100644
index 000000000..5b0d91777
--- /dev/null
+++ b/example/src/demo/pc/fullscreen/before-change.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/example/src/docs/zh-CN/fullscreen/before-change.md b/example/src/docs/zh-CN/fullscreen/before-change.md
new file mode 100644
index 000000000..914c89b07
--- /dev/null
+++ b/example/src/docs/zh-CN/fullscreen/before-change.md
@@ -0,0 +1,18 @@
+
+
+### 全屏/退出全屏前的回调
+
+
+
+
+
+
diff --git a/example/src/nav.config.comp.json b/example/src/nav.config.comp.json
index e1febf202..6c970b7e3 100644
--- a/example/src/nav.config.comp.json
+++ b/example/src/nav.config.comp.json
@@ -4342,7 +4342,12 @@
{
"path": "/fullscreen",
"name": "Fullscreen 全屏显示",
- "children": []
+ "children": [
+ {
+ "path": "/fullscreen/before-change",
+ "name": "全屏/退出全屏前的回调"
+ }
+ ]
}
]
}
diff --git a/example/src/route.config.comp2.js b/example/src/route.config.comp2.js
index d2633d562..2c5466248 100644
--- a/example/src/route.config.comp2.js
+++ b/example/src/route.config.comp2.js
@@ -404,6 +404,11 @@ export default [
meta: { title: '全屏显示-Fullscreen 全屏显示', lang: 'zh-CN', sign: 'component' },
component: () => import(/* webpackChunkName: 'v3-fullscreen' */ './docs/zh-CN/fullscreen/basic-usage.md')
},
+ {
+ path: 'fullscreen/before-change',
+ meta: { title: '全屏显示-Fullscreen 全屏显示-全屏/退出全屏前的回调', lang: 'zh-CN', sign: 'component' },
+ component: () => import(/* webpackChunkName: 'v3-fullscreen' */ './docs/zh-CN/fullscreen/before-change.md')
+ },
{
path: 'user',
meta: {
diff --git a/packages/fullscreen/src/index.vue b/packages/fullscreen/src/index.vue
index 493e861aa..aaf3981f9 100644
--- a/packages/fullscreen/src/index.vue
+++ b/packages/fullscreen/src/index.vue
@@ -53,7 +53,8 @@ export default {
zIndex: {
type: Number,
default: 0
- }
+ },
+ beforeChange: Function
},
setup(props, context) {
return setup({ props, context, renderless, api, mono: true })