範例互動內容選單內容選單當在節點上按下滑鼠右鍵時,可以使用 onNodeContextMenu 事件來顯示自訂選單。此範例顯示一個簡單的選單,其中包含用於複製或刪除點擊節點的按鈕。index.htmlApp.svelte<script lang="ts"> const data: string = "world"; </script> <h1>Hello {data}</h1> <style> h1 { font-size: 1.5rem; } </style>唯讀在 Stackblitz 中開啟在 Codesandbox 中開啟功能概覽