範例互動

內容選單

當在節點上按下滑鼠右鍵時,可以使用 onNodeContextMenu 事件來顯示自訂選單。此範例顯示一個簡單的選單,其中包含用於複製或刪除點擊節點的按鈕。

<script lang="ts">
const data: string = "world";
</script>

<h1>Hello {data}</h1>

<style>
h1 {
  font-size: 1.5rem;
}
</style>
唯讀