I'm using Vue 3's teleport to render an element into a div and it works as expected.
Teleport will add the item to the selected element but will not replace the current element in the div.
How do I set up the teleport to replace elements within the div, similar to how a vue application replaces the content of an anchor div when mounted?
Background: For SEO reasons, I need placeholder elements until the app renders and delivers.
传送占位符...我希望这个被传送组件替换当应用程序挂载时,这个占位符将被应用程序替换... 传送内容...
You need to have some separate logic to remove placeholders when necessary.
Set the content of the placeholder to empty in
setup
: