範例節點鄰近連線鄰近連線這個範例展示了如何在一個節點被拖曳到另一個節點附近時自動建立邊緣。拖曳時,會顯示一條虛線連線,以顯示如果您放下節點將建立哪個邊緣。index.htmlApp.svelte<script lang="ts"> const data: string = "world"; </script> <h1>Hello {data}</h1> <style> h1 { font-size: 1.5rem; } </style>唯讀在 Stackblitz 中開啟在 Codesandbox 中開啟功能概覽