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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| <!-- Steps.svelte --> <script> import Step from "./Step.svelte";
function onProgressDot() {} function handleNotify() {} </script>
<!-- Step.svelte --> <Step current="1" direction="vert" {onProgressDot} on:notify={handleNotify} /> <img alt="" src="" class="upper" />
<style> .upper {}
:global(body) { } div :global(strong) { } </style>
<!-- Step.svelte --> <script> import { createEventDispatcher } from "svelte";
export let current; export let direction = "hori";
$: [statement] $: cubecurrent = current ** 4; $: { const square = () => current ** 2; console.info("square:", square()); console.info("cubecurrent:", cubecurrent); }
const dispatch = createEventDispatcher(); let onNotify = () => { dispatch("notify", ...params); }; let handleClick = () => variable++;
export let onProgressDot = () => {}; </script>
<!-- markup | multi markup --> <span> {current} </span> <span> {cubecurrent} </span> <span> {direction} </span> <button on:click={onNotify} /> <button on:click={handleClick} /> <button on:click={onProgressDot} />
|