فهرست منبع

feat(demo): add preventGlobalGesture (#663)

xiamidaxia 5 ماه پیش
والد
کامیت
7bae7c3828
2فایلهای تغییر یافته به همراه14 افزوده شده و 0 حذف شده
  1. 7 0
      apps/demo-fixed-layout/src/hooks/use-editor-props.ts
  2. 7 0
      apps/demo-free-layout/src/hooks/use-editor-props.tsx

+ 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
        */