Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- OpenCV-4.1.0
- NSCameraUsageDescription
- stackoverflow
- pkg-config
- 예제 실행 시 에러 관련_
- OpenCV로 배우는 영상처리 및 응용
- VAE
- 웹어셈블리 인 액션
- 영상처리
- OpenCV
- VisualCapture
- WebAssembly in Action
- Info.plist
- xcode
- homebrew
- mac os
- Camera Usage Description
- AutoEncoder
Archives
- Today
- Total
DEV.log
slot-props 본문
<!-- App.svelte -->
<script>
import Hoverable from './Hoverable.svelte';
</script>
<Hoverable let:hovering={active}>
<div class:active>
{#if active}
<p>I am being hovered upon.</p>
{:else}
<p>Hover over me!</p>
{/if}
</div>
</Hoverable>
<style>
div {
padding: 1em;
margin: 0 0 1em 0;
background-color: #eee;
}
.active {
background-color: #ff3e00;
color: white;
}
</style>
<!-- Hoverable.svelte -->
<script>
let hovering;
function enter() {
hovering = true;
}
function leave() {
hovering = false;
}
</script>
<div on:mouseenter={enter} on:mouseleave={leave}>
<slot hovering={hovering}></slot>
</div>
https://svelte.dev/tutorial/slot-props
Component composition / Slot props • Svelte Tutorial
Component composition / Slot props a. Basicsb. Adding datac. Dynamic attributesd. Stylinge. Nested componentsf. HTML tagsg. Making an appa. Assignmentsb. Declarationsc. Statementsd. Updating arrays and objectsa. Declaring propsb. Default valuesc. Spread pr
svelte.dev
'Svelte > tutorial' 카테고리의 다른 글
sharing-code (0) | 2022.02.01 |
---|---|
context-api (0) | 2022.02.01 |
optional-slots (0) | 2022.02.01 |
named-slots (0) | 2022.02.01 |
slots (0) | 2022.02.01 |
Comments