範例節點在邊緣拖曳時新增節點在邊緣拖曳時新增節點您可以使用 onConnectionStart 和 onConnectionStop 處理程序,在將連線線拖放到畫布上時建立新的節點。index.htmlApp.svelte<script lang="ts"> const data: string = "world"; </script> <h1>Hello {data}</h1> <style> h1 { font-size: 1.5rem; } </style>唯讀在 Stackblitz 中開啟在 Codesandbox 中開啟功能概覽