mirror of https://github.com/sveltejs/svelte
parent
4c6c4c6e97
commit
28950b79cf
@ -1,65 +0,0 @@
|
|||||||
/* generated by Svelte vX.Y.Z */
|
|
||||||
import {
|
|
||||||
SvelteComponent,
|
|
||||||
attr,
|
|
||||||
detach,
|
|
||||||
element,
|
|
||||||
init,
|
|
||||||
insert,
|
|
||||||
listen,
|
|
||||||
noop,
|
|
||||||
safe_not_equal,
|
|
||||||
set_input_value
|
|
||||||
} from "svelte/internal";
|
|
||||||
|
|
||||||
function create_fragment(ctx) {
|
|
||||||
var input, dispose;
|
|
||||||
|
|
||||||
return {
|
|
||||||
c() {
|
|
||||||
input = element("input");
|
|
||||||
attr(input, "type", "text");
|
|
||||||
dispose = listen(input, "input", ctx.input_input_handler);
|
|
||||||
},
|
|
||||||
|
|
||||||
m(target, anchor) {
|
|
||||||
insert(target, input, anchor);
|
|
||||||
|
|
||||||
set_input_value(input, ctx.value);
|
|
||||||
},
|
|
||||||
|
|
||||||
p(changed, ctx) {
|
|
||||||
if (changed.value && (input.value !== ctx.value)) set_input_value(input, ctx.value);
|
|
||||||
},
|
|
||||||
|
|
||||||
i: noop,
|
|
||||||
o: noop,
|
|
||||||
|
|
||||||
d(detaching) {
|
|
||||||
if (detaching) {
|
|
||||||
detach(input);
|
|
||||||
}
|
|
||||||
|
|
||||||
dispose();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function instance($$self, $$props, $$invalidate) {
|
|
||||||
let value;
|
|
||||||
|
|
||||||
function input_input_handler() {
|
|
||||||
$$invalidate('value', value = this.value);
|
|
||||||
}
|
|
||||||
|
|
||||||
return { value, input_input_handler };
|
|
||||||
}
|
|
||||||
|
|
||||||
class Component extends SvelteComponent {
|
|
||||||
constructor(options) {
|
|
||||||
super();
|
|
||||||
init(this, options, instance, create_fragment, safe_not_equal, []);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Component;
|
|
@ -1,5 +0,0 @@
|
|||||||
<script>
|
|
||||||
let value;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<input type="text" bind:value={value}>
|
|
Loading…
Reference in new issue