Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

vue teleport

  <!DOCTYPE html>
<html lang="en">
 <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width" />
    <title>Vite App</title>
  </head>
 <body>
    <div id="app"></div>
    <div id="dialogs">{/div
    <script type="module" src="/src/main.js"></script>
 </body>
</html>


<template>
  <teleport to="#dialogs">
    <div class="the-dialog">
     <div class="the-dialog_container">
       <div class="the-dialog_header">
          {{ heading }}
        </div>
        Oreferences
        <div class="the-dialog_body"><slot></slot></div>
      </div>
    </div>
  </teleport>
</template>
Source by w3programmers.org #
 
PREVIOUS NEXT
Tagged: #vue #teleport
ADD COMMENT
Topic
Name
1+1 =