@ray-js/robot-map-sdk 0.0.9 → 0.0.10
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/dist/index.d.ts +355 -3818
- package/dist-docs/404.html +3 -3
- package/dist-docs/assets/{app.BJnAJzet.js → app.Dqj628zE.js} +1 -1
- package/dist-docs/assets/chunks/@localSearchIndexroot.5wY6DA9h.js +1 -0
- package/dist-docs/assets/chunks/BitmapFont.BXsyt1Ko.js +4 -0
- package/dist-docs/assets/chunks/BufferResource.8pzc1eMm.js +155 -0
- package/dist-docs/assets/chunks/CanvasRenderer.DpOhlsYI.js +1 -0
- package/dist-docs/assets/chunks/RenderTargetSystem.CWKFKvEe.js +172 -0
- package/dist-docs/assets/chunks/{VPLocalSearchBox.D9iYIKMO.js → VPLocalSearchBox.D1fbUxUi.js} +2 -2
- package/dist-docs/assets/chunks/WebGLRenderer.BlPSqrND.js +156 -0
- package/dist-docs/assets/chunks/WebGPURenderer.szL5hbKh.js +41 -0
- package/dist-docs/assets/chunks/browserAll.BxwMP9Gg.js +14 -0
- package/dist-docs/assets/chunks/framework.CBLqO2Q1.js +18 -0
- package/dist-docs/assets/chunks/index.nS-neZH_.js +744 -0
- package/dist-docs/assets/chunks/json-editor-vue.CBQvp8j1.js +3882 -0
- package/dist-docs/assets/chunks/mapValues.D2X8cRgC.js +1 -0
- package/dist-docs/assets/chunks/theme.B9FcKggM.js +4 -0
- package/dist-docs/assets/chunks/vanilla-picker.B6E6ObS_.js +8 -0
- package/dist-docs/assets/chunks/webworkerAll.BXgPGAoF.js +56 -0
- package/dist-docs/assets/doubleBed.CzextF6m.png +0 -0
- package/dist-docs/assets/{guide_advanced-usage.md.BPrKHNKt.js → guide_advanced-usage.md.COVLyRkA.js} +96 -3
- package/dist-docs/assets/guide_advanced-usage.md.COVLyRkA.lean.js +1 -0
- package/dist-docs/assets/{guide_concepts.md.DBFk-g-l.js → guide_concepts.md.CJ87tk-r.js} +1 -1
- package/dist-docs/assets/{guide_concepts.md.DBFk-g-l.lean.js → guide_concepts.md.CJ87tk-r.lean.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.Zvm4buzY.js → guide_getting-started.md.B8rkVqGP.js} +1 -1
- package/dist-docs/assets/{guide_getting-started.md.Zvm4buzY.lean.js → guide_getting-started.md.B8rkVqGP.lean.js} +1 -1
- package/dist-docs/assets/{guide_mcp.md.1UIpY4E0.js → guide_mcp.md.CabCiX8Z.js} +1 -1
- package/dist-docs/assets/{guide_mcp.md.1UIpY4E0.lean.js → guide_mcp.md.CabCiX8Z.lean.js} +1 -1
- package/dist-docs/assets/{index.md.Sm6vD2Gl.js → index.md.wTsFvv0N.js} +1 -1
- package/dist-docs/assets/{index.md.Sm6vD2Gl.lean.js → index.md.wTsFvv0N.lean.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-detected-objects-visibility-design.md.530AI9zE.js → plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-detected-objects-visibility-design.md.530AI9zE.lean.js → plans_2026-03-04-detected-objects-visibility-design.md.Dqboot5W.lean.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.js → plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.js} +1 -1
- package/dist-docs/assets/{plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.lean.js → plans_2026-03-04-show-detected-objects-implementation-plan.md.CDWwQtWj.lean.js} +1 -1
- package/dist-docs/assets/plans_2026-03-10-simulator-debug-design.md.BZibn7uw.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-debug-design.md.BZibn7uw.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-design.md.BVmEzCbR.js +8 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-design.md.BVmEzCbR.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-implementation-plan.md.S2f1zs9-.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-events-console-implementation-plan.md.S2f1zs9-.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-design.md.mqeNaYgg.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-design.md.mqeNaYgg.lean.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-implementation-plan.md.BXG1UWFt.js +1 -0
- package/dist-docs/assets/plans_2026-03-10-simulator-runtime-controls-implementation-plan.md.BXG1UWFt.lean.js +1 -0
- package/dist-docs/assets/{records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.js → records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BbQpA41Y.js} +1 -1
- package/dist-docs/assets/{records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.lean.js → records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BbQpA41Y.lean.js} +1 -1
- package/dist-docs/assets/records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md.DbHxPv4D.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-events-drawer-toolbar-scroll-bugfix.md.DbHxPv4D.lean.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md.w7--2hvH.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-initial-render-layout-bugfix.md.w7--2hvH.lean.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md.B6gIem2P.js +1 -0
- package/dist-docs/assets/records_bugs_2026-03-10-simulator-wheel-scroll-leak-bugfix.md.B6gIem2P.lean.js +1 -0
- package/dist-docs/assets/{records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.js → records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.js} +1 -1
- package/dist-docs/assets/{records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.lean.js → records_plans_2026-03-02-furniture-feature-plan.md.CqSsyNDo.lean.js} +1 -1
- package/dist-docs/assets/records_plans_2026-03-10-simulator-events-console-plan.md.CfHLEHcc.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-events-console-plan.md.CfHLEHcc.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md.Z2RoK239.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-last-successful-combo-cache-plan.md.Z2RoK239.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-parsed-view-plan.md.S9jPz75o.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-parsed-view-plan.md.S9jPz75o.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-playground-refactor-plan.md.BuILlmcV.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-map-playground-refactor-plan.md.BuILlmcV.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-playground-plan.md.CQAR-T7p.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-playground-plan.md.CQAR-T7p.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-runtime-controls-plan.md.DSVD-qCa.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-10-simulator-runtime-controls-plan.md.DSVD-qCa.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-implementation.md.FnB5Cx6R.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-implementation.md.FnB5Cx6R.lean.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-plan.md.BBfaeRrq.js +1 -0
- package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-plan.md.BBfaeRrq.lean.js +1 -0
- package/dist-docs/assets/{reference_callbacks.md.CwvDSJWk.js → reference_callbacks.md.BIwuGR3s.js} +16 -2
- package/dist-docs/assets/reference_callbacks.md.BIwuGR3s.lean.js +1 -0
- package/dist-docs/assets/{reference_config.md.CK4ueBig.js → reference_config.md.DHynhVxG.js} +1 -1
- package/dist-docs/assets/{reference_config.md.CK4ueBig.lean.js → reference_config.md.DHynhVxG.lean.js} +1 -1
- package/dist-docs/assets/{reference_data.md.DciSLVC8.js → reference_data.md.B_XpUFrn.js} +38 -2
- package/dist-docs/assets/reference_data.md.B_XpUFrn.lean.js +1 -0
- package/dist-docs/assets/{reference_methods.md.CL2sjTJ7.js → reference_methods.md.eH-UCMbE.js} +23 -3
- package/dist-docs/assets/reference_methods.md.eH-UCMbE.lean.js +1 -0
- package/dist-docs/assets/{reference_runtime.md.aDpGKfHs.js → reference_runtime.md.BEy8BhSZ.js} +2 -2
- package/dist-docs/assets/reference_runtime.md.BEy8BhSZ.lean.js +1 -0
- package/dist-docs/assets/{reference_types.md.D2IglsHQ.js → reference_types.md.hikiO8Cq.js} +20 -3
- package/dist-docs/assets/reference_types.md.hikiO8Cq.lean.js +1 -0
- package/dist-docs/assets/{reference_utils.md.CSshxnp0.js → reference_utils.md.Dy6XKVWh.js} +1 -1
- package/dist-docs/assets/{reference_utils.md.CSshxnp0.lean.js → reference_utils.md.Dy6XKVWh.lean.js} +1 -1
- package/dist-docs/assets/robot.CSiuukeH.png +0 -0
- package/dist-docs/assets/simulator_index.md.CF95Y_c9.js +1 -0
- package/dist-docs/assets/simulator_index.md.CF95Y_c9.lean.js +1 -0
- package/dist-docs/assets/sleep.CRKZ3XeQ.png +0 -0
- package/dist-docs/assets/sleep.C_YKDk6M.json +879 -0
- package/dist-docs/assets/{style.CN_tJoU2.css → style.DrlDtCux.css} +1 -1
- package/dist-docs/guide/advanced-usage.html +102 -9
- package/dist-docs/guide/concepts.html +7 -7
- package/dist-docs/guide/getting-started.html +7 -7
- package/dist-docs/guide/mcp.html +7 -7
- package/dist-docs/hashmap.json +1 -1
- package/dist-docs/index.html +7 -7
- package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +7 -7
- package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +7 -7
- package/dist-docs/plans/2026-03-10-simulator-debug-design.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-events-console-design.html +32 -0
- package/dist-docs/plans/2026-03-10-simulator-events-console-implementation-plan.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-design.html +25 -0
- package/dist-docs/plans/2026-03-10-simulator-runtime-controls-implementation-plan.html +25 -0
- package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +7 -7
- package/dist-docs/records/bugs/2026-03-10-events-drawer-toolbar-scroll-bugfix.html +25 -0
- package/dist-docs/records/bugs/2026-03-10-simulator-initial-render-layout-bugfix.html +25 -0
- package/dist-docs/records/bugs/2026-03-10-simulator-wheel-scroll-leak-bugfix.html +25 -0
- package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +7 -7
- package/dist-docs/records/plans/2026-03-10-simulator-events-console-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-last-successful-combo-cache-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-map-parsed-view-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-map-playground-refactor-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-playground-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-10-simulator-runtime-controls-plan.html +25 -0
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-implementation.html +25 -0
- package/dist-docs/records/plans/2026-03-11-simulator-src-migration-plan.html +25 -0
- package/dist-docs/reference/callbacks.html +22 -8
- package/dist-docs/reference/config.html +7 -7
- package/dist-docs/reference/data.html +44 -8
- package/dist-docs/reference/methods.html +29 -9
- package/dist-docs/reference/runtime.html +8 -8
- package/dist-docs/reference/types.html +26 -9
- package/dist-docs/reference/utils.html +7 -7
- package/dist-docs/simulator/index.html +25 -0
- package/package.json +8 -4
- package/dist-docs/assets/chunks/@localSearchIndexroot.HZmZuAtg.js +0 -1
- package/dist-docs/assets/chunks/framework.DRADY2L-.js +0 -18
- package/dist-docs/assets/chunks/theme.D78lSkQK.js +0 -2
- package/dist-docs/assets/guide_advanced-usage.md.BPrKHNKt.lean.js +0 -1
- package/dist-docs/assets/reference_callbacks.md.CwvDSJWk.lean.js +0 -1
- package/dist-docs/assets/reference_data.md.DciSLVC8.lean.js +0 -1
- package/dist-docs/assets/reference_methods.md.CL2sjTJ7.lean.js +0 -1
- package/dist-docs/assets/reference_runtime.md.aDpGKfHs.lean.js +0 -1
- package/dist-docs/assets/reference_types.md.D2IglsHQ.lean.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as a,c as o,o as i,aq as l}from"./chunks/framework.CBLqO2Q1.js";const h=JSON.parse('{"title":"Simulator playground plan (March 10, 2026)","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-10-simulator-playground-plan.md","filePath":"records/plans/2026-03-10-simulator-playground-plan.md","lastUpdated":1773123455000}'),t={name:"records/plans/2026-03-10-simulator-playground-plan.md"};function r(d,e,n,s,c,p){return i(),o("div",null,[...e[0]||(e[0]=[l('<h1 id="simulator-playground-plan-march-10-2026" tabindex="-1">Simulator playground plan (March 10, 2026) <a class="header-anchor" href="#simulator-playground-plan-march-10-2026" aria-label="Permalink to "Simulator playground plan (March 10, 2026)""></a></h1><h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to "Background""></a></h2><p>Developers need a direct way to validate raw map payloads while reading the SDK docs. The goal is to avoid switching to a separate demo app for basic integration checks.</p><h2 id="goal-and-scope" tabindex="-1">Goal and scope <a class="header-anchor" href="#goal-and-scope" aria-label="Permalink to "Goal and scope""></a></h2><p>Add a new documentation section named <code>simulator</code> with a browser-only playground that:</p><ul><li>Accepts <code>mapHex</code> as required input.</li><li>Accepts optional <code>pathHex</code> and optional <code>roomProperties</code> JSON.</li><li>Renders the map in real time after an explicit action.</li><li>Uses a clean and minimal UI suited for long payload input.</li></ul><p>Out of scope:</p><ul><li>Sharing logic with <code>src/app/debugTools</code>.</li><li>Heatmap and other advanced layers in this first version.</li></ul><h2 id="chosen-approach" tabindex="-1">Chosen approach <a class="header-anchor" href="#chosen-approach" aria-label="Permalink to "Chosen approach""></a></h2><p>Implement a standalone VitePress component (<code>MapPlayground.vue</code>) and register it globally in the VitePress theme. The component owns parsing, rendering, error display, and long-text editing mode.</p><p>Parsing rule:</p><ul><li>If normalized <code>mapHex</code> starts with <code>7b22</code>, treat it as structured map data.</li><li>Otherwise, treat it as raster map data.</li></ul><h2 id="impacted-files-and-modules" tabindex="-1">Impacted files and modules <a class="header-anchor" href="#impacted-files-and-modules" aria-label="Permalink to "Impacted files and modules""></a></h2><ul><li><code>docs/.vitepress/config.ts</code></li><li><code>docs/.vitepress/theme/index.ts</code></li><li><code>docs/.vitepress/theme/components/MapPlayground.vue</code></li><li><code>docs/simulator/index.md</code></li></ul><h2 id="verification-checklist" tabindex="-1">Verification checklist <a class="header-anchor" href="#verification-checklist" aria-label="Permalink to "Verification checklist""></a></h2><ul><li>[ ] Navigation includes <code>模拟调试</code> and routes to <code>/simulator/</code>.</li><li>[ ] <code>mapHex</code> is required and has default sample data.</li><li>[ ] <code>pathHex</code> and <code>roomProperties</code> are optional.</li><li>[ ] Structured/raster branch follows the <code>7b22</code> rule.</li><li>[ ] Long inputs can be edited in full-screen mode.</li><li>[ ] Errors are scoped to each optional field when possible.</li><li>[ ] <code>npm run lint</code> passes.</li><li>[ ] <code>npx tsc --noEmit</code> passes.</li></ul>',16)])])}const m=a(t,[["render",r]]);export{h as __pageData,m as default};
|
package/dist-docs/assets/records_plans_2026-03-10-simulator-playground-plan.md.CQAR-T7p.lean.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as a,c as o,o as i,aq as l}from"./chunks/framework.CBLqO2Q1.js";const h=JSON.parse('{"title":"Simulator playground plan (March 10, 2026)","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-10-simulator-playground-plan.md","filePath":"records/plans/2026-03-10-simulator-playground-plan.md","lastUpdated":1773123455000}'),t={name:"records/plans/2026-03-10-simulator-playground-plan.md"};function r(d,e,n,s,c,p){return i(),o("div",null,[...e[0]||(e[0]=[l("",16)])])}const m=a(t,[["render",r]]);export{h as __pageData,m as default};
|
package/dist-docs/assets/records_plans_2026-03-10-simulator-runtime-controls-plan.md.DSVD-qCa.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o,c as t,o as a,aq as i}from"./chunks/framework.CBLqO2Q1.js";const m=JSON.parse('{"title":"Simulator runtime controls plan","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-10-simulator-runtime-controls-plan.md","filePath":"records/plans/2026-03-10-simulator-runtime-controls-plan.md","lastUpdated":1773145284000}'),l={name:"records/plans/2026-03-10-simulator-runtime-controls-plan.md"};function r(s,e,n,d,c,p){return a(),t("div",null,[...e[0]||(e[0]=[i('<h1 id="simulator-runtime-controls-plan" tabindex="-1">Simulator runtime controls plan <a class="header-anchor" href="#simulator-runtime-controls-plan" aria-label="Permalink to "Simulator runtime controls plan""></a></h1><h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to "Background""></a></h2><p>The simulator page already supports source-data debugging for <code>mapHex</code>, <code>pathHex</code>, and <code>roomProperties</code>, but it does not expose the SDK <code>runtime</code> surface. Developers cannot validate runtime-only behavior such as room selection, visibility toggles, or interaction gates from the docs UI.</p><h2 id="goal-and-scope" tabindex="-1">Goal and scope <a class="header-anchor" href="#goal-and-scope" aria-label="Permalink to "Goal and scope""></a></h2><p>This iteration adds a runtime control console to the simulator page.</p><p>In scope:</p><ul><li>cover every <code>RuntimeConfig</code> field in the docs UI</li><li>group fields by behavior and dependency</li><li>keep unsupported fields visible but disabled</li><li>support bidirectional room selection between controls and map clicks</li><li>update runtime incrementally through <code>mapApi.updateRuntime()</code></li></ul><p>Out of scope:</p><ul><li>full editing workflows for zones, carpets, furniture, spots, or waypoints</li><li>persistence of runtime state across page reloads</li><li>raw JSON runtime editing as the primary input mode</li></ul><h2 id="chosen-approach" tabindex="-1">Chosen approach <a class="header-anchor" href="#chosen-approach" aria-label="Permalink to "Chosen approach""></a></h2><p>Use a dedicated runtime console in the left control column, separate from the existing source-data tabs. Model simulator state in three layers:</p><ul><li>source data state for <code>mapHex</code>, <code>pathHex</code>, and <code>roomProperties</code></li><li>derived map state for rooms and runtime support</li><li>runtime draft state for live incremental updates</li></ul><p>Use a dedicated room-selection sub-panel for the only strong map-driven interaction. All runtime updates go through <code>updateRuntime(partial)</code> rather than the full render pipeline.</p><h2 id="impacted-files-or-modules" tabindex="-1">Impacted files or modules <a class="header-anchor" href="#impacted-files-or-modules" aria-label="Permalink to "Impacted files or modules""></a></h2><p>Expected implementation targets:</p><ul><li><code>docs/.vitepress/theme/components/MapPlayground.vue</code></li><li><code>docs/.vitepress/theme/components/simulator/useMapPlayground.ts</code></li><li><code>docs/.vitepress/theme/components/simulator/usePlaygroundRender.ts</code></li><li><code>docs/.vitepress/theme/components/simulator/useMapCanvas.ts</code></li><li><code>docs/.vitepress/theme/components/simulator/types.ts</code></li><li>new runtime composables under <code>docs/.vitepress/theme/components/simulator/</code></li><li>new runtime UI components under <code>docs/.vitepress/theme/components/simulator/</code></li></ul><h2 id="verification-checklist" tabindex="-1">Verification checklist <a class="header-anchor" href="#verification-checklist" aria-label="Permalink to "Verification checklist""></a></h2><ul><li>[x] <code>RuntimeConfig</code> fields are all represented in the simulator UI.</li><li>[x] Runtime changes update the live map without full re-render.</li><li>[x] <code>selectRoomIds</code> stays synchronized between checklist and map clicks.</li><li>[x] Dependency rules disable or normalize invalid child fields.</li><li>[x] Unsupported runtime fields show disabled state with a reason.</li><li>[x] <code>npm run lint</code> passes.</li><li>[x] <code>npx tsc --noEmit</code> passes.</li><li>[x] <code>npm run docs:build</code> passes.</li></ul>',18)])])}const h=o(l,[["render",r]]);export{m as __pageData,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as o,c as t,o as a,aq as i}from"./chunks/framework.CBLqO2Q1.js";const m=JSON.parse('{"title":"Simulator runtime controls plan","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-10-simulator-runtime-controls-plan.md","filePath":"records/plans/2026-03-10-simulator-runtime-controls-plan.md","lastUpdated":1773145284000}'),l={name:"records/plans/2026-03-10-simulator-runtime-controls-plan.md"};function r(s,e,n,d,c,p){return a(),t("div",null,[...e[0]||(e[0]=[i("",18)])])}const h=o(l,[["render",r]]);export{m as __pageData,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as o,o as t,aq as a}from"./chunks/framework.CBLqO2Q1.js";const p=JSON.parse('{"title":"2026-03-11 simulator src migration implementation record","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-11-simulator-src-migration-implementation.md","filePath":"records/plans/2026-03-11-simulator-src-migration-implementation.md","lastUpdated":1773212341000}'),r={name:"records/plans/2026-03-11-simulator-src-migration-implementation.md"};function s(l,e,d,c,n,u){return t(),o("div",null,[...e[0]||(e[0]=[a('<h1 id="_2026-03-11-simulator-src-migration-implementation-record" tabindex="-1">2026-03-11 simulator src migration implementation record <a class="header-anchor" href="#_2026-03-11-simulator-src-migration-implementation-record" aria-label="Permalink to "2026-03-11 simulator src migration implementation record""></a></h1><p>This record captures the implementation of the simulator source migration from <code>docs/.vitepress/theme/components/simulator</code> to <code>src/simulator</code>, while keeping simulator code out of all SDK runtime build artifacts.</p><h2 id="change-summary" tabindex="-1">Change summary <a class="header-anchor" href="#change-summary" aria-label="Permalink to "Change summary""></a></h2><ul><li>Moved simulator implementation into <code>src/simulator</code> with a structured layout: <code>components/</code>, <code>core/</code>, <code>adapters/</code>, and <code>types/index.ts</code>.</li><li>Replaced docs <code>MapPlayground</code> with a thin host component that only mounts the simulator implementation from <code>src/simulator</code>.</li><li>Removed docs-side simulator implementation files and docs-side simulator type shims.</li><li>Unified simulator type sourcing to <code>@core/@types</code> and <code>@core/@types/callbacks</code> through <code>src/simulator/adapters/sdkTypes.ts</code>.</li><li>Added import guardrails to forbid <code>@simulator</code> imports from runtime modules: <code>src/core/**</code>, <code>src/rjs-entry/**</code>, and <code>src/app/**</code>.</li><li>Added <code>@simulator</code> alias wiring for root Vite/TypeScript and VitePress docs.</li></ul><h2 id="key-files" tabindex="-1">Key files <a class="header-anchor" href="#key-files" aria-label="Permalink to "Key files""></a></h2><ul><li><code>src/simulator/components/SimulatorMapPlayground.vue</code></li><li><code>src/simulator/core/useMapPlayground.ts</code></li><li><code>src/simulator/adapters/external.ts</code></li><li><code>src/simulator/adapters/sdkTypes.ts</code></li><li><code>src/simulator/types/index.ts</code></li><li><code>src/simulator/index.ts</code></li><li><code>docs/.vitepress/theme/components/MapPlayground.vue</code></li><li><code>docs/.vitepress/config.ts</code></li><li><code>docs/.vitepress/tsconfig.json</code></li><li><code>vite.config.js</code></li><li><code>tsconfig.json</code></li><li><code>eslint.config.js</code></li><li><code>package.json</code></li></ul><h2 id="risk-points-and-handling" tabindex="-1">Risk points and handling <a class="header-anchor" href="#risk-points-and-handling" aria-label="Permalink to "Risk points and handling""></a></h2><ul><li>Risk: simulator code accidentally enters SDK/runtime bundles. <ul><li>Handling: added ESLint <code>no-restricted-imports</code> guardrail for runtime folders and verified built outputs by keyword scanning.</li></ul></li><li>Risk: docs typecheck pulls in full core runtime implementation and fails for unrelated reasons. <ul><li>Handling: constrained docs typecheck path mapping to simulator-relevant targets and type-only modules.</li></ul></li><li>Risk: behavior regression during file relocation. <ul><li>Handling: migrated files with no feature changes and preserved existing simulator render/runtime/event/cache logic paths.</li></ul></li></ul><h2 id="verification-results" tabindex="-1">Verification results <a class="header-anchor" href="#verification-results" aria-label="Permalink to "Verification results""></a></h2><ul><li><code>npm run lint</code>: pass</li><li><code>npx tsc --noEmit</code>: pass</li><li><code>npm run typecheck:docs</code>: pass</li><li><code>npm run build:core</code>: pass</li><li><code>npm run build:rjs</code>: pass</li><li><code>npm run build:app</code>: pass</li></ul><h2 id="artifact-exclusion-evidence" tabindex="-1">Artifact exclusion evidence <a class="header-anchor" href="#artifact-exclusion-evidence" aria-label="Permalink to "Artifact exclusion evidence""></a></h2><p>After each build target, outputs were scanned with: <code>rg -n "simulator|SimulatorMapPlayground|@simulator|useMapPlayground|src/simulator"</code>.</p><ul><li><code>build:core</code> output (<code>dist/**</code>): no simulator markers found.</li><li><code>build:rjs</code> output (<code>dist/index.rjs.js</code>): no simulator markers found.</li><li><code>build:app</code> output (<code>dist-app/**</code>): no simulator markers found.</li></ul>',13)])])}const h=i(r,[["render",s]]);export{p as __pageData,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as o,o as t,aq as a}from"./chunks/framework.CBLqO2Q1.js";const p=JSON.parse('{"title":"2026-03-11 simulator src migration implementation record","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-11-simulator-src-migration-implementation.md","filePath":"records/plans/2026-03-11-simulator-src-migration-implementation.md","lastUpdated":1773212341000}'),r={name:"records/plans/2026-03-11-simulator-src-migration-implementation.md"};function s(l,e,d,c,n,u){return t(),o("div",null,[...e[0]||(e[0]=[a("",13)])])}const h=i(r,[["render",s]]);export{p as __pageData,h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as o,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-11-simulator-src-migration-plan.md","filePath":"records/plans/2026-03-11-simulator-src-migration-plan.md","lastUpdated":1773210576000}'),r={name:"records/plans/2026-03-11-simulator-src-migration-plan.md"};function s(l,e,n,c,d,p){return a(),o("div",null,[...e[0]||(e[0]=[t('<h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to "Background""></a></h2><p>The simulator currently lives under <code>docs/.vitepress/theme/components/simulator</code>. This has created repeated type drift risk and extra maintenance overhead, because simulator code and SDK source are separated by docs-specific wrappers and shims.</p><p>The target is to move simulator implementation into <code>src/simulator</code> so it can share source-level types and be easier to test, while ensuring simulator code is never bundled into SDK runtime outputs (<code>dist</code>, <code>dist-app</code>, <code>dist-docs</code> behavior must stay intentional and predictable).</p><h2 id="goal-and-scope" tabindex="-1">Goal and scope <a class="header-anchor" href="#goal-and-scope" aria-label="Permalink to "Goal and scope""></a></h2><p>This plan covers architecture and migration for simulator source location only.</p><p>In scope:</p><ul><li>Move simulator implementation from docs theme folder to <code>src/simulator</code>.</li><li>Keep docs page as a thin shell that imports simulator from <code>src/simulator</code>.</li><li>Remove duplicated docs-only type shims where possible.</li><li>Add guardrails to prevent simulator from being imported by SDK runtime entry modules.</li><li>Prepare testability hooks and folder boundaries for future tests.</li></ul><p>Out of scope:</p><ul><li>New simulator features.</li><li>SDK public API changes for business consumers.</li><li>Large UI redesign.</li></ul><h2 id="brainstorming-summary" tabindex="-1">Brainstorming summary <a class="header-anchor" href="#brainstorming-summary" aria-label="Permalink to "Brainstorming summary""></a></h2><h3 id="option-a-keep-simulator-in-docs-and-keep-improving-shims" tabindex="-1">Option A: keep simulator in docs and keep improving shims <a class="header-anchor" href="#option-a-keep-simulator-in-docs-and-keep-improving-shims" aria-label="Permalink to "Option A: keep simulator in docs and keep improving shims""></a></h3><p>Pros:</p><ul><li>Lowest migration cost.</li><li>No import path changes in docs.</li></ul><p>Cons:</p><ul><li>Type source remains split and can drift again.</li><li>Harder to add shared tests.</li><li>Architectural boundary stays weak.</li></ul><h3 id="option-b-recommended-move-simulator-to-src-simulator-and-keep-docs-as-host" tabindex="-1">Option B (recommended): move simulator to <code>src/simulator</code> and keep docs as host <a class="header-anchor" href="#option-b-recommended-move-simulator-to-src-simulator-and-keep-docs-as-host" aria-label="Permalink to "Option B (recommended): move simulator to `src/simulator` and keep docs as host""></a></h3><p>Pros:</p><ul><li>One source-of-truth for simulator logic.</li><li>Easier unit/integration tests and future reuse.</li><li>Cleaner type usage with direct source aliases.</li></ul><p>Cons:</p><ul><li>Medium migration effort.</li><li>Requires clear packaging and import guardrails.</li></ul><h3 id="option-c-extract-simulator-into-an-internal-workspace-package" tabindex="-1">Option C: extract simulator into an internal workspace package <a class="header-anchor" href="#option-c-extract-simulator-into-an-internal-workspace-package" aria-label="Permalink to "Option C: extract simulator into an internal workspace package""></a></h3><p>Pros:</p><ul><li>Strong isolation and independent lifecycle.</li><li>Clear ownership boundaries.</li></ul><p>Cons:</p><ul><li>Highest complexity and tooling overhead.</li><li>Not justified for current team size and iteration speed.</li></ul><p>Recommendation: adopt Option B now; revisit Option C only if simulator grows into an independent product surface.</p><h2 id="chosen-approach" tabindex="-1">Chosen approach <a class="header-anchor" href="#chosen-approach" aria-label="Permalink to "Chosen approach""></a></h2><p>Use <code>src/simulator</code> as the implementation root and keep docs as the presentation host.</p><h3 id="target-structure" tabindex="-1">Target structure <a class="header-anchor" href="#target-structure" aria-label="Permalink to "Target structure""></a></h3><ul><li><code>src/simulator/core/*</code>: render and runtime orchestration hooks.</li><li><code>src/simulator/components/*</code>: UI components used by the simulator page.</li><li><code>src/simulator/types/*</code>: simulator-specific domain types.</li><li><code>src/simulator/adapters/*</code>: integration with SDK runtime (<code>MapApplication</code>, parsers, callbacks).</li><li><code>src/simulator/index.ts</code>: stable entry for docs consumption.</li></ul><p>Docs side keeps only:</p><ul><li>page routing and markdown.</li><li>a thin Vue wrapper that imports from <code>src/simulator</code>.</li></ul><h2 id="packaging-and-build-constraints" tabindex="-1">Packaging and build constraints <a class="header-anchor" href="#packaging-and-build-constraints" aria-label="Permalink to "Packaging and build constraints""></a></h2><p>Simulator must not be included in SDK distributed runtime outputs.</p><p>Control points:</p><ul><li><code>build:core</code> entry remains <code>src/core/index.ts</code>.</li><li><code>build:rjs</code> entry remains <code>src/rjs-entry/index.ts</code>.</li><li><code>build:app</code> entry remains <code>src/app/index.html</code>.</li><li>No runtime entry may import <code>@simulator/*</code>.</li></ul><p>Guardrails to add during implementation:</p><ul><li>Add alias <code>@simulator/* -> src/simulator/*</code> for docs/dev usage.</li><li>Add lint/CI rule to forbid <code>@simulator/*</code> imports from: <ul><li><code>src/core/**</code></li><li><code>src/rjs-entry/**</code></li><li><code>src/app/**</code></li></ul></li><li>Keep npm <code>files</code> config unchanged so <code>src/**</code> is not published as source payload.</li></ul><h2 id="type-strategy" tabindex="-1">Type strategy <a class="header-anchor" href="#type-strategy" aria-label="Permalink to "Type strategy""></a></h2><ul><li>Prefer direct imports from <code>@core/@types</code> and <code>@core/@types/callbacks</code>.</li><li>Remove docs-only duplicated type declarations for simulator.</li><li>If a bridge declaration is still required for docs toolchain, keep it minimal and reference core types instead of redefining contracts.</li></ul><h2 id="migration-phases" tabindex="-1">Migration phases <a class="header-anchor" href="#migration-phases" aria-label="Permalink to "Migration phases""></a></h2><ol><li>Create <code>src/simulator</code> skeleton and move pure TS composables first.</li><li>Move simulator Vue components and update local imports.</li><li>Replace docs theme imports with <code>src/simulator</code> entry imports.</li><li>Remove obsolete docs simulator files and stale shims.</li><li>Add guardrails and run full verification.</li></ol><h2 id="impacted-files-and-modules" tabindex="-1">Impacted files and modules <a class="header-anchor" href="#impacted-files-and-modules" aria-label="Permalink to "Impacted files and modules""></a></h2><p>Expected primary changes:</p><ul><li><code>src/simulator/**</code> (new)</li><li><code>docs/.vitepress/theme/components/MapPlayground.vue</code> (thin host update)</li><li><code>docs/.vitepress/theme/components/simulator/**</code> (deletion or wrappers)</li><li><code>docs/.vitepress/tsconfig.json</code> (path cleanup)</li><li><code>vite.config.js</code> and/or docs VitePress alias config (simulator alias)</li><li>lint config and CI scripts (import guardrail)</li></ul><h2 id="verification-checklist" tabindex="-1">Verification checklist <a class="header-anchor" href="#verification-checklist" aria-label="Permalink to "Verification checklist""></a></h2><ul><li><code>npm run lint</code> passes.</li><li><code>npx tsc --noEmit</code> passes.</li><li><code>npm run typecheck:docs</code> passes.</li><li><code>npm run docs:dev</code> starts and simulator page works.</li><li><code>npm run build:core</code> output contains no simulator modules.</li><li><code>npm run build:rjs</code> output contains no simulator modules.</li><li><code>npm run build:app</code> output contains no simulator modules.</li><li>Simulator interactions still work: map/path/room input, runtime controls, events filter, local cache restore.</li></ul><h2 id="risks-and-mitigations" tabindex="-1">Risks and mitigations <a class="header-anchor" href="#risks-and-mitigations" aria-label="Permalink to "Risks and mitigations""></a></h2><ul><li><p>Risk: accidental import from runtime entries brings simulator into SDK bundle. Mitigation: lint/CI import restriction and explicit bundle grep checks.</p></li><li><p>Risk: alias mismatch between docs and root config. Mitigation: define simulator alias once and reference consistently.</p></li><li><p>Risk: migration breaks docs-only UX integration. Mitigation: keep docs wrapper thin and preserve existing props/events contract.</p></li></ul><h2 id="decision" tabindex="-1">Decision <a class="header-anchor" href="#decision" aria-label="Permalink to "Decision""></a></h2><p>Proceed with Option B (<code>src/simulator</code> migration) in a dedicated implementation session, with packaging guardrails as mandatory acceptance criteria.</p>',51)])])}const h=i(r,[["render",s]]);export{m as __pageData,h as default};
|
package/dist-docs/assets/records_plans_2026-03-11-simulator-src-migration-plan.md.BBfaeRrq.lean.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as o,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-11-simulator-src-migration-plan.md","filePath":"records/plans/2026-03-11-simulator-src-migration-plan.md","lastUpdated":1773210576000}'),r={name:"records/plans/2026-03-11-simulator-src-migration-plan.md"};function s(l,e,n,c,d,p){return a(),o("div",null,[...e[0]||(e[0]=[t("",51)])])}const h=i(r,[["render",s]]);export{m as __pageData,h as default};
|
package/dist-docs/assets/{reference_callbacks.md.CwvDSJWk.js → reference_callbacks.md.BIwuGR3s.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as a,o as t,
|
|
1
|
+
import{_ as i,c as a,o as t,aq as n}from"./chunks/framework.CBLqO2Q1.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1773043511000}'),e={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[n(`<h1 id="地图事件回调" tabindex="-1">地图事件回调 <a class="header-anchor" href="#地图事件回调" aria-label="Permalink to "地图事件回调""></a></h1><p>了解 RobotMap 的地图事件回调,用于响应地图的各种交互和状态变化。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to "使用示例""></a></h2><p>地图事件回调通过组件 props 传递,当地图发生相应的交互或状态变化时会自动触发。所有回调都是可选的,只需要传入你关心的回调函数。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'react'</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@ray-js/robot-map'</span></span>
|
|
3
3
|
<span class="line"></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
|
@@ -16,4 +16,18 @@ import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c
|
|
|
16
16
|
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
|
|
17
17
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /></span></span>
|
|
18
18
|
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
|
19
|
-
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="onmapfirstdrawed" tabindex="-1">onMapFirstDrawed <a class="header-anchor" href="#onmapfirstdrawed" aria-label="Permalink to "onMapFirstDrawed""></a></h2><p>地图首次绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapFirstDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有首次绘制完成后,才会触发此回调。你可以利用它来移除 Loading 状态。</p></div><h2 id="onmapdrawed" tabindex="-1">onMapDrawed <a class="header-anchor" href="#onmapdrawed" aria-label="Permalink to "onMapDrawed""></a></h2><p>地图绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onpathdrawed" tabindex="-1">onPathDrawed <a class="header-anchor" href="#onpathdrawed" aria-label="Permalink to "onPathDrawed""></a></h2><p>路径绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPathDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pathState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PathState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>pathState</code>: <a href="/reference/types.html#pathstate"><code>PathState</code></a> - 路径状态信息,包含路径ID、类型、机器人位置等。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onroompropertiesdrawed" tabindex="-1">onRoomPropertiesDrawed <a class="header-anchor" href="#onroompropertiesdrawed" aria-label="Permalink to "onRoomPropertiesDrawed""></a></h2><p>房间信息绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRoomPropertiesDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rooms</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>rooms</code>: <a href="/reference/types.html#roomproperty"><code>RoomProperty[]</code></a> - 房间属性信息数组。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroom" tabindex="-1">onClickRoom <a class="header-anchor" href="#onclickroom" aria-label="Permalink to "onClickRoom""></a></h2><p>点击房间回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Partial</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroomproperties" tabindex="-1">onClickRoomProperties <a class="header-anchor" href="#onclickroomproperties" aria-label="Permalink to "onClickRoomProperties""></a></h2><p>点击房间信息回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddensweepzone" tabindex="-1">onRemoveForbiddenSweepZone <a class="header-anchor" href="#onremoveforbiddensweepzone" aria-label="Permalink to "onRemoveForbiddenSweepZone""></a></h2><p>点击禁扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddenmopzone" tabindex="-1">onRemoveForbiddenMopZone <a class="header-anchor" href="#onremoveforbiddenmopzone" aria-label="Permalink to "onRemoveForbiddenMopZone""></a></h2><p>点击禁拖区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁拖区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovecleanzone" tabindex="-1">onRemoveCleanZone <a class="header-anchor" href="#onremovecleanzone" aria-label="Permalink to "onRemoveCleanZone""></a></h2><p>点击清扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的清扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovevirtualwall" tabindex="-1">onRemoveVirtualWall <a class="header-anchor" href="#onremovevirtualwall" aria-label="Permalink to "onRemoveVirtualWall""></a></h2><p>点击虚拟墙删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的虚拟墙ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddensweepzone" tabindex="-1">onUpdateForbiddenSweepZone <a class="header-anchor" href="#onupdateforbiddensweepzone" aria-label="Permalink to "onUpdateForbiddenSweepZone""></a></h2><p>更新禁扫区域回调。当用户操作禁扫区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddenmopzone" tabindex="-1">onUpdateForbiddenMopZone <a class="header-anchor" href="#onupdateforbiddenmopzone" aria-label="Permalink to "onUpdateForbiddenMopZone""></a></h2><p>更新禁拖区域回调。当用户操作禁拖区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatecleanzone" tabindex="-1">onUpdateCleanZone <a class="header-anchor" href="#onupdatecleanzone" aria-label="Permalink to "onUpdateCleanZone""></a></h2><p>更新清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatevirtualwall" tabindex="-1">onUpdateVirtualWall <a class="header-anchor" href="#onupdatevirtualwall" aria-label="Permalink to "onUpdateVirtualWall""></a></h2><p>更新虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 更新后的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatespot" tabindex="-1">onUpdateSpot <a class="header-anchor" href="#onupdatespot" aria-label="Permalink to "onUpdateSpot""></a></h2><p>更新定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 更新后的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddensweepzone" tabindex="-1">onClickForbiddenSweepZone <a class="header-anchor" href="#onclickforbiddensweepzone" aria-label="Permalink to "onClickForbiddenSweepZone""></a></h2><p>点击禁扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddenmopzone" tabindex="-1">onClickForbiddenMopZone <a class="header-anchor" href="#onclickforbiddenmopzone" aria-label="Permalink to "onClickForbiddenMopZone""></a></h2><p>点击禁拖区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcleanzone" tabindex="-1">onClickCleanZone <a class="header-anchor" href="#onclickcleanzone" aria-label="Permalink to "onClickCleanZone""></a></h2><p>点击清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickvirtualwall" tabindex="-1">onClickVirtualWall <a class="header-anchor" href="#onclickvirtualwall" aria-label="Permalink to "onClickVirtualWall""></a></h2><p>点击虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 被点击的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickspot" tabindex="-1">onClickSpot <a class="header-anchor" href="#onclickspot" aria-label="Permalink to "onClickSpot""></a></h2><p>点击定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 被点击的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovefurniture" tabindex="-1">onRemoveFurniture <a class="header-anchor" href="#onremovefurniture" aria-label="Permalink to "onRemoveFurniture""></a></h2><p>点击家具删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 被删除的家具ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatefurniture" tabindex="-1">onUpdateFurniture <a class="header-anchor" href="#onupdatefurniture" aria-label="Permalink to "onUpdateFurniture""></a></h2><p>更新家具回调。当用户操作家具(拖拽、缩放、旋转)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 更新后的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickfurniture" tabindex="-1">onClickFurniture <a class="header-anchor" href="#onclickfurniture" aria-label="Permalink to "onClickFurniture""></a></h2><p>点击家具回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 被点击的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickdetectedobject" tabindex="-1">onClickDetectedObject <a class="header-anchor" href="#onclickdetectedobject" aria-label="Permalink to "onClickDetectedObject""></a></h2><p>点击检测物体回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickDetectedObject</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">object</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>object</code>: <a href="/reference/types.html#detectedobjectparam"><code>DetectedObjectParam</code></a> - 被点击的检测物体数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcustomelement" tabindex="-1">onClickCustomElement <a class="header-anchor" href="#onclickcustomelement" aria-label="Permalink to "onClickCustomElement""></a></h2><p>点击自定义元素回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCustomElement</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">element</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomElementParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>element</code>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam</code></a> - 被点击的自定义元素数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatedivider" tabindex="-1">onUpdateDivider <a class="header-anchor" href="#onupdatedivider" aria-label="Permalink to "onUpdateDivider""></a></h2><p>更新分割线回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateDivider</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">divider</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>divider</code>: <a href="/reference/types.html#point"><code>Point[]</code></a> - 更新后的分割线数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickmap" tabindex="-1">onClickMap <a class="header-anchor" href="#onclickmap" aria-label="Permalink to "onClickMap""></a></h2><p>地图点击回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickMap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#point"><code>Point</code></a> - 点击位置的地图坐标。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>runtime.enableMapClickCapture</code> 后,才会触发此回调。</p></div><h2 id="ongesturestart" tabindex="-1">onGestureStart <a class="header-anchor" href="#ongesturestart" aria-label="Permalink to "onGestureStart""></a></h2><p>手势交互开始回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureStart</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户开始与地图进行交互(如平移、缩放)或操作地图上的控制元素(如禁区、虚拟墙等)时触发。该回调通常用于在小程序层动态切换组件显隐(如将 <code>CoverView</code> 切换为普通 <code>View</code>),以避免原生组件由于层级问题干扰手势捕获。</p></div><h2 id="ongestureend" tabindex="-1">onGestureEnd <a class="header-anchor" href="#ongestureend" aria-label="Permalink to "onGestureEnd""></a></h2><p>手势交互结束回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureEnd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户结束与地图上的控制元素的手势交互时触发。</p></div><h2 id="onclickrobot" tabindex="-1">onClickRobot <a class="header-anchor" href="#onclickrobot" aria-label="Permalink to "onClickRobot""></a></h2><p>点击扫地机器人回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRobot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 扫地机器人当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableRobotClick</code> 后,该回调才会被触发。</p></div><h2 id="onclickchargingstation" tabindex="-1">onClickChargingStation <a class="header-anchor" href="#onclickchargingstation" aria-label="Permalink to "onClickChargingStation""></a></h2><p>点击充电桩回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickChargingStation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 充电桩当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableChargingStationClick</code> 后,该回调才会被触发。</p></div>`,224)])])}const g=i(n,[["render",p]]);export{c as __pageData,g as default};
|
|
19
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="onmapready" tabindex="-1">onMapReady <a class="header-anchor" href="#onmapready" aria-label="Permalink to "onMapReady""></a></h2><p>地图初始化完成回调。当地图组件初始化完成且所有 API 功能可用时触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapReady</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapApi</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapApi</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapApi</code>: <code>MapApi</code> - 可供使用的地图 API 函数对象。在组件层中,所有方法返回 Promise。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>这是获取 <code>mapApi</code> 实例的唯一方式。你需要在这个回调中保存 <code>mapApi</code> 引用,后续通过它调用所有地图方法。</p></div><p><strong>示例</strong>:</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { MapApi } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@ray-js/robot-map'</span></span>
|
|
20
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { useRef } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'react'</span></span>
|
|
21
|
+
<span class="line"></span>
|
|
22
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
|
23
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> mapApiRef</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> useRef</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">MapApi</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">null</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span>
|
|
24
|
+
<span class="line"></span>
|
|
25
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span></span>
|
|
26
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> <</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">RobotMap</span></span>
|
|
27
|
+
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapReady</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">api</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=></span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
28
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> mapApiRef.current </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> api</span></span>
|
|
29
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }}</span></span>
|
|
30
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
|
|
31
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /></span></span>
|
|
32
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
|
|
33
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="onmapfirstdrawed" tabindex="-1">onMapFirstDrawed <a class="header-anchor" href="#onmapfirstdrawed" aria-label="Permalink to "onMapFirstDrawed""></a></h2><p>地图首次绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapFirstDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有首次绘制完成后,才会触发此回调。你可以利用它来移除 Loading 状态。</p></div><h2 id="onmapdrawed" tabindex="-1">onMapDrawed <a class="header-anchor" href="#onmapdrawed" aria-label="Permalink to "onMapDrawed""></a></h2><p>地图绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onpathdrawed" tabindex="-1">onPathDrawed <a class="header-anchor" href="#onpathdrawed" aria-label="Permalink to "onPathDrawed""></a></h2><p>路径绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPathDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pathState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PathState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>pathState</code>: <a href="/reference/types.html#pathstate"><code>PathState</code></a> - 路径状态信息,包含路径ID、类型、机器人位置等。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onroompropertiesdrawed" tabindex="-1">onRoomPropertiesDrawed <a class="header-anchor" href="#onroompropertiesdrawed" aria-label="Permalink to "onRoomPropertiesDrawed""></a></h2><p>房间信息绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRoomPropertiesDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rooms</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>rooms</code>: <a href="/reference/types.html#roomproperty"><code>RoomProperty[]</code></a> - 房间属性信息数组。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroom" tabindex="-1">onClickRoom <a class="header-anchor" href="#onclickroom" aria-label="Permalink to "onClickRoom""></a></h2><p>点击房间回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Partial</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"><</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">>)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroomproperties" tabindex="-1">onClickRoomProperties <a class="header-anchor" href="#onclickroomproperties" aria-label="Permalink to "onClickRoomProperties""></a></h2><p>点击房间信息回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddensweepzone" tabindex="-1">onRemoveForbiddenSweepZone <a class="header-anchor" href="#onremoveforbiddensweepzone" aria-label="Permalink to "onRemoveForbiddenSweepZone""></a></h2><p>点击禁扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddenmopzone" tabindex="-1">onRemoveForbiddenMopZone <a class="header-anchor" href="#onremoveforbiddenmopzone" aria-label="Permalink to "onRemoveForbiddenMopZone""></a></h2><p>点击禁拖区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁拖区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovecleanzone" tabindex="-1">onRemoveCleanZone <a class="header-anchor" href="#onremovecleanzone" aria-label="Permalink to "onRemoveCleanZone""></a></h2><p>点击清扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的清扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovevirtualwall" tabindex="-1">onRemoveVirtualWall <a class="header-anchor" href="#onremovevirtualwall" aria-label="Permalink to "onRemoveVirtualWall""></a></h2><p>点击虚拟墙删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的虚拟墙ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddensweepzone" tabindex="-1">onUpdateForbiddenSweepZone <a class="header-anchor" href="#onupdateforbiddensweepzone" aria-label="Permalink to "onUpdateForbiddenSweepZone""></a></h2><p>更新禁扫区域回调。当用户操作禁扫区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddenmopzone" tabindex="-1">onUpdateForbiddenMopZone <a class="header-anchor" href="#onupdateforbiddenmopzone" aria-label="Permalink to "onUpdateForbiddenMopZone""></a></h2><p>更新禁拖区域回调。当用户操作禁拖区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatecleanzone" tabindex="-1">onUpdateCleanZone <a class="header-anchor" href="#onupdatecleanzone" aria-label="Permalink to "onUpdateCleanZone""></a></h2><p>更新清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatevirtualwall" tabindex="-1">onUpdateVirtualWall <a class="header-anchor" href="#onupdatevirtualwall" aria-label="Permalink to "onUpdateVirtualWall""></a></h2><p>更新虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 更新后的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatespot" tabindex="-1">onUpdateSpot <a class="header-anchor" href="#onupdatespot" aria-label="Permalink to "onUpdateSpot""></a></h2><p>更新定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 更新后的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddensweepzone" tabindex="-1">onClickForbiddenSweepZone <a class="header-anchor" href="#onclickforbiddensweepzone" aria-label="Permalink to "onClickForbiddenSweepZone""></a></h2><p>点击禁扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddenmopzone" tabindex="-1">onClickForbiddenMopZone <a class="header-anchor" href="#onclickforbiddenmopzone" aria-label="Permalink to "onClickForbiddenMopZone""></a></h2><p>点击禁拖区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcleanzone" tabindex="-1">onClickCleanZone <a class="header-anchor" href="#onclickcleanzone" aria-label="Permalink to "onClickCleanZone""></a></h2><p>点击清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickvirtualwall" tabindex="-1">onClickVirtualWall <a class="header-anchor" href="#onclickvirtualwall" aria-label="Permalink to "onClickVirtualWall""></a></h2><p>点击虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 被点击的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickspot" tabindex="-1">onClickSpot <a class="header-anchor" href="#onclickspot" aria-label="Permalink to "onClickSpot""></a></h2><p>点击定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 被点击的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovefurniture" tabindex="-1">onRemoveFurniture <a class="header-anchor" href="#onremovefurniture" aria-label="Permalink to "onRemoveFurniture""></a></h2><p>点击家具删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 被删除的家具ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatefurniture" tabindex="-1">onUpdateFurniture <a class="header-anchor" href="#onupdatefurniture" aria-label="Permalink to "onUpdateFurniture""></a></h2><p>更新家具回调。当用户操作家具(拖拽、缩放、旋转)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 更新后的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickfurniture" tabindex="-1">onClickFurniture <a class="header-anchor" href="#onclickfurniture" aria-label="Permalink to "onClickFurniture""></a></h2><p>点击家具回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 被点击的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickwaypoint" tabindex="-1">onClickWayPoint <a class="header-anchor" href="#onclickwaypoint" aria-label="Permalink to "onClickWayPoint""></a></h2><p>点击途径点回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickWayPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wayPoint</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> WayPointParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wayPoint</code>: <a href="/reference/types.html#waypointparam"><code>WayPointParam</code></a> - 被点击的途径点数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickdetectedobject" tabindex="-1">onClickDetectedObject <a class="header-anchor" href="#onclickdetectedobject" aria-label="Permalink to "onClickDetectedObject""></a></h2><p>点击检测物体回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickDetectedObject</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">object</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>object</code>: <a href="/reference/types.html#detectedobjectparam"><code>DetectedObjectParam</code></a> - 被点击的检测物体数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcustomelement" tabindex="-1">onClickCustomElement <a class="header-anchor" href="#onclickcustomelement" aria-label="Permalink to "onClickCustomElement""></a></h2><p>点击自定义元素回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCustomElement</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">element</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomElementParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>element</code>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam</code></a> - 被点击的自定义元素数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcarpet" tabindex="-1">onClickCarpet <a class="header-anchor" href="#onclickcarpet" aria-label="Permalink to "onClickCarpet""></a></h2><p>点击地毯区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCarpet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">carpet</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>carpet</code>: <code>{ id: string }</code> - 被点击的地毯信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>需要启用 <code>config.carpet.enableEdit</code> 后,该回调才会被触发。</p></div><h2 id="ondeletecarpet" tabindex="-1">onDeleteCarpet <a class="header-anchor" href="#ondeletecarpet" aria-label="Permalink to "onDeleteCarpet""></a></h2><p>删除地图地毯回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDeleteCarpet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">carpet</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>carpet</code>: <code>{ id: string }</code> - 被删除的地毯信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="ondeletecustomcarpet" tabindex="-1">onDeleteCustomCarpet <a class="header-anchor" href="#ondeletecustomcarpet" aria-label="Permalink to "onDeleteCustomCarpet""></a></h2><p>删除自定义地毯回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onDeleteCustomCarpet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">carpet</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { </span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> })</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>carpet</code>: <code>{ id: string }</code> - 被删除的自定义地毯信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatecustomcarpet" tabindex="-1">onUpdateCustomCarpet <a class="header-anchor" href="#onupdatecustomcarpet" aria-label="Permalink to "onUpdateCustomCarpet""></a></h2><p>更新自定义地毯回调。当用户编辑自定义地毯(移动、旋转、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateCustomCarpet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">carpet</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomCarpetParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>carpet</code>: <a href="/reference/types.html#customcarpetparam"><code>CustomCarpetParam</code></a> - 更新后的自定义地毯数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="oncarpetsupdated" tabindex="-1">onCarpetsUpdated <a class="header-anchor" href="#oncarpetsupdated" aria-label="Permalink to "onCarpetsUpdated""></a></h2><p>地毯更新完成回调。当地毯数据更新并渲染完成后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onCarpetsUpdated</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">carpets</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomCarpetParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>carpets</code>: <a href="/reference/types.html#customcarpetparam"><code>CustomCarpetParam[]</code></a> - 更新后的地毯数据数组。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>此回调仅在组件层(<code>RobotMap</code> / <code>RjsRobotMap</code>)可用,SDK 层不包含此回调。</p></div><h2 id="onupdatedivider" tabindex="-1">onUpdateDivider <a class="header-anchor" href="#onupdatedivider" aria-label="Permalink to "onUpdateDivider""></a></h2><p>更新分割线回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateDivider</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">divider</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>divider</code>: <a href="/reference/types.html#point"><code>Point[]</code></a> - 更新后的分割线数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickmap" tabindex="-1">onClickMap <a class="header-anchor" href="#onclickmap" aria-label="Permalink to "onClickMap""></a></h2><p>地图点击回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickMap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#point"><code>Point</code></a> - 点击位置的地图坐标。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>runtime.enableMapClickCapture</code> 后,才会触发此回调。</p></div><h2 id="ongesturestart" tabindex="-1">onGestureStart <a class="header-anchor" href="#ongesturestart" aria-label="Permalink to "onGestureStart""></a></h2><p>手势交互开始回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureStart</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户开始与地图进行交互(如平移、缩放)或操作地图上的控制元素(如禁区、虚拟墙等)时触发。该回调通常用于在小程序层动态切换组件显隐(如将 <code>CoverView</code> 切换为普通 <code>View</code>),以避免原生组件由于层级问题干扰手势捕获。</p></div><h2 id="ongestureend" tabindex="-1">onGestureEnd <a class="header-anchor" href="#ongestureend" aria-label="Permalink to "onGestureEnd""></a></h2><p>手势交互结束回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureEnd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户结束与地图上的控制元素的手势交互时触发。</p></div><h2 id="onclickrobot" tabindex="-1">onClickRobot <a class="header-anchor" href="#onclickrobot" aria-label="Permalink to "onClickRobot""></a></h2><p>点击扫地机器人回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRobot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 扫地机器人当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableRobotClick</code> 后,该回调才会被触发。</p></div><h2 id="onclickchargingstation" tabindex="-1">onClickChargingStation <a class="header-anchor" href="#onclickchargingstation" aria-label="Permalink to "onClickChargingStation""></a></h2><p>点击充电桩回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickChargingStation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 充电桩当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableChargingStationClick</code> 后,该回调才会被触发。</p></div>`,278)])])}const g=i(e,[["render",p]]);export{c as __pageData,g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as i,c as a,o as t,aq as n}from"./chunks/framework.CBLqO2Q1.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1773043511000}'),e={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[n("",278)])])}const g=i(e,[["render",p]]);export{c as __pageData,g as default};
|
package/dist-docs/assets/{reference_config.md.CK4ueBig.js → reference_config.md.DHynhVxG.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as i,c as e,o as a,
|
|
1
|
+
import{_ as i,c as e,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1772620557000}'),s={name:"reference/config.md"};function r(l,o,n,c,d,h){return a(),e("div",null,[...o[0]||(o[0]=[t(`<h1 id="配置" tabindex="-1">配置 <a class="header-anchor" href="#配置" aria-label="Permalink to "配置""></a></h1><p>了解 RobotMap 的配置选项,用于定制地图的视觉样式、素材资源、交互行为等。</p><div class="tip custom-block"><p class="custom-block-title">响应式配置</p><p>配置是<strong>响应式</strong>的,当你修改传入的 <code>config</code> prop 时,地图会自动更新视觉效果,无需重新初始化。这使得主题切换、颜色调整等功能的实现变得简单直接。</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><ul><li>本文档部分配置项的单位与<strong>米</strong>相关,该配置的值会根据地图数据里的分辨率转换为像素单位。</li></ul></div><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to "使用示例""></a></h2><h3 id="基础配置" tabindex="-1">基础配置 <a class="header-anchor" href="#基础配置" aria-label="Permalink to "基础配置""></a></h3><p>配置通过 <code>config</code> 传递,所有配置项都是可选的,你可以只覆盖需要修改的部分。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'react'</span></span>
|
|
2
2
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '@ray-js/robot-map'</span></span>
|
|
3
3
|
<span class="line"></span>
|
|
4
4
|
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as i,c as e,o as a,
|
|
1
|
+
import{_ as i,c as e,o as a,aq as t}from"./chunks/framework.CBLqO2Q1.js";const g=JSON.parse('{"title":"配置","description":"","frontmatter":{},"headers":[],"relativePath":"reference/config.md","filePath":"reference/config.md","lastUpdated":1772620557000}'),s={name:"reference/config.md"};function r(l,o,n,c,d,h){return a(),e("div",null,[...o[0]||(o[0]=[t("",1299)])])}const u=i(s,[["render",r]]);export{g as __pageData,u as default};
|