mirror of https://github.com/sveltejs/svelte
Merge pull request #2230 from sveltejs/gh-2205
Remove support for logic-less componentspull/2231/head
commit
07ceb2e767
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let name;
|
||||
</script>
|
||||
|
||||
<input bind:value={name}>
|
||||
<p>Hello {name}!</p>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let name;
|
||||
</script>
|
||||
|
||||
<h1>Hello {name}!</h1>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let name;
|
||||
</script>
|
||||
|
||||
<h1>Hello {name}!</h1>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let className;
|
||||
</script>
|
||||
|
||||
<div class={className}></div>
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let foo;
|
||||
</script>
|
||||
|
||||
{#if foo}
|
||||
<p>foo!</p>
|
||||
{/if}
|
@ -1,3 +1,8 @@
|
||||
<script>
|
||||
export let w;
|
||||
export let h;
|
||||
</script>
|
||||
|
||||
<div bind:offsetWidth={w} bind:offsetHeight={h}>
|
||||
some content
|
||||
</div>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let name;
|
||||
</script>
|
||||
|
||||
<h1>Hello {name}!</h1>
|
||||
{@debug}
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let createElement;
|
||||
</script>
|
||||
|
||||
{#each createElement as node}
|
||||
<span>{node}</span>
|
||||
{/each}
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let bar;
|
||||
</script>
|
||||
|
||||
<div data-foo='bar'/>
|
||||
<div data-foo='{bar}'/>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let bar;
|
||||
</script>
|
||||
|
||||
<div data-foo='bar'/>
|
||||
<div data-foo='{bar}'/>
|
Before Width: | Height: | Size: 56 B After Width: | Height: | Size: 93 B |
@ -1,3 +1,11 @@
|
||||
<script>
|
||||
export let a;
|
||||
export let b;
|
||||
export let c;
|
||||
export let d;
|
||||
export let e;
|
||||
</script>
|
||||
|
||||
{#each [a, b, c, d, e] as num}
|
||||
<span>{num}</span>
|
||||
{/each}
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let things;
|
||||
</script>
|
||||
|
||||
{#each things as thing (thing.id)}
|
||||
<div>{thing.name}</div>
|
||||
{/each}
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let foo;
|
||||
</script>
|
||||
|
||||
{#if foo}
|
||||
<p>foo!</p>
|
||||
{/if}
|
@ -1 +1,7 @@
|
||||
<script>
|
||||
export let color;
|
||||
export let x;
|
||||
export let y;
|
||||
</script>
|
||||
|
||||
<div style='color: {color}; transform: translate({x}px,{y}px);'></div>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let data;
|
||||
</script>
|
||||
|
||||
<div style='background: url(data:image/png;base64,{data})'></div>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let color;
|
||||
</script>
|
||||
|
||||
<div style='color: {color}'></div>
|
@ -1,2 +1,8 @@
|
||||
<div style='{style}'></div>
|
||||
<div style='{key}: {value}'></div>
|
||||
<script>
|
||||
export let style;
|
||||
export let key;
|
||||
export let value;
|
||||
</script>
|
||||
|
||||
<div style={style}></div>
|
||||
<div style="{key}: {value}"></div>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let files;
|
||||
</script>
|
||||
|
||||
<input type="file" multiple bind:files>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let value;
|
||||
</script>
|
||||
|
||||
<input type=range bind:value>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let foo;
|
||||
</script>
|
||||
|
||||
<input type='checkbox' bind:checked={foo}>
|
@ -1 +1,11 @@
|
||||
<script>
|
||||
export let buffered;
|
||||
export let seekable;
|
||||
export let played;
|
||||
export let currentTime;
|
||||
export let duration;
|
||||
export let paused;
|
||||
export let volume;
|
||||
</script>
|
||||
|
||||
<audio bind:buffered bind:seekable bind:played bind:currentTime bind:duration bind:paused bind:volume/>
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let current;
|
||||
</script>
|
||||
|
||||
<select value={current}>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let custom;
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>a {custom} title</title>
|
||||
</svelte:head>
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let y;
|
||||
</script>
|
||||
|
||||
<svelte:window bind:scrollY={y}/>
|
||||
|
||||
<p>scrolled to {y}</p>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
let foo;
|
||||
</script>
|
||||
|
||||
<Widget bind:foo/>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
let name;
|
||||
</script>
|
||||
|
||||
<input bind:value={name}>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
let foo;
|
||||
</script>
|
||||
|
||||
<canvas bind:this={foo}></canvas>
|
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let indeterminate;
|
||||
</script>
|
||||
|
||||
<input type='checkbox' indeterminate='{indeterminate}'>
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let items;
|
||||
</script>
|
||||
|
||||
{#each items as item, i}
|
||||
<div class='{item.foo ? "foo" : ""} {item.bar ? "bar" : ""}'>{i + 1}</div>
|
||||
{/each}
|
@ -1 +1,6 @@
|
||||
<script>
|
||||
export let inputType;
|
||||
export let inputValue;
|
||||
</script>
|
||||
|
||||
<input type='{inputType}' value='{inputValue}'>
|
Before Width: | Height: | Size: 40 B After Width: | Height: | Size: 77 B |
@ -1 +1,5 @@
|
||||
<script>
|
||||
export let value;
|
||||
</script>
|
||||
|
||||
<p data-value="{value}"></p>
|
||||
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let foo;
|
||||
</script>
|
||||
|
||||
<input type='radio' bind:group={foo} value='{false}'>
|
||||
<input type='radio' bind:group={foo} value='{true}'>
|
@ -1,2 +1,9 @@
|
||||
<script>
|
||||
export let t;
|
||||
export let d;
|
||||
export let paused;
|
||||
export let v;
|
||||
</script>
|
||||
|
||||
<audio bind:currentTime={t} bind:duration={d} bind:paused bind:volume={v}
|
||||
src='music.mp3'></audio>
|
@ -1,3 +1,8 @@
|
||||
<script>
|
||||
export let checked;
|
||||
export let indeterminate;
|
||||
</script>
|
||||
|
||||
<input type='checkbox' bind:checked bind:indeterminate>
|
||||
<p>checked? {checked}</p>
|
||||
<p>indeterminate? {indeterminate}</p>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let foo;
|
||||
</script>
|
||||
|
||||
<input type='checkbox' bind:checked={foo}>
|
||||
<p>{foo}</p>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let count;
|
||||
</script>
|
||||
|
||||
<input type='number' bind:value={count}>
|
||||
<p>{typeof count} {count}</p>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let count;
|
||||
</script>
|
||||
|
||||
<input type='range' bind:value={count}>
|
||||
<p>{typeof count} {count}</p>
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let count;
|
||||
</script>
|
||||
|
||||
<input type='range' bind:value={count}>
|
||||
<p>{typeof count} {count}</p>
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let items;
|
||||
</script>
|
||||
|
||||
{#each items as item}
|
||||
<div><input bind:value={item}><p>{item}</p></div>
|
||||
{/each}
|
@ -1,2 +1,6 @@
|
||||
<script>
|
||||
export let component;
|
||||
</script>
|
||||
|
||||
<h1>Hello {component.name}!</h1>
|
||||
<input bind:value={component.name}/>
|
@ -1,2 +1,7 @@
|
||||
<script>
|
||||
export let obj;
|
||||
export let prop;
|
||||
</script>
|
||||
|
||||
<input bind:value={obj[prop]}>
|
||||
<pre>{JSON.stringify(obj)}</pre>
|
@ -1,2 +1,7 @@
|
||||
<script>
|
||||
export let user;
|
||||
export let prop;
|
||||
</script>
|
||||
|
||||
<input bind:value={user[prop]}>
|
||||
<p>hello {user.name}</p>
|
@ -1,3 +1,8 @@
|
||||
<script>
|
||||
export let objects;
|
||||
export let prop;
|
||||
</script>
|
||||
|
||||
{#each objects as obj}
|
||||
<input bind:value={obj[prop]}>
|
||||
<pre>{JSON.stringify(obj)}</pre>
|
||||
|
@ -1,3 +1,7 @@
|
||||
<script>
|
||||
export let items;
|
||||
</script>
|
||||
|
||||
{#each items as item}
|
||||
<div><input bind:value={item.description}><p>{item.description}</p></div>
|
||||
{/each}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue