Просмотр исходного кода

feat(demo): add preventGlobalGesture (#663)

xiamidaxia 5 месяцев назад
Родитель
Сommit
7bae7c3828

+ 7 - 0
apps/demo-fixed-layout/src/hooks/use-editor-props.ts

@@ -39,6 +39,13 @@ export function useEditorProps(
        * Whether to enable the background
        */
       background: true,
+      playground: {
+        /**
+         * Prevent Mac browser gestures from turning pages
+         * 阻止 mac 浏览器手势翻页
+         */
+        preventGlobalGesture: true,
+      },
       /**
        * Whether it is read-only or not, the node cannot be dragged in read-only mode
        */

+ 7 - 0
apps/demo-free-layout/src/hooks/use-editor-props.tsx

@@ -44,6 +44,13 @@ export function useEditorProps(
        * Whether to enable the background
        */
       background: true,
+      playground: {
+        /**
+         * Prevent Mac browser gestures from turning pages
+         * 阻止 mac 浏览器手势翻页
+         */
+        preventGlobalGesture: true,
+      },
       /**
        * Whether it is read-only or not, the node cannot be dragged in read-only mode
        */