This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<p> | |
<button> Undo </button> | |
<button> Redo </button> | |
</p> | |
<textarea v-model="text"/> | |
</template> | |
<script setup> | |
import { ref } from 'vue' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="popup"> | |
<div class="content"> | |
<p> Loaded API: {{ article }} </p> | |
<h4> Login to your account </h4> | |
<input type="text" placeholder="Email" /> | |
<input type="password" placeholder="Password" /> | |
<button> Log in </button> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Use defineAsyncComponent --> | |
<template> | |
<button @click="show = true"> Login </button> | |
<login-popup v-if="show" /> | |
</template> | |
<script> | |
import { defineAsyncComponent } from 'vue' | |
export default { | |
components: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- "Standard" way of doing things --> | |
<template> | |
<button @click="show = true"> Login </button> | |
<login-popup v-if="show" /> | |
</template> | |
<script> | |
import LoginPopup from './components/LoginPopup.vue' | |
export default { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="popup"> | |
<div class="content"> | |
<h4> Login to your account </h4> | |
<input type="text" placeholder="Email" /> | |
<input type="password" placeholder="Password" /> | |
<button> Log in </button> | |
</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input | |
type="text" | |
placeholder="Start typing..." | |
ref="input" | |
/> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<ul> | |
<li | |
v-for="(name, i) in names" | |
:key="name" | |
:ref="el => elements[i] = el" | |
> | |
{{ name }} | |
</li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input | |
type="text" | |
placeholder="Start typing..." | |
ref="input" | |
/> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<button @click="logout"> Logout </button> | |
<p v-font-size:small>Small</p> | |
<p v-font-size:medium>Medium</p> | |
<p v-font-size:large>Large</p> | |
<a :href="featuredLink"> Featured Link </a> | |
<my-header> | |
<template #title> | |
Building Your Own Vue 3 Plugin - <i> A Full Guide </i> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h1 class="header-title"> | |
<slot name="title" /> | |
</h1> | |
<h2 class="title-author"> | |
<slot name="author" /> | |
</h2> | |
</div> | |
</template> |